home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / iwftech.zip / headers / WKFPAM.H < prev    next >
Text File  |  1994-07-21  |  43KB  |  618 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:    WKFPAM.H - Project Access Method interfaces                   */
  40. /*                                                                          */
  41. /****************************************************************************/
  42.  
  43. #ifndef _WKFPAM_H_
  44.    #define _WKFPAM_H_
  45.  
  46.    /* -------------------------------------------------------------------- */
  47.    /* WKFPAM_CCHMAXERROR - maximum error message string length which       */
  48.    /*                      can be returned from a PAM function             */
  49.    /* -------------------------------------------------------------------- */
  50.    #define WKFPAM_CCHMAXERROR 255
  51.  
  52.    /* -------------------------------------------------------------------- */
  53.    /* APIRET values from PAM functions                                     */
  54.    /*                                                                      */
  55.    /* WKFPAM_ERROR  - an error has occured, and an error message string    */
  56.    /*                 may have been returned                               */
  57.    /*                                                                      */
  58.    /* -------------------------------------------------------------------- */
  59.    #define WKFPAM_ERROR     ERROR_USER_DEFINED_BASE
  60.  
  61.    /* -------------------------------------------------------------------- */
  62.    /*                                                                      */
  63.    /* WKFPAM_PART                                                          */
  64.    /*      This typedef represents a single element in the list of project */
  65.    /*      parts passed back to the WKF_ADDFILES callback function.        */
  66.    /*                                                                      */
  67.    /* -------------------------------------------------------------------- */
  68.    typedef _Packed struct _WKFPAM_PART
  69.            {
  70.            ULONG          cb;            /* The size of this element, which  */
  71.                                          /* includes the FILEFINDBUF3 and    */
  72.                                          /* other string data all of which   */
  73.                                          /* contain variable length strings  */
  74.  
  75.            HPOINTER       hIcon;         /* A handle to a copy of an icon for*/
  76.                                          /* the file -- does not need to be  */
  77.                                          /* freed                            */
  78.  
  79.            PSZ            pszSystemData; /* Points to a string, contained    */
  80.                                          /* within this structure; contains  */
  81.                                          /* any spcecial data that the PAM   */
  82.                                          /* wishes to display about the file.*/
  83.                                          /* for example, a library system PAM*/
  84.                                          /* may display information about    */
  85.                                          /* the status of the file           */
  86.  
  87.            FILEFINDBUF3   FileFind;      /* The oNextEntryOffset field of    */
  88.                                          /* this structure must be set to    */
  89.                                          /* indicate the offset to the next  */
  90.                                          /* FILEFINDBUF3 struct (if there is */
  91.                                          /* one, else zero)                  */
  92.            } WKFPAM_PART;
  93.  
  94.            typedef WKFPAM_PART *PWKFPAM_PART;
  95.  
  96.  
  97.    /* -------------------------------------------------------------------- */
  98.    /*                                                                      */
  99.    /* WKFPAM_NEXTPART(p)                                                   */
  100.    /*           This macro can be used to move from one part to the next   */
  101.    /*                                                                      */
  102.    /* -------------------------------------------------------------------- */
  103.    #define WKFPAM_NEXTPART(p) (PWKFPAM_PART)((PCHAR)p+p->cb)
  104.  
  105.  
  106.    /* -------------------------------------------------------------------- */
  107.    /*                                                                      */
  108.    /* HAM  - project PAM handle                                            */
  109.    /*                                                                      */
  110.    /* -------------------------------------------------------------------- */
  111.    typedef LHANDLE HAM, *PHAM;
  112.  
  113.  
  114.    /* -------------------------------------------------------------------- */
  115.    /* WKF_ADDFILES                                                         */
  116.    /* -------------------------------------------------------------------- */
  117.    /* callback function to add a file to the files container of a base     */
  118.    /* project                                                              */
  119.    /*                                                                      */
  120.    /* Parameters : PVOID   pvPrivateData  (I) pointer to caller specific   */
  121.    /*                                         data                         */
  122.    /*              PSZ     pszContainer   (I) path name                    */
  123.    /*              ULONG   ulCount        (I) number of WKFPAM_PART entries*/
  124.    /*                                         in pwppData                  */
  125.    /*              PWKFPAM_PART pwppData  (I) start of data block          */
  126.    /*                                         containing WKFPAM_PART list  */
  127.    /*                                                                      */
  128.    /* Returns :    NO_ERROR       - items added successfully               */
  129.    /*              other          - OS/2 return code                       */
  130.    /*                                                                      */
  131.    /* -------------------------------------------------------------------- */
  132.    typedef APIRET (APIENTRY WKF_ADDFILES)( PVOID        pvPrivateData,
  133.                                            PSZ          pszContainer,
  134.                                            ULONG        ulCount,
  135.                                            PWKFPAM_PART pwppData );
  136.    typedef WKF_ADDFILES * PWKF_ADDFILES;
  137.  
  138.    /* -------------------------------------------------------------------- */
  139.    /* WKF_ADDMONITOR                                                       */
  140.    /* -------------------------------------------------------------------- */
  141.    /* callback function for adding output lines to the monitor listbox     */
  142.    /*                                                                      */
  143.    /* Parameters : PVOID   pvPrivateData  (I) pointer to caller specific   */
  144.    /*                                         data                         */
  145.    /*              PSZ     pszLine        (I) string to be displayed       */
  146.    /*                                                                      */
  147.    /* Returns :    NO_ERROR       - line added successfully                */
  148.    /*              other          - OS/2 return code                       */
  149.    /*                                                                      */
  150.    /* -------------------------------------------------------------------- */
  151.    typedef APIRET (APIENTRY WKF_ADDMONITOR)( PVOID   pvPrivateData,
  152.                                              PSZ     pszLine );
  153.    typedef WKF_ADDMONITOR * PWKF_ADDMONITOR;
  154.  
  155.    /* -------------------------------------------------------------------- */
  156.    /* WkfQueryHAM                                                          */
  157.    /* -------------------------------------------------------------------- */
  158.    /* PAM provided function for returning a caller unique HAM value.       */
  159.    /* This ham must be unique to each caller of this function.             */
  160.    /* If hamOld is not NULL, then any objects associated with this ham     */
  161.    /* are lost.                                                            */
  162.    /*                                                                      */
  163.    /* Parameters : HAM     hamOld         (I)  previously set ham value    */
  164.    /*                                          or NULL                     */
  165.    /*              PSZ     pszProjectName (I)  new project name to be      */
  166.    /*                                          assigned or NULL            */
  167.    /*                                                                      */
  168.    /* Returns :    NULL   if pszProjectName was NULL, then all data        */
  169.    /*                     associated with hamOld have been reset.          */
  170.    /*                     if pszProjectName was not NULL, then the         */
  171.    /*                     PAM failed.                                      */
  172.    /*              !NULL  a unique ham value; if hamOld was not NULL       */
  173.    /*                     then any data associated with hamOld has been    */
  174.    /*                     reset.                                           */
  175.    /* -------------------------------------------------------------------- */
  176.    #define WKF_PFS_QUERYHAM       "WKFQUERYHAM"
  177.    typedef HAM (APIENTRY WKF_QUERYHAM)( HAM hamOld,
  178.                                         PSZ pszProjectName );
  179.    typedef WKF_QUERYHAM *PWKF_QUERYHAM;
  180.  
  181.    /* -------------------------------------------------------------------- */
  182.    /* WkfQueryTitle                                                        */
  183.    /* -------------------------------------------------------------------- */
  184.    /* PAM provided function for querying the access method title or        */
  185.    /* description.                                                         */
  186.    /*                                                                      */
  187.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  188.    /*              ULONG   ulTitleMax     (I)  number of bytes in the      */
  189.    /*                                          buffer allocated for the    */
  190.    /*                                          string                      */
  191.    /*              PSZ     pszTitle       (O)  address of the buffer       */
  192.    /*                                          containing the null-        */
  193.    /*                                          delimited title string;     */
  194.    /*                                          on error, a zero length     */
  195.    /*                                          string should be returned.  */
  196.    /*                                                                      */
  197.    /* Returns :    APIRET  NO_ERROR  success                               */
  198.    /*                                                                      */
  199.    /* -------------------------------------------------------------------- */
  200.    #define WKF_PFS_QUERYTITLE     "WKFQUERYTITLE"
  201.    typedef APIRET (APIENTRY WKF_QUERYTITLE)( HAM     hamOwner,
  202.                                              ULONG   ulTitleMax,
  203.                                              PSZ     pszTitle );
  204.    typedef WKF_QUERYTITLE * PWKF_QUERYTITLE;
  205.  
  206.    /* -------------------------------------------------------------------- */
  207.    /* WkfSettings                                                          */
  208.    /* -------------------------------------------------------------------- */
  209.    /* This entry point is optional.  If present, the Access page of the    */
  210.    /* project's Settings notebook will enable an Options pushbutton.  Upon */
  211.    /* invocation, the function can display a dialog to acquire and store   */
  212.    /* any PAM specific information.  If a dialog is displayed, then        */
  213.    /* the parent and owner of the dialog should be set to those passed     */
  214.    /* in.  The dialog itself should be modal using WinDlgBox.              */
  215.    /* When writing data to the project file using the project APIs, it is  */
  216.    /* recommended that this DLL module name be used for the application    */
  217.    /* name key required by the WkfWriteProjectData API to reduce the       */
  218.    /* chances of another application using the same application name and   */
  219.    /* overwriting your data.                                               */
  220.    /*                                                                      */
  221.    /* Parameters : HAM     hamOwner       (I)  Project handle              */
  222.    /*              PSZ     pszProjectFile (I)  Project INI file name       */
  223.    /*              HWND    hwndParent     (I)  Parent window handle        */
  224.    /*              HWND    hwndOwner      (I)  Owner window handle         */
  225.    /*              ULONG   cbMessage      (I)  Size of pszMessage buffer   */
  226.    /*              PSZ     pszMessage     (O)  Pointer to message buffer   */
  227.    /*                                                                      */
  228.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  229.    /*                      specific message may be returned through        */
  230.    /*                      the pszMessage buffer.                          */
  231.    /*                                                                      */
  232.    /* -------------------------------------------------------------------- */
  233.    #define WKF_PFS_SETTINGS       "WKFSETTINGS"
  234.    typedef APIRET (APIENTRY WKF_SETTINGS)( HAM     hamOwner,
  235.                                            PSZ     pszProjectFile,
  236.                                            HWND    hwndParent,
  237.                                            HWND    hwndOwner,
  238.                                            ULONG   cbMessage,
  239.                                            PSZ     pszMessage );
  240.    typedef WKF_SETTINGS * PWKF_SETTINGS;
  241.  
  242.  
  243.    /* -------------------------------------------------------------------- */
  244.    /* WkfQueryFiles                                                        */
  245.    /* -------------------------------------------------------------------- */
  246.    /* PAM provided function for getting the list of files or parts that    */
  247.    /* belong to a project.                                                 */
  248.    /* On entry, cbMessage contains the number of bytes allocated           */
  249.    /* for the pszMessageBuffer.  On exit, pszMessage buffer may contain    */
  250.    /* a single null delimited string to be displayed to the user.          */
  251.    /* The PAM function should check the length field prior to writing any  */
  252.    /* data since a count of 0 may imply a NULL pointer.                    */
  253.    /*                                                                      */
  254.    /* Parameters : HAM     hamOwner       (I)  Project handle              */
  255.    /*              PSZ     pszMasks       (I)  File masks                  */
  256.    /*              PSZ     pszContainers  (I)  Path names to be searched   */
  257.    /*              PWKF_ADDFILES pfnAddFiles (I) Callback function for     */
  258.    /*                                          inserting file objects      */
  259.    /*                                          into the project container  */
  260.    /*              PVOID   pvPrivateData  (I)  Parameter to be passed back */
  261.    /*                                          to the pfnAddFiles callback */
  262.    /*                                          function                    */
  263.    /*              ULONG   cbMessage      (I)  Size of message buffer      */
  264.    /*              PSZ     pszMessage     (O)  Pointer to message buffer   */
  265.    /*                                                                      */
  266.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  267.    /*                      specific message may be returned through        */
  268.    /*                      the pszMessage buffer.                          */
  269.    /*                                                                      */
  270.    /* -------------------------------------------------------------------- */
  271.    #define WKF_PFS_QUERYFILES      "WKFQUERYFILES"
  272.    typedef APIRET (APIENTRY WKF_QUERYFILES)( HAM     hamOwner,
  273.                                              PSZ     pszMasks,
  274.                                              PSZ     pszContainers,
  275.                                              PWKF_ADDFILES pfnAddFiles,
  276.                                              PVOID   pvPrivateData,
  277.                                              ULONG   cbMessage,
  278.                                              PSZ     pszMessage );
  279.    typedef WKF_QUERYFILES * PWKF_QUERYFILES;
  280.  
  281.  
  282.    /* -------------------------------------------------------------------- */
  283.    /* WkfRun                                                               */
  284.    /* -------------------------------------------------------------------- */
  285.    /* PAM-provided function for executing an action.                       */
  286.    /* On entry, cbMessage contains the number of bytes allocated           */
  287.    /* for the pszMessageBuffer.  On exit, pszMessage buffer may contain    */
  288.    /* a single null delimited string to be displayed to the user.          */
  289.    /* The PAM function should check the length field prior to writing any  */
  290.    /* data since a count of 0 may imply a NULL pointer.                    */
  291.    /*                                                                      */
  292.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  293.    /*              PSZ     pszTitle       (I)  Title to be used or NULL    */
  294.    /*              PSZ     pszProgram     (I)  program to be executed      */
  295.    /*              PSZ     pszParameters  (I)  parameter string            */
  296.    /*              char   *pcEnvironment  (I)  environment block           */
  297.    /*              PSZ     pszStartDir    (I)  startup directory           */
  298.    /*              PSZ     pszTermQueueName (I) termination queue name     */
  299.    /*                                          to be used for returning    */
  300.    /*                                          result codes as defined by  */
  301.    /*                                          DosStartSession.            */
  302.    /*              ULONG   ulRunMode      (I)  = 0, Send message           */
  303.    /*                                          = 1, use full screen mode   */
  304.    /*                                               for DosStartSession    */
  305.    /*                                          = 2, use vio window         */
  306.    /*                                               for DosStartSession    */
  307.    /*                                          = 3, run cmd in a monitor   */
  308.    /*                                          = 255, use default mode for */
  309.    /*                                               DosStartSession        */
  310.    /*                                                                      */
  311.    /*              PWKF_ADDMONITOR pfnAddMonitor                           */
  312.    /*                                     (I)  call back function for      */
  313.    /*                                          inserting lines of output   */
  314.    /*                                          from the action invoked     */
  315.    /*                                          into the monitor container  */
  316.    /*                                          This parameter is only      */
  317.    /*                                          used if ulRunMode=3(Monitor)*/
  318.    /*                                          in which case it is required*/
  319.    /*              PVOID   pvPrivateData  (I)  parameter to be passed back */
  320.    /*                                          to the pfnAddMonitor        */
  321.    /*                                          callback function           */
  322.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  323.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  324.    /*                                                                      */
  325.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  326.    /*                      specific message may be returned through        */
  327.    /*                      the pszMessage buffer.                          */
  328.    /*                                                                      */
  329.    /* -------------------------------------------------------------------- */
  330.    #define WKF_RUNMODE_FULLSCREEN WKF_RUN_FULLSCREEN
  331.    #define WKF_RUNMODE_WINDOW     WKF_RUN_WINDOW
  332.    #define WKF_RUNMODE_MONITOR    WKF_RUN_MONITOR
  333.    #define WKF_RUNMODE_MESSAGE    11
  334.    #define WKF_RUNMODE_DEFAULT    255
  335.  
  336.    #define WKF_PFS_RUN             "WKFRUN"
  337.    typedef APIRET (APIENTRY WKF_RUN)( HAM     hamOwner,
  338.                                       PSZ     pszTitle,
  339.                                       PSZ     pszProgram,
  340.                                       PSZ     pszParameters,
  341.                                       CHAR  * pcEnvironment,
  342.                                       PSZ     pszStartDir,
  343.                                       PSZ     pszTermQueueName,
  344.                                       ULONG   ulRunMode,
  345.                                       PWKF_ADDMONITOR pfnAddMonitor,
  346.                                       PVOID   pvPrivateData,
  347.                                       ULONG   cbMessage,
  348.                                       PSZ     pszMessage );
  349.    typedef WKF_RUN * PWKF_RUN;
  350.  
  351.    /* -------------------------------------------------------------------- */
  352.    /* WkfWrite                                                             */
  353.    /* -------------------------------------------------------------------- */
  354.    /* PAM-provided function for writing characters to the input pipe       */
  355.    /* of the program started through WkfRun.                               */
  356.    /*                                                                      */
  357.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  358.    /*              ULONG   ulBytes        (I)  number of bytes to write    */
  359.    /*              char  * pcBuffer       (I)  data to be written          */
  360.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  361.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  362.    /*                                                                      */
  363.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  364.    /*                      specific message may be returned through        */
  365.    /*                      the pszMessage buffer.                          */
  366.    /*                                                                      */
  367.    /* -------------------------------------------------------------------- */
  368.    #define WKF_PFS_WRITE          "WKFWRITE"
  369.    typedef APIRET (APIENTRY WKF_WRITE)( HAM     hamOwner,
  370.                                         ULONG   ulBytes,
  371.                                         char  * pcBuffer,
  372.                                         ULONG   cbMessage,
  373.                                         PSZ     pszMessage );
  374.    typedef WKF_WRITE * PWKF_WRITE;
  375.  
  376.    /* -------------------------------------------------------------------- */
  377.    /* WkfStop                                                              */
  378.    /* -------------------------------------------------------------------- */
  379.    /* PAM provided function for stopping a process started through         */
  380.    /* WkfRun.  The HAM value uniquely identifies the task to be aborted.   */
  381.    /*                                                                      */
  382.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  383.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  384.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  385.    /*                                                                      */
  386.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  387.    /*                      specific message may be returned through        */
  388.    /*                      the pszMessage buffer.                          */
  389.    /*                                                                      */
  390.    /* -------------------------------------------------------------------- */
  391.    #define WKF_PFS_STOP           "WKFSTOP"
  392.    typedef APIRET (APIENTRY WKF_STOP)( HAM     hamOwner,
  393.                                        ULONG   cbMessage,
  394.                                        PSZ     pszMessage );
  395.    typedef WKF_STOP * PWKF_STOP;
  396.  
  397.    /* -------------------------------------------------------------------- */
  398.    /* WkfQueryPathInfo                                                     */
  399.    /* -------------------------------------------------------------------- */
  400.    /* PAM provided function for testing whether the filename is valid.     */
  401.    /* If the filename is valid, then the fully specified name is returned. */
  402.    /*                                                                      */
  403.    /* Parameters : HAM     hamOwner        (I)  project handle             */
  404.    /*              PSZ     pszPathName     (I)  file name to be validated  */
  405.    /*              ULONG   ulFullPathBufSize (I) size of following buffer  */
  406.    /*              PSZ     pszFullPathName (I)  address to the output      */
  407.    /*                                           buffer of size CCHMAXPATH  */
  408.    /*                                      (O)  *pszFullPathName contains  */
  409.    /*                                           the fully specified name   */
  410.    /*                                           if valid.                  */
  411.    /*              BOOL   *pfExists,      (O)  Does the file actually exist*/
  412.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  413.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  414.    /*                                                                      */
  415.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  416.    /*                      specific message may be returned through        */
  417.    /*                      the pszMessage buffer.                          */
  418.    /*                                                                      */
  419.    /* -------------------------------------------------------------------- */
  420.    #define WKF_PFS_QPATHINFO      "WKFQUERYPATHINFO"
  421.    typedef APIRET (APIENTRY WKF_QPATHINFO)( HAM     hamOwner,
  422.                                             PSZ     pszPathName,
  423.                                             ULONG   ulFullPathBufSize,
  424.                                             PSZ     pszFullPathName,
  425.                                             BOOL   *pfExists,
  426.                                             ULONG   cbMessage,
  427.                                             PSZ     pszMessage );
  428.    typedef WKF_QPATHINFO * PWKF_QPATHINFO;
  429.  
  430.    /* -------------------------------------------------------------------- */
  431.    /* WkfCreatePath                                                        */
  432.    /* -------------------------------------------------------------------- */
  433.    /* Creates all nodes along the path specified                           */
  434.    /*                                                                      */
  435.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  436.    /*              PSZ     pszPath        (I)  path name to be created     */
  437.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  438.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  439.    /*                                                                      */
  440.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  441.    /*                      specific message may be returned through        */
  442.    /*                      the pszMessage buffer.                          */
  443.    /*                                                                      */
  444.    /* -------------------------------------------------------------------- */
  445.    #define WKF_PFS_CREATEPATH     "WKFCREATEPATH"
  446.    typedef APIRET (APIENTRY WKF_CREATEPATH)( HAM     hamOwner,
  447.                                              PSZ     pszPath,
  448.                                              ULONG   cbMessage,
  449.                                              PSZ     pszMessage );
  450.    typedef WKF_CREATEPATH * PWKF_CREATEPATH;
  451.  
  452.  
  453.    /* -------------------------------------------------------------------- */
  454.    /* WkfQueryCopy                                                         */
  455.    /* -------------------------------------------------------------------- */
  456.    /* PAM provided function for testing whether files can be copied into   */
  457.    /* the current container.  This function may be called as a result      */
  458.    /* of a DM_DRAGOVER message across a Base Project Window                */
  459.    /*                                                                      */
  460.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  461.    /*              PSZ     pszFile        (I)  object to be copied         */
  462.    /*              PSZ     pszTargetPath  (I)  "target" path               */
  463.    /*              PULONG  pulMove        (O)  determines whether objects  */
  464.    /*                                          can be moved/copied/both    */
  465.    /*                                          or none                     */
  466.    /*                                          WKF_NOCOPY    : no copy/    */
  467.    /*                                                          move        */
  468.    /*                                          WKF_COPYFILES : copy only   */
  469.    /*                                          WKF_MOVEFILES : copy and    */
  470.    /*                                                          delete orig.*/
  471.    /*                                          WKF_CREATEFILES : create    */
  472.    /*                                                    from template     */
  473.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  474.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  475.    /*                                                                      */
  476.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  477.    /*                      specific message may be returned through        */
  478.    /*                      the pszMessage buffer.                          */
  479.    /*                                                                      */
  480.    /* -------------------------------------------------------------------- */
  481.    #define WKF_REPLACE           8  /* perform operation without checking  */
  482.  
  483.    #define WKF_NOCOPY            0  /* no copy/move possible               */
  484.    #define WKF_MOVEFILES         1  /* copy files and delete original   001*/
  485.    #define WKF_COPYFILES         2  /* copy files and keep original     010*/
  486.    #define WKF_CREATEFILES       4  /* create file from template        100*/
  487.    #define WKF_MOVEFILESREPL     (WKF_REPLACE | WKF_MOVEFILES)
  488.    #define WKF_COPYFILESREPL     (WKF_REPLACE | WKF_COPYFILES)
  489.    #define WKF_CREATEFILESREPL   (WKF_REPLACE | WKF_CREATEFILES)
  490.  
  491.    #define WKF_PFS_QCOPY          "WKFQUERYCOPY"
  492.    typedef APIRET (APIENTRY WKF_QCOPY)( HAM     hamOwner,
  493.                                         PSZ     pszFile,
  494.                                         PSZ     pszTargetPath,
  495.                                         PULONG  pulMove,
  496.                                         ULONG   cbMessage,
  497.                                         PSZ     pszMessage );
  498.    typedef WKF_QCOPY * PWKF_QCOPY;
  499.  
  500.  
  501.    /* -------------------------------------------------------------------- */
  502.    /* WkfCopyFile                                                          */
  503.    /* -------------------------------------------------------------------- */
  504.    /* PAM provided function for copying files between projects that use    */
  505.    /* the same access method.                                              */
  506.    /*                                                                      */
  507.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  508.    /*              PSZ     pszPathFrom    (I)  source path                 */
  509.    /*              PSZ     pszFileFrom    (I)  name of file to be copied   */
  510.    /*              PSZ     pszPathTo      (I)  target path                 */
  511.    /*              PSZ     pszFileTo      (I)  target file name            */
  512.    /*              ULONG   ulMove         (I)  determines whether objects  */
  513.    /*                                          are to be moved or copied   */
  514.    /*                                          WKF_COPYFILES : copy only   */
  515.    /*                                          WKF_MOVEFILES : copy and    */
  516.    /*                                                          delete orig.*/
  517.    /*                                          WKF_CREATEFILES : create    */
  518.    /*                                                    from template     */
  519.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  520.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  521.    /*                                                                      */
  522.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  523.    /*                      specific message may be returned through        */
  524.    /*                      the pszMessage buffer.                          */
  525.    /*                                                                      */
  526.    /* -------------------------------------------------------------------- */
  527.    #define WKF_PFS_COPYFILE       "WKFCOPYFILE"
  528.    typedef APIRET (APIENTRY WKF_COPYFILE)( HAM     hamOwner,
  529.                                            PSZ     pszPathFrom,
  530.                                            PSZ     pszFileFrom,
  531.                                            PSZ     pszPathTo,
  532.                                            PSZ     pszFileTo,
  533.                                            ULONG   ulMove,
  534.                                            ULONG   cbMessage,
  535.                                            PSZ     pszMessage );
  536.    typedef WKF_COPYFILE * PWKF_COPYFILE;
  537.  
  538.    /* -------------------------------------------------------------------- */
  539.    /* WkfDelete                                                            */
  540.    /* -------------------------------------------------------------------- */
  541.    /* PAM provided funtion for deleting a file                             */
  542.    /*                                                                      */
  543.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  544.    /*              PSZ     pszPath        (I)  source path                 */
  545.    /*              PSZ     pszFile        (I)  name of file to be deleted  */
  546.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  547.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  548.    /*                                                                      */
  549.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  550.    /*                      specific message may be returned through        */
  551.    /*                      the pszMessage buffer.                          */
  552.    /*                                                                      */
  553.    /* -------------------------------------------------------------------- */
  554.    #define WKF_PFS_DELETE         "WKFDELETE"
  555.    typedef APIRET (APIENTRY WKF_DELETE)( HAM     hamOwner,
  556.                                          PSZ     pszPath,
  557.                                          PSZ     pszFile,
  558.                                          ULONG   cbMessage,
  559.                                          PSZ     pszMessage );
  560.    typedef WKF_DELETE * PWKF_DELETE;
  561.  
  562.    /* -------------------------------------------------------------------- */
  563.    /* WkfDefaultName                                                       */
  564.    /* -------------------------------------------------------------------- */
  565.    /* PAM provided funtion for returning the default make file name or     */
  566.    /* the default target file name,                                        */
  567.    /*                                                                      */
  568.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  569.    /*              PSZ     pszPrjFileName (I)  project file name           */
  570.    /*              ULONG   ulRequestFlag  (I)  indicates which default name*/
  571.    /*                                     (I)  to return                   */
  572.    /*              ULONG   cbDefault      (I)  size of pszDefault buffer   */
  573.    /*              PSZ     pszDefault     (O)  address to the buffer       */
  574.    /*                                          containing the default      */
  575.    /*                                          name requested              */
  576.    /*              ULONG   cbMessage      (I)  size of message buffer      */
  577.    /*              PSZ     pszMessage     (O)  pointer to message buffer   */
  578.    /*                                                                      */
  579.    /* Returns :    APIRET  if return code is not 0, then an access method  */
  580.    /*                      specific message may be returned through        */
  581.    /*                      the pszMessage buffer.                          */
  582.    /*                                                                      */
  583.    /* -------------------------------------------------------------------- */
  584.    #define WKF_DNAME_MAKE         0
  585.    #define WKF_DNAME_TARGET       1
  586.    #define WKF_PFS_DEFAULTNAME    "WKFDEFAULTNAME"
  587.    typedef APIRET (APIENTRY WKF_DEFAULTNAME)( HAM     hamOwner,
  588.                                               PSZ     pszPrjFileName,
  589.                                               ULONG   ulRequestFlag,
  590.                                               ULONG   cbDefault,
  591.                                               PSZ     pszDefault,
  592.                                               ULONG   cbMessage,
  593.                                               PSZ     pszMessage );
  594.    typedef WKF_DEFAULTNAME * PWKF_DEFAULTNAME;
  595.  
  596.    /* -------------------------------------------------------------------- */
  597.    /* WkfQueryRunnable                                                     */
  598.    /* -------------------------------------------------------------------- */
  599.    /* PAM provided function for determining if a given file can be run.    */
  600.    /*                                                                      */
  601.    /* Parameters : HAM     hamOwner       (I)  project handle              */
  602.    /*              PSZ     pszContainer   (I)  source path                 */
  603.    /*              PSZ     pszFilename    (I)  name of file to be queried  */
  604.    /*                                                                      */
  605.    /* Returns :    BOOL    TRUE  - file can be run (via the WkfRun API)    */
  606.    /*                      FALSE - file cannot be run                      */
  607.    /*                                                                      */
  608.    /* -------------------------------------------------------------------- */
  609.    #define WKF_PFS_QRUNNABLE      "WKFQUERYRUNNABLE"
  610.    typedef BOOL (APIENTRY WKF_QRUNNABLE)( HAM     hamOwner,
  611.                                           PSZ     pszContainer,
  612.                                           PSZ     pszFilename );
  613.  
  614.    typedef WKF_QRUNNABLE * PWKF_QRUNNABLE;
  615.  
  616.  
  617. #endif
  618.