home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / replfilt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  5.0 KB  |  192 lines

  1. /****************************************************************************
  2. *                                                                           *
  3. * replfilt.h -- Pegasus filter procedure declarations, structures,          *
  4. *               constant definitions and macros                             *
  5. *                                                                           *
  6. * Copyright (c) 1995-1996, Microsoft Corp. All rights reserved.             *
  7. *                                                                           *
  8. ****************************************************************************/
  9.  
  10. // {6C5C05E0-97A2-11cf-8011-00A0C90A8F78}
  11. DEFINE_GUID(IID_ICeFileFilterSite, 
  12. 0x6c5c05e0, 0x97a2, 0x11cf, 0x80, 0x11, 0x0, 0xa0, 0xc9, 0xa, 0x8f, 0x78);
  13. // {6C5C05E1-97A2-11cf-8011-00A0C90A8F78}
  14. DEFINE_GUID(IID_ICeFileFilter, 
  15. 0x6c5c05e1, 0x97a2, 0x11cf, 0x80, 0x11, 0x0, 0xa0, 0xc9, 0xa, 0x8f, 0x78);
  16. // {6C5C05E2-97A2-11cf-8011-00A0C90A8F78}
  17. DEFINE_GUID(IID_ICeFileFilterOptions, 
  18. 0x6c5c05e2, 0x97a2, 0x11cf, 0x80, 0x11, 0x0, 0xa0, 0xc9, 0xa, 0x8f, 0x78);
  19.  
  20. #ifndef _REPLFILT_
  21. #define _REPLFILT_
  22.  
  23. #ifndef _MAX_FNAME
  24. #define _MAX_FNAME     256     /* max. length of file name component */
  25. #endif
  26.  
  27. #ifndef _MAX_EXT
  28. #define _MAX_EXT       256     /* max. length of extension component */
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif /* __cplusplus */
  34.  
  35. typedef LONG CF_ERROR;
  36.  
  37. #define HRESULT_TO_CFERROR(_hr, _def) \
  38.     (SUCCEEDED(_hr) ? ERROR_SUCCESS : (HRESULT_FACILITY(_hr)==FACILITY_WIN32 ? HRESULT_CODE(_hr) : (_def)))
  39.  
  40. //
  41. // ICeFileFilterSite interface provided by Windows CE Services
  42. //
  43. #undef  INTERFACE
  44. #define INTERFACE   ICeFileFilterSite
  45.  
  46. DECLARE_INTERFACE_(ICeFileFilterSite, IUnknown)
  47. {
  48.     // *** IUnknown methods ***
  49.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  50.     STDMETHOD_(ULONG, AddRef) (THIS)  PURE;
  51.     STDMETHOD_(ULONG, Release) (THIS) PURE;
  52.  
  53.     // *** ICeFileFilterSite methods ***
  54.     STDMETHOD(OpenSourceFile) (THIS_
  55.         int nHowToOpenFile,
  56.         LPVOID *ppObj
  57.     ) PURE; 
  58.     STDMETHOD(OpenDestinationFile) (THIS_
  59.         int nHowToOpenFile,
  60.         LPCTSTR pszFullpath,
  61.         LPVOID *ppObj
  62.     ) PURE; 
  63.     STDMETHOD(CloseSourceFile) (THIS_
  64.         LPUNKNOWN pObj
  65.     ) PURE; 
  66.     STDMETHOD(CloseDestinationFile) (THIS_
  67.         BOOL bKeepFile,
  68.         LPUNKNOWN pObj
  69.     ) PURE; 
  70.     STDMETHOD(ReportProgress) (THIS_
  71.         UINT nPercent
  72.     ) PURE; 
  73.     STDMETHOD(ReportLoss) (THIS_
  74.         DWORD dw,
  75.         LPCTSTR psz,
  76.         va_list args
  77.     ) PURE; 
  78. };
  79.  
  80.  
  81. //
  82. // Structures passed to ICeFileFilter methods
  83. //
  84. typedef struct tagCFF_CONVERTINFO
  85. {
  86.     BOOL bImport;
  87.     HWND hwndParent;
  88.     BOOL bYesToAll;
  89.     ICeFileFilterSite *pffs;
  90. } CFF_CONVERTINFO; 
  91.  
  92. typedef struct tagCFF_DESTINATIONFILE
  93. {
  94.     TCHAR szFullpath[_MAX_PATH];
  95.     TCHAR szPath[_MAX_PATH];
  96.     TCHAR szFilename[_MAX_FNAME];
  97.     TCHAR szExtension[_MAX_EXT];
  98. } CFF_DESTINATIONFILE; 
  99.  
  100. typedef struct tagCFF_SOURCEFILE
  101. {
  102.     TCHAR szFullpath[_MAX_PATH];
  103.     TCHAR szPath[_MAX_PATH];
  104.     TCHAR szFilename[_MAX_FNAME];
  105.     TCHAR szExtension[_MAX_EXT];
  106.     DWORD cbSize;
  107.     FILETIME ftCreated;
  108.     FILETIME ftModified;
  109. } CFF_SOURCEFILE; 
  110.  
  111.  
  112. //
  113. // ICeFileFilter interface to be implemented by a file filter
  114. //
  115. #undef  INTERFACE
  116. #define INTERFACE   ICeFileFilter
  117.  
  118. DECLARE_INTERFACE_(ICeFileFilter, IUnknown)
  119. {
  120.     // *** IUnknown methods ***
  121.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  122.     STDMETHOD_(ULONG, AddRef) (THIS)  PURE;
  123.     STDMETHOD_(ULONG, Release) (THIS) PURE;
  124.  
  125.     // *** ICeFileFilter methods ***
  126.     STDMETHOD(NextConvertFile) (THIS_
  127.         int nConversion,
  128.         CFF_CONVERTINFO* pci,
  129.         CFF_SOURCEFILE* psf,
  130.         CFF_DESTINATIONFILE* pdf,
  131.         volatile BOOL *pbCancel,
  132.         CF_ERROR *perr
  133.     ) PURE;
  134.     STDMETHOD(FilterOptions) (THIS_
  135.         HWND hwndParent
  136.     ) PURE; 
  137.     STDMETHOD(FormatMessage) (THIS_
  138.         DWORD  dwFlags,
  139.         DWORD  dwMessageId,
  140.         DWORD  dwLanguageId,
  141.         LPTSTR  lpBuffer,
  142.         DWORD  nSize,
  143.         va_list *  Arguments,
  144.         DWORD  *pcb
  145.     ) PURE;
  146. };
  147.  
  148.  
  149. /*
  150.  * Flags for how to open files
  151.  */
  152. #define CF_OPENFLAT      0
  153. #define CF_OPENCOMPOUND  1
  154. #define CF_OPENDONT      2
  155. #define CF_OPENASKMEHOW  3
  156.  
  157. //
  158. // Structures passed to ICeFileFilterOptions methods
  159. //
  160. typedef struct tagCFF_CONVERTOPTIONS
  161. {
  162.     ULONG   cbSize;
  163.     BOOL    bNoModalUI;
  164. } CFF_CONVERTOPTIONS; 
  165.  
  166.  
  167. //
  168. // ICeFileFilterOptions interface to be implemented by a v2 file filter
  169. //
  170. #undef  INTERFACE
  171. #define INTERFACE   ICeFileFilterOptions
  172.  
  173. DECLARE_INTERFACE_(ICeFileFilterOptions, IUnknown)
  174. {
  175.     // *** IUnknown methods ***
  176.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  177.     STDMETHOD_(ULONG, AddRef) (THIS)  PURE;
  178.     STDMETHOD_(ULONG, Release) (THIS) PURE;
  179.  
  180.     // *** ICeFileFilterOptions methods ***
  181.     STDMETHOD(SetFilterOptions) (THIS_
  182.         CFF_CONVERTOPTIONS* pco
  183.     ) PURE; 
  184. };
  185.  
  186. #ifdef __cplusplus
  187. }
  188. #endif  /* __cplusplus */
  189.  
  190. #include <CeFltMap.h>
  191. #endif /* !_REPLFILT_ */
  192.