home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wpsclass.zip / WPFSYS.HH < prev    next >
Text File  |  1995-05-15  |  11KB  |  296 lines

  1. #if !defined(WPSPTRS) && !defined(WPSREFS)
  2.    #define WPSPTRS
  3. #endif
  4.  
  5. #ifndef WPFileSystem_Source
  6. #define WPFileSystem_Source
  7.  
  8. #include <wpobject.hh>
  9. #pragma off(dts_class);
  10. #pragma on(somobject_assignment_operators);
  11. #pragma on(somobject_constructors);
  12. #pragma on(somobject_destructor);
  13. #pragma off(case_insensitive_class_names);
  14.  
  15. #pragma on(som_bindings);
  16. class WPFileSystem : public WPObject {
  17.  
  18.      #pragma SOMMap (WPFileSystem, "WPFileSystem", "M_WPFileSystem")
  19.  
  20.      #pragma SOMClassVersion (WPFileSystem, 1, 2)
  21.  
  22.      #pragma SOMCallstyle (WPFileSystem, oidl)
  23.  
  24.      #pragma off(som_bindings);
  25.      #pragma pop(som_bindings);
  26.   public :
  27.  
  28. #pragma off(use_override_signature)
  29.      virtual BOOL wpSetRealName(PSZ pszName);
  30.      virtual BOOL wpSetType(PSZ pszTypes, PFEA2LIST pfeal);
  31.      virtual PSZ wpQueryType();
  32.      virtual BOOL wpSetAttr(ULONG attrFile);
  33.      virtual ULONG wpQueryAttr();
  34.      virtual ULONG wpAddFile1Page(HWND hwndNotebook);
  35.      virtual ULONG wpAddFile2Page(HWND hwndNotebook);
  36.      virtual ULONG wpAddFile3Page(HWND hwndNotebook);
  37.      virtual ULONG wpAddFileMenuPage(HWND hwndNotebook);
  38.      virtual ULONG wpQueryCreation(FDATE* fdate, FTIME* ftime);
  39.      virtual ULONG wpQueryLastAccess(FDATE* fdate, FTIME* ftime);
  40.      virtual ULONG wpQueryLastWrite(FDATE* fdate, FTIME* ftime);
  41.      virtual ULONG wpQueryFileSize();
  42.      virtual ULONG wpQueryEASize();
  43.      virtual ULONG wpSetDateInfo(FILEFINDBUF4* pstFileFindBuf);
  44.      virtual ULONG wpSetFileSizeInfo(ULONG cbFileSize, ULONG cbEASize);
  45.      virtual BOOL wpRefresh(ULONG ulView, PVOID pReserved);
  46.      virtual ULONG wpQueryRefreshFlags();
  47.      virtual BOOL wpSetRefreshFlags(ULONG ulRefreshFlags);
  48.      virtual BOOL wpPrintPlainTextFile(PPRINTDEST pPrintDest);
  49.      virtual BOOL wpSetTitleAndRenameFile(PSZ pszNewTitle, ULONG fConfirmations);
  50.      virtual ULONG wpConfirmRenameFileWithExt();
  51.      virtual ULONG wpVerifyUpdateAccess();
  52.      virtual BOOL wpAddUserItemsToPopupMenu(HWND hwndMenu, HWND hwndCnr,
  53.                                             ULONG iPosition);
  54.      virtual BOOL wpQueryRealName(PSZ pszFilename, PULONG pcb,
  55.                                   BOOL fQualified);
  56.      virtual void wpUnInitData();
  57.      virtual HOBJECT wpQueryHandle();
  58.      virtual BOOL wpSaveImmediate();
  59.      virtual ULONG wpFilterPopupMenu(ULONG ulFlags, HWND hwndCnr,
  60.                                      BOOL fMultiSelect);
  61.      virtual BOOL wpSetTitle(PSZ pszNewTitle);
  62.      virtual HWND wpViewObject(HWND hwndCnr, ULONG ulView, ULONG param);
  63.      virtual BOOL wpSwitchTo(ULONG View);
  64.      virtual BOOL wpAddSettingsPages(HWND hwndNotebook);
  65. #if defined(WPSREFS)
  66.      virtual WPObject* wpCopyObject(WPFolder& Folder, BOOL fLock);
  67. #else
  68.      virtual WPObject* wpCopyObject(WPFolder* Folder, BOOL fLock);
  69. #endif
  70. #if defined(WPSREFS)
  71.      virtual WPObject* wpCreateFromTemplate(WPFolder& folder,
  72. #else
  73.      virtual WPObject* wpCreateFromTemplate(WPFolder* folder,
  74. #endif
  75.                                             BOOL fLock);
  76. #if defined(WPSREFS)
  77.      virtual BOOL wpMoveObject(WPFolder& Folder);
  78. #else
  79.      virtual BOOL wpMoveObject(WPFolder* Folder);
  80. #endif
  81.      virtual ULONG wpQueryIconData(PICONINFO pIconInfo);
  82.      virtual BOOL wpSetIconData(PICONINFO pIconInfo);
  83.      virtual ULONG wpQueryDetailsData(PVOID* ppDetailsData, PULONG pcp);
  84.      virtual BOOL wpModifyPopupMenu(HWND hwndMenu, HWND hwndCnr,
  85.                                     ULONG iPosition);
  86.      virtual BOOL wpSaveState();
  87.      virtual BOOL wpRestoreState(ULONG ulReserved);
  88.      virtual BOOL wpMenuItemSelected(HWND hwndFrame, ULONG ulMenuId);
  89.      virtual HWND wpOpen(HWND hwndCnr, ULONG ulView, ULONG param);
  90. #if defined(WPSREFS)
  91.      virtual MRESULT wpDraggedOverObject(WPObject& DraggedOverObject);
  92. #else
  93.      virtual MRESULT wpDraggedOverObject(WPObject* DraggedOverObject);
  94. #endif
  95. #if defined(WPSREFS)
  96.      virtual BOOL wpDroppedOnObject(WPObject& DroppedOnObject);
  97. #else
  98.      virtual BOOL wpDroppedOnObject(WPObject* DroppedOnObject);
  99. #endif
  100.      virtual BOOL wpFormatDragItem(PDRAGITEM pdrgItem);
  101.      virtual ULONG wpQueryNameClashOptions(ULONG menuID);
  102. #if defined(WPSREFS)
  103.      virtual BOOL32 wpAppendObject(WPObject& targetObject, BOOL32 fMove);
  104. #else
  105.      virtual BOOL32 wpAppendObject(WPObject* targetObject, BOOL32 fMove);
  106. #endif
  107. #if defined(WPSREFS)
  108.      virtual BOOL32 wpReplaceObject(WPObject& targetObject, BOOL32 fMove);
  109. #else
  110.      virtual BOOL32 wpReplaceObject(WPObject* targetObject, BOOL32 fMove);
  111. #endif
  112.      virtual ULONG wpQueryStyle();
  113.      virtual BOOL wpSetStyle(ULONG ulNewStyle);
  114.      virtual BOOL wpDoesObjectMatch(PVOID pvoidExtendedCriteria);
  115. #pragma pop(use_override_signature)
  116.  
  117.      #pragma SOMReleaseOrder ( \
  118.                               wpSetRealName, \
  119.                               *, \
  120.                               wpSetType, \
  121.                               wpQueryType, \
  122.                               wpSetAttr, \
  123.                               wpQueryAttr, \
  124.                               *, \
  125.                               wpAddFile1Page, \
  126.                               wpAddFile2Page, \
  127.                               wpAddFile3Page, \
  128.                               wpAddFileMenuPage, \
  129.                               wpQueryCreation, \
  130.                               wpQueryLastAccess, \
  131.                               wpQueryLastWrite, \
  132.                               wpQueryFileSize, \
  133.                               wpQueryEASize, \
  134.                               wpSetDateInfo, \
  135.                               wpSetFileSizeInfo, \
  136.                               wpRefresh, \
  137.                               wpPrintPlainTextFile, \
  138.                               wpSetRefreshFlags, \
  139.                               wpQueryRefreshFlags, \
  140.                               *, \
  141.                               wpSetTitleAndRenameFile, \
  142.                               wpConfirmRenameFileWithExt, \
  143.                               *, \
  144.                               *, \
  145.                               *, \
  146.                               *, \
  147.                               *, \
  148.                               *, \
  149.                               wpQueryRealName, \
  150.                               wpVerifyUpdateAccess, \
  151.                               wpAddUserItemsToPopupMenu)
  152. };
  153.  
  154. #pragma pop(som_bindings);
  155. #pragma off(som_bindings);
  156. /* Structure used to read + write the .CLASSINFO ea */
  157.  
  158.   typedef struct _INFOCLASS
  159.   {
  160.      ULONG    flags;
  161.      PSZ      pszClass;
  162.      ULONG    cbObjData;
  163.      POBJDATA pObjData;
  164.   } INFOCLASS;
  165.   typedef INFOCLASS * PINFOCLASS;
  166.  
  167.   /* FILEDETAILS structure used for details view */
  168.  
  169. typedef struct _FILEDETAILS
  170. {
  171.    PSZ      pszRealName;     /* Real name */
  172.    ULONG    ulSize;          /* Size of the file */
  173.    CDATE    cdateLastMod;    /* Last modification date */
  174.    CTIME    ctimeLastMod;    /* Last modification time */
  175.    CDATE    cdateLastAccess; /* Last access date */
  176.    CTIME    ctimeLastAccess; /* Last access time */
  177.    CDATE    cdateCreation;   /* Date of creation */
  178.    CTIME    ctimeCreation;   /* Time of creation */
  179.    ULONG    ulFlags;         /* File flags */
  180. }  FILEDETAILS;
  181.  
  182. typedef FILEDETAILS * PFILEDETAILS;
  183.  
  184. #define NUM_FILEDETAILS_FIELDS    9     /* Count of fields in FILEDETAILS */
  185.  
  186.   /* format of the extended search criteria for this class */
  187.   typedef struct _FILESYS_SEARCH_INFO {
  188.      USHORT Exclude;
  189.      USHORT MustHave;
  190.  
  191.      BOOL   fIncludeLMD;
  192.      USHORT LMDyear;
  193.      USHORT LMDmonth;
  194.      USHORT LMDday;
  195.       SHORT LMDcriteria;
  196.  
  197.      BOOL   fIncludeLMT;
  198.      USHORT LMThours;
  199.      USHORT LMTminutes;
  200.      USHORT LMTseconds;
  201.       SHORT LMTcriteria;
  202.  
  203.      BOOL   fIncludeFDS;
  204.      ULONG  FDSsize;
  205.      SHORT  FDScriteria;
  206.  
  207.      BOOL   fIncludeFEAS;
  208.      ULONG  FEASsize;
  209.      SHORT  FEAScriteria;
  210.  
  211.      BOOL   fMustHaveNeedEA;
  212.      BOOL   fMustNotHaveNeedEA;
  213.      } FILESYS_SEARCH_INFO;
  214.      typedef FILESYS_SEARCH_INFO *PFILESYS_SEARCH_INFO;
  215.  
  216.  
  217.   /* Alignment macro: ensure alignment on 4byte boundary */
  218.  
  219.   #define ALIGN4(p) (PVOID)( ( ((ULONG)p) + 3 ) & 0xFFFFFFFC )
  220.  
  221.   /* return values for wpConfirmRenameFileWithExt */
  222.   #define KEEP_RENAMEFILESWITHEXT     1
  223.   #define DISCARD_RENAMEFILESWITHEXT  2
  224.   #define CANCEL_RENAMEFILESWITHEXT   3
  225.  
  226. #pragma pop(som_bindings);
  227. #pragma pop(som_bindings);
  228.  
  229. #pragma pop(dts_class);
  230. #pragma pop(somobject_assignment_operators);
  231. #pragma pop(somobject_constructors);
  232. #pragma pop(somobject_destructor);
  233. #pragma pop(case_insensitive_class_names);
  234. #endif /* WPFileSystem_Source */
  235.  
  236.  
  237. #ifndef M_WPFileSystem_Source
  238. #define M_WPFileSystem_Source
  239.  
  240. #include <wpobject.hh>
  241. #include <somcls.hh>
  242. #pragma off(dts_class);
  243. #pragma on(somobject_assignment_operators);
  244. #pragma on(somobject_constructors);
  245. #pragma on(somobject_destructor);
  246. #pragma off(case_insensitive_class_names);
  247.  
  248. #pragma on(som_bindings);
  249. class M_WPFileSystem : public M_WPObject {
  250.  
  251.      #pragma SOMClassVersion (M_WPFileSystem, 1, 2)
  252.  
  253.      #pragma SOMCallstyle (M_WPFileSystem, oidl)
  254.  
  255.      #pragma off(som_bindings);
  256.      #pragma pop(som_bindings);
  257.   public:
  258.  
  259. #pragma off(use_override_signature)
  260.      virtual WPObject* wpclsQueryObjectFromPath(PSZ pszFQPath);
  261.      virtual PSZ wpclsQueryInstanceType();
  262.      virtual PSZ wpclsQueryInstanceFilter();
  263.      virtual void wpclsInitData();
  264.      virtual PSZ wpclsQueryTitle();
  265.      virtual ULONG wpclsQueryDetailsInfo(PCLASSFIELDINFO* ppClassFieldInfo,
  266.                                          PULONG pSize);
  267. #if defined(WPSREFS)
  268.      virtual void wpclsQuerySearchInfo(M_WPObject*& ClassExtended,
  269. #else
  270.      virtual void wpclsQuerySearchInfo(M_WPObject** ClassExtended,
  271. #endif
  272. #if defined(WPSREFS)
  273.                                        M_WPObject*& ClassCreate,
  274. #else
  275.                                        M_WPObject** ClassCreate,
  276. #endif
  277.                                        PULONG pulClassCriteriaSize);
  278.      virtual BOOL wpclsQueryExtendedCriteria(PSZ pszName, ULONG ulSearchType,
  279.                                              PVOID pvoidExtendedCriteria);
  280. #pragma pop(use_override_signature)
  281.  
  282.      #pragma SOMReleaseOrder ( \
  283.                               wpclsQueryInstanceType, \
  284.                               wpclsQueryInstanceFilter, \
  285.                               wpclsQueryObjectFromPath)
  286. };
  287. #pragma pop(som_bindings);
  288.  
  289. #pragma pop(dts_class);
  290. #pragma pop(somobject_assignment_operators);
  291. #pragma pop(somobject_constructors);
  292. #pragma pop(somobject_destructor);
  293. #pragma pop(case_insensitive_class_names);
  294. #endif /* M_WPFileSystem_Source */
  295.  
  296.