home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / MSFS.H < prev    next >
Text File  |  1997-07-23  |  17KB  |  382 lines

  1. #if !defined( _MSFS_H )
  2. #define _MSFS_H
  3.  
  4. /*
  5.  *  M S F S . H
  6.  *
  7.  *
  8.  *  Copyright Microsoft Corporation 1993-1995, All Rights Reserved
  9.  *
  10.  *
  11.  *  Definitions used by the the Microsoft Mail transport, address book
  12.  *  and shared folder service providers.
  13.  *
  14.  *  The following MSFS defined properties are configurable via ConfigureMsgService()
  15.  *  calls.  They are grouped by function.
  16.  *
  17.  *  C o n n e c t i o n   P r o p e r t i e s
  18.  *
  19.  *  PR_CFG_SERVER_PATH
  20.  *      --  The path to the users post office.  Mapped network drives, UNC and NETWARE paths
  21.  *          are acceptable.  NETWARE paths of the type NWServer/share:dir\dir1 are converted to
  22.  *          UNC paths of the type \\NWServer\share\dir\dir1.
  23.  *
  24.  *  PR_CFG_MAILBOX
  25.  *      --  The users mailbox name.  eg. in a NET/PO/USER address,
  26.  *          this is USER.  The maximum mailbox name is 10 characters.
  27.  *
  28.  *  PR_CFG_PASSWORD
  29.  *      --  The users mailbox password.  The maximum password is 8 characters.
  30.  *
  31.  *  PR_CFG_REMEMBER
  32.  *      --  A boolean value indicating whether the users password is
  33.  *          to be remembered in the profile or not.  This is useful because
  34.  *          if the password is remembered the user can bypass the logon prompt
  35.  *          if his server path, mailbox name and password are all supplied.
  36.  *
  37.  *  PR_CFG_CONN_TYPE
  38.  *      --  The connection type.  This may be one of CFG_CONN_AUTO, CFG_CONN_LAN,
  39.  *          CFG_CONN_REMOTE, CFG_CONN_OFFLINE as defined below.
  40.  *
  41.  *          CFG_CONN_AUTO       --  Automatically detect whether the connection type is LAN or REMOTE.
  42.  *                                  This connection type is only available on Win95.
  43.  *          CFG_CONN_LAN        --  LAN type connection.  Used to connect to the post office using a
  44.  *                                  UNC path or pre-existing mapped drive.
  45.  *          CFG_CONN_REMOTE     --  Dial up connection using Dial-up Networking.
  46.  *          CFG_CONN_OFFLINE    --  Not connected.
  47.  *
  48.  *  PR_CFG_SESSION_LOG
  49.  *      --  A boolean value indicating whether session logging
  50.  *          is on or off.
  51.  *
  52.  *  PR_CFG_SESSION_LOG_FILE
  53.  *      --  The path to the session log file.
  54.  *
  55.  *  D e l i v e r y   P r o p e r t i e s
  56.  *
  57.  *  PR_CFG_ENABLE_UPLOAD
  58.  *      --  A boolean value which indicates whether mail in the outbox
  59.  *          is sent.
  60.  *
  61.  *  PR_CFG_ENABLE_DOWNLOAD
  62.  *      --  A boolean value which indicates whether mail in the server
  63.  *          mailbag is downloaded.
  64.  *
  65.  *  PR_CFG_UPLOADTO
  66.  *      --  A bit array which allows the user to indicate which addresses
  67.  *          for which the transport is to attempt delivery.  This is useful
  68.  *          in order to allow a user to specify that a transport only handle
  69.  *          delivery for a subset of the addresses it can really process.
  70.  *          When multiple transports are installed and the user wants a
  71.  *          different transport to handle some specific address types they
  72.  *          can use this bit array to specify that the MSMAIL transport
  73.  *          only handle a specific set of addresses.
  74.  *
  75.  *          Possible values as defined below include:
  76.  *
  77.  *          CFG_UPLOADTO_PCMAIL     --  Local Post Office and External Post Office address types
  78.  *          CFG_UPLOADTO_PROFS      --  PROFS address types
  79.  *          CFG_UPLOADTO_SNADS      --  SNADS address types
  80.  *          CFG_UPLOADTO_OV         --  OfficeVision address types
  81.  *          CFG_UPLOADTO_MCI        --  MCI address types
  82.  *          CFG_UPLOADTO_X400       --  X.400 address types
  83.  *          CFG_UPLOADTO_FAX        --  FAX address types
  84.  *          CFG_UPLOADTO_MHS        --  MHS address types
  85.  *          CFG_UPLOADTO_SMTP       --  SMTP address types
  86.  *          CFG_UPLOADTO_MACMAIL    --  MacMail address types
  87.  *          CFG_UPLOADTO_ALL        --  All of the above address types
  88.  *
  89.  *
  90.  *  PR_CFG_NETBIOS_NTFY
  91.  *      --  A boolean value which indicates whether a netbios notification
  92.  *          is sent to a recipients transport when mail is delivered to
  93.  *          their server inbox.
  94.  *
  95.  *  PR_CFG_SPOOLER_POLL
  96.  *      --  The polling interval in minutes when the transport
  97.  *          checks for new mail.  1 <= polling interval <= 9999
  98.  *
  99.  *  PR_CFG_GAL_ONLY
  100.  *      --  A boolean value which, if TRUE, only displays the Microsoft Mail Global Address
  101.  *          list for name selection.  The Postoffice list, external post office lists, and gateway
  102.  *          address lists are not shown.
  103.  *
  104.  *  F a s t  L A N  P r o p e r t i e s
  105.  *
  106.  *  PR_CFG_LAN_HEADERS
  107.  *      --  A boolean value which indicates whether the user wants to enable
  108.  *          headers while working on the LAN.  Headers mode allows the user
  109.  *          to download message headers and selectively choose which mail
  110.  *          to download.
  111.  *
  112.  *  PR_CFG_LAN_LOCAL_AB
  113.  *      --  A boolean value which indicates whether the user wants to use
  114.  *          name resolution based on a local copy of the server address book
  115.  *          rather than the server address book itself.
  116.  *
  117.  *  PR_CFG_LAN_EXTERNAL_DELIVERY
  118.  *      --  A boolean value which indicates whether EXTERNAL.EXE, a server process, should be used
  119.  *          to deliver submitted mail messages.  This is sometimes useful when mail is running 
  120.  *          on a slow LAN connection.
  121.  *
  122.  *  S l o w  L A N  P r o p e r t i e s
  123.  *
  124.  *  PR_CFG_RAS_HEADERS
  125.  *      --  A boolean value which indicates whether the user wants to enable
  126.  *          headers while working over a slow speed link.  Headers mode
  127.  *          allows the user to download message headers and selectively
  128.  *          choose which mail to download.
  129.  *
  130.  *  PR_CFG_RAS_LOCAL_AB
  131.  *      --  A boolean value which indicates whether the user wants to use
  132.  *          name resolution based on a local copy of the server address book
  133.  *          rather than the server address book itself.
  134.  *
  135.  *  PR_CFG_RAS_EXTERNAL_DELIVERY
  136.  *      --  A boolean value which indicates whether EXTERNAL.EXE, a server process, should be used
  137.  *          to deliver submitted mail messages.  This speeds up message delivery when mail is
  138.  *          running on a Dial-up network connection.
  139.  *
  140.  *  PR_CFG_RAS_INIT_ON_START
  141.  *      --  A boolean value which indicates that a Dial-up Network connection should
  142.  *          be established when the transport provider starts up.
  143.  *
  144.  *  PR_CFG_RAS_TERM_ON_HDRS
  145.  *      --  A boolean value which indicates that a Dial-up Network connection should
  146.  *          be automatically terminated when headers are finished downloading.
  147.  *
  148.  *  PR_CFG_RAS_TERM_ON_XFER
  149.  *      --  A boolean value which indicates that a Dial-up Network connection should
  150.  *          be automatically terminated after mail has finished being sent
  151.  *          received.
  152.  *
  153.  *  PR_CFG_RAS_TERM_ON_EXIT
  154.  *      --  A boolean value which indicates that a Dial-up Network connection should
  155.  *          be automatically terminated when the provider is exited.
  156.  *
  157.  *  PR_CFG_RAS_PROFILE
  158.  *      --  The name of the Dial-up Network profile that the transport will use by
  159.  *          default to attempt the connection.
  160.  *
  161.  *  PR_CFG_RAS_RETRYATTEMPTS
  162.  *      --  Number of times to attempt dial for connection.
  163.  *          1 <= retry attempts <= 9999
  164.  *
  165.  *  PR_CFG_RAS_RETRYDELAY
  166.  *      --  Delay between retry attempts in seconds.
  167.  *          30 <= retry delay <= 9999
  168.  *
  169.  *  PR_CFG_RAS_CONFIRM
  170.  *      --  A value which determines whether, at connection time, the
  171.  *          user should be prompted to select a Dial-up Network connection.
  172.  *          Possible values as defined below include:
  173.  *          CFG_ALWAYS      --  Always use the default Dial-up Network profile.
  174.  *                              Never prompt the user.
  175.  *          CFG_ASK_FIRST   --  Prompt the user to select a profile on the
  176.  *                              first connection or after any error occurs.
  177.  *          CFG_ASK_EVERY   --  Always prompt the user to select the 
  178.  *                              Dial-up Network profile.
  179.  *
  180.  *  S c h e d u l e d   S e s s i o n   P r o p e r t i e s 
  181.  *
  182.  *  PR_CFG_SCHED_SESS
  183.  *      --  A property that contains information on scheduled sessions.  The
  184.  *          maximum number of entries that may be stored is CFG_SS_MAX.  The
  185.  *          information is stored in the data structure SchedSess.
  186.  *
  187.  *          typedef struct SchedSess {
  188.  *              USHORT          sSessType;
  189.  *              USHORT          sDayMask;
  190.  *              FILETIME        ftTime;
  191.  *              FILETIME        ftStart;
  192.  *              ULONG           ulFlags;
  193.  *              TCHAR           szPhoneEntry[RAS_MaxEntryName+1];
  194.  *          } SCHEDSESS, FAR *LPSCHEDSESS;
  195.  *      
  196.  *          SchedSess.sSessType can be one of CFG_SS_ONCE, CFG_SS_WEEKLY, or  CFG_SS_EVERY.
  197.  *         
  198.  *              CFG_SS_ONCE     is a session that is scheduled to execute only once on a specific
  199.  *                              date and time.
  200.  *
  201.  *              CFG_SS_WEEKLY   is a session that is scheduled to execute at a specific time on any
  202.  *                              of a given specified set of days during the week.
  203.  *      
  204.  *              CFG_SS_EVERY    is a session that is scheduled to execute at regularly scheduled 
  205.  *                              intervals of time.
  206.  *
  207.  *          SchedSess.sDayMask is only used when SchedSess.sSessType is set to CFG_SS_WEEKLY.  
  208.  *          SchedSess.sDayMask can be any combination of CFG_SS_SUN, CFG_SS_MON, CFG_SS_TUE, 
  209.  *          CFG_SS_WED, CFG_SS_THU, CFG_SS_FRI, or CFG_SS_SAT.
  210.  *
  211.  *          SchedSess.ftTime varies depending on the SchedSess.sSessType as follows:
  212.  *          
  213.  *                  SchedSess.sSessType             SchedSess.ftTime
  214.  *          
  215.  *                  CFG_SS_ONCE                     Date/time for the single scheduled session
  216.  *                  CFG_SS_WEEKLY                   Time for any weekly scheduled sessions
  217.  *                  CFG_SS_EVERY                    Duration between re-occuring scheduled sessions
  218.  *
  219.  *          SchedSess.ftStart is only used as the initial start time for sessions of type CFG_SS_EVERY.
  220.  *
  221.  *          SchedSess.ulFlags is currently unused and is reserved for future use.
  222.  *
  223.  *          SchedSess.szPhoneEntry is the name of the Dial-up Networking connection to use
  224.  *          when the session is scheduled to execute.  The Dial-up Network connection contains
  225.  *          the phone number and other relevent information needed to perform the connection.
  226.  *
  227.  *          Note:   All FILETIME structure members should always use local time.  ie. GetLocalTime()
  228.  *                  returns a SYSTEMTIME structure which can then be converted to FILETIME via
  229.  *                  SystemTimetoFileTime().
  230.  */
  231.  
  232. #include <ras.h>
  233. #include <mapitags.h>
  234.  
  235. #ifdef __BORLANDC__
  236.   #include <pshpack8.h>
  237. #endif
  238.  
  239. /*
  240.  * Connection Properties
  241.  */
  242. #define PR_CFG_SERVER_PATH              PROP_TAG (PT_STRING8,   0x6600)
  243. #define PR_CFG_MAILBOX                  PROP_TAG (PT_STRING8,   0x6601)
  244. // Password must be in the secure property range (See MAPITAGS.H)
  245. #define PR_CFG_PASSWORD                 PROP_TAG (PT_STRING8,   PROP_ID_SECURE_MIN)
  246. #define PR_CFG_CONN_TYPE                PROP_TAG (PT_LONG,      0x6603)
  247. #define     CFG_CONN_LAN            0
  248. #define     CFG_CONN_REMOTE         1
  249. #define     CFG_CONN_OFFLINE        2
  250. #define     CFG_CONN_AUTO           3
  251. #define PR_CFG_SESSION_LOG              PROP_TAG (PT_BOOLEAN,   0x6604)
  252. #define PR_CFG_SESSION_LOG_FILE         PROP_TAG (PT_STRING8,   0x6605)
  253. #define PR_CFG_REMEMBER                 PROP_TAG (PT_BOOLEAN,   0x6606)
  254.  
  255. /*
  256.  * Delivery Properties
  257.  */
  258.  
  259. #define PR_CFG_ENABLE_UPLOAD            PROP_TAG (PT_BOOLEAN,   0x6620)
  260. #define PR_CFG_ENABLE_DOWNLOAD          PROP_TAG (PT_BOOLEAN,   0x6621)
  261. #define PR_CFG_UPLOADTO                 PROP_TAG (PT_LONG,      0x6622)
  262. #define     CFG_UPLOADTO_PCMAIL     0x00000001
  263. #define     CFG_UPLOADTO_PROFS      0x00000002
  264. #define     CFG_UPLOADTO_SNADS      0x00000004
  265. #define     CFG_UPLOADTO_MCI        0x00000008
  266. #define     CFG_UPLOADTO_X400       0x00000010
  267. #define     CFG_UPLOADTO_FAX        0x00000040
  268. #define     CFG_UPLOADTO_MHS        0x00000080
  269. #define     CFG_UPLOADTO_SMTP       0x00000100
  270. #define     CFG_UPLOADTO_OV         0x00000800
  271. #define     CFG_UPLOADTO_MACMAIL    0x00001000
  272. #define     CFG_UPLOADTO_ALL        CFG_UPLOADTO_PCMAIL | CFG_UPLOADTO_PROFS | CFG_UPLOADTO_SNADS | \
  273.                                     CFG_UPLOADTO_MCI | CFG_UPLOADTO_X400 | CFG_UPLOADTO_FAX | \
  274.                                     CFG_UPLOADTO_MHS | CFG_UPLOADTO_SMTP | CFG_UPLOADTO_OV | \
  275.                                     CFG_UPLOADTO_MACMAIL
  276. #define PR_CFG_NETBIOS_NTFY             PROP_TAG (PT_BOOLEAN,   0x6623)
  277. #define PR_CFG_SPOOLER_POLL             PROP_TAG (PT_STRING8,   0x6624)
  278. #define PR_CFG_GAL_ONLY             PROP_TAG (PT_BOOLEAN,       0x6625)
  279.  
  280. /*
  281.  * LAN Properties
  282.  */
  283.  
  284. #define PR_CFG_LAN_HEADERS              PROP_TAG (PT_BOOLEAN,   0x6630)
  285. #define PR_CFG_LAN_LOCAL_AB             PROP_TAG (PT_BOOLEAN,   0x6631)
  286. #define PR_CFG_LAN_EXTERNAL_DELIVERY    PROP_TAG (PT_BOOLEAN,   0x6632)
  287.  
  288. /*
  289.  * Dial-up Network Properties
  290.  */
  291.  
  292. #define PR_CFG_RAS_EXTERNAL_DELIVERY    PROP_TAG (PT_BOOLEAN,   0x6639)
  293. #define PR_CFG_RAS_HEADERS              PROP_TAG (PT_BOOLEAN,   0x6640)
  294. #define PR_CFG_RAS_LOCAL_AB             PROP_TAG (PT_BOOLEAN,   0x6641)
  295. #define PR_CFG_RAS_INIT_ON_START        PROP_TAG (PT_BOOLEAN,   0x6642)
  296. #define PR_CFG_RAS_TERM_ON_HDRS         PROP_TAG (PT_BOOLEAN,   0x6643)
  297. #define PR_CFG_RAS_TERM_ON_XFER         PROP_TAG (PT_BOOLEAN,   0x6644)
  298. #define PR_CFG_RAS_TERM_ON_EXIT         PROP_TAG (PT_BOOLEAN,   0x6645)
  299. #define PR_CFG_RAS_PROFILE              PROP_TAG (PT_STRING8,   0x6646)
  300. #define PR_CFG_RAS_CONFIRM              PROP_TAG (PT_LONG,      0x6647)
  301. #define     CFG_ALWAYS              0
  302. #define     CFG_ASK_FIRST           1
  303. #define     CFG_ASK_EVERY           2
  304. #define PR_CFG_RAS_RETRYATTEMPTS        PROP_TAG (PT_STRING8,   0x6648)
  305. #define PR_CFG_RAS_RETRYDELAY           PROP_TAG (PT_STRING8,   0x6649)
  306.  
  307.  
  308. /*
  309.  * Message Header Property
  310.  */
  311.  
  312. #define PR_CFG_LOCAL_HEADER             PROP_TAG (PT_BOOLEAN,   0x6680)
  313.  
  314. /*
  315.  * Scheduled Session Properties
  316.  */
  317. #define     CFG_SS_MAX          16
  318. #define     CFG_SS_BASE_ID      0x6700
  319. #define     CFG_SS_MAX_ID       CFG_SS_BASE_ID + CFG_SS_MAX - 1
  320. #define SchedPropTag(n)         PROP_TAG (PT_BINARY, CFG_SS_BASE_ID+(n))
  321. #define PR_CFG_SCHED_SESS       SchedPropTag(0)
  322.  
  323. typedef struct SchedSess {
  324.     USHORT          sSessType;
  325.     USHORT          sDayMask;
  326.     FILETIME        ftTime;
  327.     FILETIME        ftStart;
  328.     ULONG           ulFlags;
  329.     TCHAR           szPhoneEntry[RAS_MaxEntryName+1];
  330. } SCHEDSESS, FAR *LPSCHEDSESS;
  331.  
  332. // Day bits
  333. #define     CFG_SS_SUN  0x0001
  334. #define     CFG_SS_MON  0x0002
  335. #define     CFG_SS_TUE  0x0004
  336. #define     CFG_SS_WED  0x0008
  337. #define     CFG_SS_THU  0x0010
  338. #define     CFG_SS_FRI  0x0020
  339. #define     CFG_SS_SAT  0x0040
  340.  
  341. #define IsDayChecked(sDayMask, nDay)  ( (sDayMask) & (1<<(nDay)) )
  342.  
  343. // Session types
  344. #define     CFG_SS_EVERY    0
  345. #define     CFG_SS_WEEKLY   1
  346. #define     CFG_SS_ONCE     2
  347. #define     CFG_SS_NULLTYPE 3
  348.  
  349. // Property range identifiers; useful for asserting
  350. #define PR_CFG_MIN              PROP_TAG (PT_STRING8,   0x6600)
  351. #define PR_CFG_MAX              SchedPropTag(CFG_SS_MAX-1)
  352.  
  353. // Shared Folder Service Provider Properties
  354.  
  355. // PR_ASSIGNED_ACCESS - MAPI Access rights given to users other than the owner of the folder
  356. //                      This property can be retrieved and set. The following MAPI access flags
  357. //                      are valid: 
  358. //                          MAPI_ACCESS_READ
  359. //                          (MAPI_ACCESS_CREATE_HIERARCHY | MAPI_ACCESS_CREATE_CONTENTS)
  360. //                          MAPI_ACCESS_DELETE
  361. //
  362. #define PR_ASSIGNED_ACCESS  PROP_TAG(PT_LONG, 0x66ff)
  363.  
  364. // SFSP_ACCESS_OWNER -  This flag is returned when PR_ASSIGNED_ACCESS is retrieved by the owner
  365. //                      of the folder. It can not be set.
  366. #define SFSP_ACCESS_OWNER   0x8000
  367.  
  368.  
  369. // Unique Provider Identifiers
  370. //
  371. #define MSFS_UID_ABPROVIDER     { 0x00,0x60,0x94,0x64,0x60,0x41,0xb8,0x01, \
  372.                                   0x08,0x00,0x2b,0x2b,0x8a,0x29,0x00,0x00 }
  373.  
  374. #define MSFS_UID_SFPROVIDER     { 0x00,0xff,0xb8,0x64,0x60,0x41,0xb8,0x01, \
  375.                                   0x08,0x00,0x2b,0x2b,0x8a,0x29,0x00,0x00 }
  376.                                                                             
  377. #ifdef __BORLANDC__
  378.   #include <poppack.h>
  379. #endif
  380.  
  381. #endif // _MSFS_H
  382.