home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / iwftech.zip / headers / WKFMSG.H < prev    next >
Text File  |  1994-07-21  |  21KB  |  366 lines

  1. /****************************************************************************/
  2. /* Integration Kit for IBM* WorkFrame/2* Version 2.1                        */
  3. /*                                                                          */
  4. /* The integration kit contains an information reference and sample         */
  5. /* programs illustrating application programming interfaces to              */
  6. /* provide assistance with product integration into IBM's                   */
  7. /* WorkFrame/2 Version 2.1.                                                 */
  8. /*                                                                          */
  9. /* The information and sample programs are intended only for                */
  10. /* Version 2.1, and are not applicable to any other IBM product or          */
  11. /* product release.                                                         */
  12. /*                                                                          */
  13. /* The integration kit is provided as is, without any warranty of           */
  14. /* merchantibility of fitness for any particular purpose. The kit           */
  15. /* includes sample code. This code has not been tested, and IBM             */
  16. /* makes no representation of its workability or fitness on any             */
  17. /* system.                                                                  */
  18. /*                                                                          */
  19. /* You are permitted to make copies of the whole of this kit,               */
  20. /* including this notice screen. You are also permitted to copy the         */
  21. /* sample programs, and their source, contained in the kit for the          */
  22. /* purpose of running those programs on your system.                        */
  23. /*                                                                          */
  24. /* You may distribute copies of the whole of this kit, or only of the       */
  25. /* sample programs, in any country recognising the copyright of U.S.        */
  26. /* nationals. Any copies distributed by you must include a copy of          */
  27. /* this notice screen.                                                      */
  28. /*                                                                          */
  29. /* IBM will attempt to make future releases of the WorkFrame/2              */
  30. /* product compatible, but cannot guarantee upward compatibility.           */
  31. /*                                                                          */
  32. /* COPYRIGHT: IBM WorkFrame/2 Version 2.1                                   */
  33. /*            (C) COPYRIGHT IBM CORP 1990, 1991, 1992, 1993, 1994           */
  34. /*            LICENSED MATERIALS - PROPERTY OF IBM                          */
  35. /*            REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083         */
  36. /*                                                                          */
  37. /* ------------------------------------------------------------------------ */
  38. /*                                                                          */
  39. /* MODULE:    WKFMSG.H - Router interfaces                                  */
  40. /*                                                                          */
  41. /* NOTE:  For PM applications, WF/2 router reserves all inclusive message   */
  42. /*        ids from WM_USER to WM_USER+19.                                   */
  43. /*                                                                          */
  44. /****************************************************************************/
  45.  
  46. #ifndef _WKFMSG_H_
  47.    #define _WKFMSG_H_
  48.  
  49.    /* ---------------------------------------------------------------------- */
  50.    /* WorkFrame/2 Message Router connection types                            */
  51.    /* ---------------------------------------------------------------------- */
  52.    #define WKF_CONNECT_PM        1           /* presentation manager connect */
  53.    #define WKF_CONNECT_PIPE      2           /* pipe connect                 */
  54.    #define WKF_CONNECT_SHELL     3           /* workplace shell connect      */
  55.  
  56.    /* ---------------------------------------------------------------------- */
  57.    /* WorkFrame/2 Message Router client types                                */
  58.    /* ---------------------------------------------------------------------- */
  59.    #define WKF_TYPE_PROJECT      0x00000001
  60.    #define WKF_TYPE_FOLDER       0x00000002
  61.    #define WKF_TYPE_PROFILE      0x00000004
  62.    #define WKF_TYPE_MAKEMAKE     0x00000008
  63.    #define WKF_TYPE_LIBRARY      0x00000010
  64.    #define WKF_TYPE_MONITOR      0x00000020
  65.    #define WKF_TYPE_FILETOOL     0x20000000
  66.    #define WKF_TYPE_PROJTOOL     0x40000000
  67.    #define WKF_TYPE_ROUTER       0x80000000
  68.    #define WKF_TYPE_ALL          0xFFFFFFFF
  69.  
  70.  
  71.    /* ---------------------------------------------------------------------- */
  72.    /* WorkFrame/2 client registration options                                */
  73.    /* ---------------------------------------------------------------------- */
  74.    #define WKF_OPT_NONE          0x00000000
  75.    #define WKF_OPT_WRITELOG      0x00000001
  76.  
  77.    /* ---------------------------------------------------------------------- */
  78.    /* WorkFrame/2 Message Router messages.                                   */
  79.    /* ---------------------------------------------------------------------- */
  80.    #define WKFM_INITIALIZE       (WM_USER+0)
  81.    #define WKFM_TERMINATE        (WM_USER+1)
  82.    #define WKFM_CLIENTCHANGED    (WM_USER+2)
  83.    #define WKFM_CLIENTRENAMED    (WM_USER+3)
  84.    #define WKFM_CLIENTDELETED    (WM_USER+4)
  85.    #define WKFM_EXECUTEACTION    (WM_USER+5)
  86.    #define WKFM_APPSTARTNOTIFY   (WM_USER+6)
  87.    #define WKFM_APPTERMNOTIFY    (WM_USER+7)
  88.    #define WKFM_ACTIONSTART      (WM_USER+8)
  89.    #define WKFM_ACTIONEND        (WM_USER+9)
  90.    #define WKFM_LOGMESSAGE       (WM_USER+10)
  91.    #define WKFM_LOGERROR         (WM_USER+11)
  92.    #define WKFM_FILECHANGED      (WM_USER+12)
  93.    #define WKFM_FILERENAMED      (WM_USER+13)
  94.    #define WKFM_FILEDELETED      (WM_USER+14)
  95.    #define WKFM_CLIENTMOVED      (WM_USER+16)
  96.    #define WKFM_SYSTEMMSG        (WM_USER+17) /* reserved for all new msgs   */
  97.    #define WKFM_CLIENTMSG        (WM_USER+18) /* messages defined by tools   */
  98.  
  99. /*----------------------------------------------------------------------*/
  100. /* AF  04/14/94     Delete 2 #defines below                             */
  101. /*----------------------------------------------------------------------*/
  102.    #define WKFM_EXECUTECOMMAND   (WM_USER+15) /* same as WKFM_EXECUTEACTION, */
  103.                                               /* but ignores messages as     */
  104.                                               /* valid actions               */
  105.    #define WKFM_TRACE            (WM_USER+19) /* used for debugging          */
  106.  
  107.  
  108.    /* ---------------------------------------------------------------------- */
  109.    /* Client initialization parameter block.                                 */
  110.    /* ---------------------------------------------------------------------- */
  111.    typedef struct _WKF_INITIALIZEINFO
  112.            {
  113.            ULONG cb;                        /* structure size                */
  114.            ULONG flConnectType;             /* connection type               */
  115.            ULONG ulClientType;              /* client type identity          */
  116.            ULONG flTypeInterest;            /* client type interest flags    */
  117.            ULONG flOptions;                 /* registration options          */
  118.            CHAR  szClientTitle[1];          /* client title                  */
  119.            } WKF_INITIALIZEINFO, *PWKF_INITIALIZEINFO;
  120.  
  121.    /* ---------------------------------------------------------------------- */
  122.    /* Base Project file change flags.                                        */
  123.    /* ---------------------------------------------------------------------- */
  124.    #define WKF_PROJECT_DIRECTORY       0x00000001
  125.    #define WKF_PROJECT_ACCESSMETHOD    0x00000002
  126.    #define WKF_PROJECT_TARGETNAME      0x00000004
  127.    #define WKF_PROJECT_MAKEFILE        0x00000008
  128.    #define WKF_PROJECT_MASK            0x00000010
  129.    #define WKF_PROJECT_PROFILE         0x00000020
  130.    #define WKF_PROJECT_TARGETPATH      0x00000040
  131.    #define WKF_PROJECT_TARGETPARM      0x00000080
  132.    #define WKF_PROJECT_TARGETPROMPT    0x00000100
  133.    #define WKF_PROJECT_TARGETTYPE      0x00000200
  134.    #define WKF_PROJECT_MONITOR         0x00000400
  135.    #define WKF_PROJECT_FILEMENU        0x00000800
  136.    #define WKF_PROJECT_PROJECTMENU     0x00001000
  137.    #define WKF_PROJECT_OPENACTION      0x00002000
  138.    #define WKF_PROJECT_EXECACTION      0x00004000
  139.    #define WKF_PROJECT_STANDARD        0x0000FFFF
  140.  
  141.    /* ---------------------------------------------------------------------- */
  142.    /* client change message data                                             */
  143.    /* szParm contains 1 filename                                             */
  144.    /* ---------------------------------------------------------------------- */
  145.    typedef struct _WKF_CHANGEINFO
  146.            {
  147.            ULONG cb;                        /* structure size                */
  148.            ULONG flChanged;                 /* changed flag word             */
  149.            CHAR  szParm[1];
  150.            } WKF_CHANGEINFO, *PWKF_CHANGEINFO;
  151.  
  152.    /* ---------------------------------------------------------------------- */
  153.    /* client rename message data for WKFM_CLIENTRENAMED                      */
  154.    /* szParm contains 3 strings: new title, old filename, new filename       */
  155.    /* ---------------------------------------------------------------------- */
  156.    typedef WKF_CHANGEINFO  WKF_RENAMEINFO, *PWKF_RENAMEINFO;
  157.  
  158.    /* ---------------------------------------------------------------------- */
  159.    /* client delete message data for WKFM_CLIENTDELETED                      */
  160.    /* szParm contains 1 filename                                             */
  161.    /* ---------------------------------------------------------------------- */
  162.    typedef WKF_CHANGEINFO  WKF_DELETEINFO, *PWKF_DELETEINFO;
  163.  
  164.    /* ---------------------------------------------------------------------- */
  165.    /* AF  04/14/94   - Added structure for WKFM_CLIENTMOVED message          */
  166.    /* client moved message data                                              */
  167.    /* szParm contains 3 strings: new title, old filename, new filename       */
  168.    /* ---------------------------------------------------------------------- */
  169.    typedef WKF_CHANGEINFO  WKF_MOVEINFO, *PWKF_MOVEINFO;
  170.  
  171.    /* ---------------------------------------------------------------------- */
  172.    /* file change/rename/delete message data structures.                     */
  173.    /* szParm contains the following separated by a new line character:       */
  174.    /*                                                                        */
  175.    /*     1. Project file name or *                                          */
  176.    /*     2. Original file name (fully qualified)                            */
  177.    /*        This parameter may also contain *.                              */
  178.    /*     3. New file name (fully qualified); this parameter is only valid   */
  179.    /*        for WKFM_FILERENAMED message.                                   */
  180.    /*                                                                        */
  181.    /* ---------------------------------------------------------------------- */
  182.    typedef struct _WKF_FILECHANGEINFO
  183.            {
  184.            ULONG cb;                        /* structure size                */
  185.            CHAR  szParm[1];                 /* name of file modified         */
  186.            } WKF_FILECHANGEINFO, *PWKF_FILECHANGEINFO;
  187.  
  188.    typedef WKF_FILECHANGEINFO  WKF_FILERENAMEINFO, *PWKF_FILERENAMEINFO;
  189.  
  190.    typedef WKF_FILECHANGEINFO  WKF_FILEDELETEINFO, *PWKF_FILEDELETEINFO;
  191.  
  192.  
  193.    /* ---------------------------------------------------------------------- */
  194.    /* Execute command message data.                                          */
  195.    /* ---------------------------------------------------------------------- */
  196.    typedef struct _WKF_EXECUTEINFO
  197.            {
  198.            ULONG   cb;                             /* structure size         */
  199.            LHANDLE hActionId;                      /* assigned by message rtr*/
  200.            ULONG   flOptions;                      /* WF/2 monitor options   */
  201.            CHAR    szProjectFile[CCHMAXPATH];      /* project file name      */
  202.            CHAR    szActionName[WKF_MAX_NAMELEN];  /* action name            */
  203.            CHAR    szActionClass[WKF_MAX_CLASSLEN];/* action class name      */
  204.            ULONG   ulRunMode;                      /* program run mode       */
  205.            ULONG   cFiles;                         /* number of files listed */
  206.            CHAR    szFiles[1];                     /* file name list         */
  207.            } WKF_EXECUTEINFO, *PWKF_EXECUTEINFO;
  208.  
  209.  
  210.    /* ---------------------------------------------------------------------- */
  211.    /* Execute application notification data.                                 */
  212.    /* ---------------------------------------------------------------------- */
  213.    typedef struct _WKF_APPSTARTINFO
  214.            {
  215.            ULONG cb;                        /* structure size                */
  216.            HAPP  happ;                      /* application handle            */
  217.            } WKF_APPSTARTINFO, *PWKF_APPSTARTINFO;
  218.  
  219.  
  220.    /* ---------------------------------------------------------------------- */
  221.    /* Application termination notification data.                             */
  222.    /* ---------------------------------------------------------------------- */
  223.    typedef struct _WKF_APPTERMINFO
  224.            {
  225.            ULONG cb;                        /* structure size                */
  226.            HAPP  happ;                      /* application handle            */
  227.            ULONG ulReturn;                  /* application return code       */
  228.            } WKF_APPTERMINFO, *PWKF_APPTERMINFO;
  229.  
  230.  
  231.    /* ---------------------------------------------------------------------- */
  232.    /* Action start message data.                                             */
  233.    /* ---------------------------------------------------------------------- */
  234.    typedef struct _WKF_ACTIONSTARTINFO
  235.            {
  236.            ULONG   cb;                      /* structure size                */
  237.            LHANDLE hActionId;               /* action identifier handle      */
  238.            CHAR    szActionName[1];         /* action name                   */
  239.            } WKF_ACTIONSTARTINFO, *PWKF_ACTIONSTARTINFO;
  240.  
  241.  
  242.    /* ---------------------------------------------------------------------- */
  243.    /* Action end message data.                                               */
  244.    /* ---------------------------------------------------------------------- */
  245.    typedef struct _WKF_ACTIONENDINFO
  246.            {
  247.            ULONG   cb;                      /* structure size                */
  248.            LHANDLE hActionId;               /* action identifier handle      */
  249.            ULONG   cCodes;                  /*                               */
  250.            ULONG   ulRC;                    /* action return code            */
  251.            ULONG   ulTC;                    /* action termination code       */
  252.            CHAR    szActionName[1];         /* action name                   */
  253.            } WKF_ACTIONENDINFO, *PWKF_ACTIONENDINFO;
  254.  
  255.  
  256.    /* ---------------------------------------------------------------------- */
  257.    /* Log message data.                                                      */
  258.    /* ---------------------------------------------------------------------- */
  259.    typedef struct _WKF_LOGMSGINFO
  260.            {
  261.            ULONG cb;                        /* structure size                */
  262.            CHAR  szText[1];                 /* message text                  */
  263.            } WKF_LOGMSGINFO, *PWKF_LOGMSGINFO;
  264.  
  265.  
  266.    /* ---------------------------------------------------------------------- */
  267.    /* AF  04/14/94  -  Delete all trace info                                 */
  268.    /* Trace request message data                                             */
  269.    /* ---------------------------------------------------------------------- */
  270.    #define WKF_TRACEREQ_REGISTERED 0
  271.    #define WKF_TRACEREQ_INDEX      1  /* ulExtra = the table entry           */
  272.                                       /* i.e. 1==>array[0], 2==>array[1]...  */
  273.    typedef struct _WKF_TRACEREQ
  274.            {
  275.            ULONG cb;                        /* structure size                */
  276.            ULONG ulRequestType;             /* Request type                  */
  277.            ULONG ulExtra;                   /* field depends on request type */
  278.            } WKF_TRACEREQ, *PWKF_TRACEREQ;
  279.  
  280.  
  281.    /* ---------------------------------------------------------------------- */
  282.    /* Error message data.                                                    */
  283.    /* ---------------------------------------------------------------------- */
  284.    typedef struct _WKF_ERRORMSGINFO
  285.            {
  286.            ULONG cb;                        /* structure size                */
  287.            ULONG idError;                   /* error identity                */
  288.            BOOL  fActivate;                 /* activate log flag             */
  289.            CHAR  szText[1];                 /* message text                  */
  290.            } WKF_ERRORMSGINFO, *PWKF_ERRORMSGINFO;
  291.  
  292.  
  293.    /* ---------------------------------------------------------------------- */
  294.    /* Message sender information structure.                                  */
  295.    /* ---------------------------------------------------------------------- */
  296.    typedef struct _WKF_SENDERINFO
  297.            {
  298.            ULONG cb;                        /* structure size                */
  299.            ULONG ulClientType;              /* client type                   */
  300.            } WKF_SENDERINFO, *PWKF_SENDERINFO;
  301.  
  302.    /* ---------------------------------------------------------------------- */
  303.    /* WkfInitialize()                                                        */
  304.    /* ---------------------------------------------------------------------- */
  305.    #define WKFINITIALIZE_NAME           "WkfInitialize"
  306.    typedef LHANDLE APIENTRY WKFINITIALIZE( ULONG   flConnectType,
  307.                                            LHANDLE hClient,
  308.                                            ULONG   ulClientType,
  309.                                            PSZ     pszClientTitle,
  310.                                            ULONG   flTypeInterest,
  311.                                            ULONG   flOptions );
  312.    typedef WKFINITIALIZE * PWKFINITIALIZE;
  313.  
  314.    extern WKFINITIALIZE WkfInitialize;
  315.  
  316.    /* ---------------------------------------------------------------------- */
  317.    /* WkfTerminate()                                                         */
  318.    /* ---------------------------------------------------------------------- */
  319.    #define WKFTERMINATE_NAME            "WkfTerminate"
  320.    typedef BOOL APIENTRY WKFTERMINATE( LHANDLE hRouter, 
  321.                                        LHANDLE hClient );
  322.    typedef WKFTERMINATE * PWKFTERMINATE;
  323.  
  324.    extern WKFTERMINATE WkfTerminate;
  325.  
  326.    /* ---------------------------------------------------------------------- */
  327.    /* WkfNotify()                                                            */
  328.    /* ---------------------------------------------------------------------- */
  329.    #define WKFNOTIFY_NAME               "WkfNotify"
  330.    typedef BOOL APIENTRY WKFNOTIFY( LHANDLE hRouter,
  331.                                     LHANDLE hClient,
  332.                                     ULONG   idMsg,
  333.                                     PVOID   uMsgData );
  334.    typedef WKFNOTIFY * PWKFNOTIFY;
  335.  
  336.    extern WKFNOTIFY WkfNotify;
  337.  
  338.    /* ---------------------------------------------------------------------- */
  339.    /* WkfAccessMsgData()                                                     */
  340.    /* ---------------------------------------------------------------------- */
  341.    #define WKFACCESSMSGDATA_NAME        "WkfAccessMsgData"
  342.    typedef BOOL APIENTRY WKFACCESSMSGDATA( PVOID pMsgData );
  343.    typedef WKFACCESSMSGDATA * PWKFACCESSMSGDATA;
  344.  
  345.    extern WKFACCESSMSGDATA WkfAccessMsgData;
  346.  
  347.    /* ---------------------------------------------------------------------- */
  348.    /* WkfAllocMsgData()                                                      */
  349.    /* ---------------------------------------------------------------------- */
  350.    #define WKFALLOCMSGDATA_NAME         "WkfAllocMsgData"
  351.    typedef PVOID APIENTRY WKFALLOCMSGDATA( ULONG cbAlloc );
  352.    typedef WKFALLOCMSGDATA * PWKFALLOCMSGDATA;
  353.  
  354.    extern WKFALLOCMSGDATA WkfAllocMsgData;
  355.  
  356.    /* ---------------------------------------------------------------------- */
  357.    /* WkfFreeMsgData()                                                       */
  358.    /* ---------------------------------------------------------------------- */
  359.    #define WKFFREEMSGDATA_NAME          "WkfFreeMsgData"
  360.    typedef VOID APIENTRY WKFFREEMSGDATA( PVOID pMsgData );
  361.    typedef WKFFREEMSGDATA * PWKFFREEMSGDATA;
  362.  
  363.    extern WKFFREEMSGDATA WkfFreeMsgData;
  364.  
  365. #endif
  366.