home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / mstv.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  4KB  |  136 lines

  1. /***********************************************************************
  2. **      M S T V . H                                                    *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.  
  10.     MSTV.H
  11.  
  12.     Class definitions for CommMSTV SDK.
  13.  
  14. This is a part of the Microsoft TV SDK library.
  15. See the TODO.hlp file for detailed information regarding the
  16. Microsoft TV SDK product.
  17.  
  18. */
  19.  
  20. #ifndef _MSTV_H_
  21. #define _MSTV_H_
  22.  
  23.  
  24. // Disable export declaration for third party compilation
  25. #ifdef DLLEXPORT
  26. #undef DLLEXPORT   // as nothing
  27. #endif
  28. #ifdef BUILDCOMMMSTV
  29. #define COMMMSTVEXPORT __declspec ( dllexport )
  30. #else
  31. #define COMMMSTVEXPORT __declspec ( dllimport )
  32. #endif
  33.  
  34. // Defines for Database in-memory structs
  35. #define MAX_CALLLETTERS    10
  36. #define MAX_TITLE        256
  37. #define MAX_DESCRIPTION    1024
  38. #define    MAX_LOGOMONIKER    1024
  39.  
  40. typedef struct tagCHANNEL_INFO
  41. {
  42.     LONG    lChannelID;
  43.     LONG    lTuningSpace;
  44.     LONG    lChannelNumber;
  45.     LONG    lNetworkID;
  46.     LONG    lRatingID;
  47.     LONG    lDisplayMask;
  48.     LONG    lPaymentAddress;
  49.     LONG    lPaymentToken;
  50.     LONG    lLength;
  51.     DATE    StartTime;
  52.     DATE    EndTime;
  53.     DATE    LastUpdate;
  54.     TCHAR    szCallLetters[MAX_CALLLETTERS];
  55.     TCHAR    szDescription[MAX_DESCRIPTION];
  56.     TCHAR    szNetworkName[MAX_CALLLETTERS];
  57.     TCHAR    szNetworkLogoMoniker[MAX_LOGOMONIKER];
  58.     BOOL    fTunable;
  59. } CHANNEL_INFO;
  60.  
  61. #define CONTINUOUS_EPISODE    0
  62.  
  63. // lRepetition below is set to one of these values if Episode is a representation
  64. // of a reminder
  65. #define REMIND_NONE 0
  66. #define REMIND_ONCE 1
  67. #define REMIND_DAILY 2
  68. #define REMIND_WEEKLY 3
  69. #define REMIND_WEEKDAYS 4
  70. #define REMIND_MAX 4
  71.  
  72. #define TUNING_DEFAULT    0
  73.  
  74.  
  75. #define VIRTUAL_TUNINGSPACE(a) (a < 0 ? TRUE : FALSE )
  76.  
  77. typedef struct tagTUNING_INFO
  78. {
  79.     LONG    lTuningSpace;
  80.     LONG    lChannelNumber;
  81.     LONG    lVideoStream;
  82.     LONG    lAudioStream;
  83.     BSTR    bsIPStream;    // xxx.xxx.xxx.xxx
  84.     TCHAR    szCallLetters[MAX_CALLLETTERS];
  85. } TUNING_INFO;
  86.  
  87.  
  88.  
  89. // General error domains
  90.  
  91. #define    ERRDOM_DB            0x010000
  92. #define ERRDOM_FILE            0x020000
  93. #define ERRDOM_MEMORY        0x040000
  94. #define ERRDOM_TIMING        0x080000    // issue may go away if we just retry a few seconds later
  95. #define ERRDOM_STATE        0x0F0000  
  96. #define ERRDOM_INSTALL        0x100000    // something missing from the install
  97.     
  98. #define ERRDOM_OTHER        0xFF0000    // miscellaneous
  99.  
  100.  
  101. // General error codes
  102.  
  103. #define ERR_SUCCEEDED                0x00000000
  104.  
  105. // database errors
  106. #define ERR_NULL_CHANNEL_LIST        (ERRDOM_DB | 0x0001)        // chanlist null
  107. #define ERR_EPISODE_RS_FAILED        (ERRDOM_DB | 0x0002)        // openRecordSet for Episode failed
  108.  
  109. // file errors
  110.  
  111.  
  112. // memory errors
  113.  
  114.  
  115. // timing errors
  116.  
  117.  
  118. // state errors
  119. #define ERR_NULL_TVXDOC                (ERRDOM_STATE | 0x0001)    // CTvxDoc not initialized yet
  120. #define ERR_IN_MODAL_STATE            (ERRDOM_STATE | 0x0002)    // Modal dlg is up
  121.  
  122.  
  123. // installation errors
  124. #define ERR_FILE_MSVIDEO_MISSING    (ERRDOM_INSTALL | 0x0001)    // msvideo.htm is missing
  125. #define ERR_FILE_NODEVICE_MISSING    (ERRDOM_INSTALL | 0x0002)    // nodevice.htm is missing
  126. #define ERR_FILE_MSGUIDE_MISSING    (ERRDOM_INSTALL | 0x0003) // msguide.htm is missing
  127.  
  128.  
  129. // misc
  130. #define ERR_CANT_NAVIGATE            (ERRDOM_OTHER | 0x0001)    // IWebBrowser::Navigate() failed
  131. #define ERR_CHANNEL_DNE                (ERRDOM_OTHER | 0x0002)    // specified channel does not exists
  132.  
  133. #endif // _MSTV_H_
  134.  
  135.  
  136.