1 // ---------------------------------------------------------------------------- 2 // MODULE : FileFlashPixView 3 // LANGUAGE : C++ 4 // CREATOR : Philippe BOSSUT 5 // CREAT. DATE : Thursday, April 4, 1996 6 // DESCRIPTION : 7 // COMMENTS : 8 // SCCSID : @(#)f_fpxvw.h 1.4 12:47:17 01 Jul 1997 9 // ---------------------------------------------------------------------------- 10 // Copyright (c) 1999 Digital Imaging Group, Inc. 11 // For conditions of distribution and use, see copyright notice 12 // in Flashpix.h 13 // ---------------------------------------------------------------------------- 14 #ifndef FileFlashPixView_h 15 #define FileFlashPixView_h 16 #ifndef Commun_h 17 #include "common.h" 18 #endif 19 // ---------------------------------------------------------------------------- 20 21 // Includes 22 // -------- 23 24 #ifndef PImageFile_h 25 #include "pimgfile.h" 26 #endif 27 #ifndef Fichier_h 28 #include "a_file.h" // just for Mode 29 #endif 30 #ifndef FPXBaselineIO_h 31 #include "fpxlibio.h" 32 #endif 33 34 #ifdef macintosh 35 #ifndef OLECommun_h 36 #include "olecomm.h" 37 #endif 38 #endif //macintosh 39 40 class OLEFile; // to not include OLEFiles.h 41 class OLEStorage; // to not include OLEStorages.h 42 class OLEStream; // to not include OLEStreams.h 43 class OLEPropertySet; // to not include OLEPropertySet.h 44 class OLEPropertySection; // to not include OLEPropertySet.h 45 class OLEProperty; // to not include OLEProperties.h 46 #ifdef _WINDOWS 47 #ifndef GUID_DEFINED 48 #define GUID_DEFINED 49 typedef struct _GUID 50 { 51 unsigned long Data1; 52 unsigned short Data2; 53 unsigned short Data3; 54 unsigned char Data4[8]; 55 } GUID; 56 #endif /* GUID_DEFINED */ 57 typedef GUID CLSID; 58 #ifndef DWORD 59 #define DWORD unsigned long 60 #define DWORD_LOCAL_DEFINE 61 #endif //DWORD 62 #endif // _WINDOWS 63 // Constants 64 // --------- 65 66 // Types Declarations 67 // ------------------ 68 69 // Types Definitions 70 // ----------------- 71 72 // Classes Declarations 73 // -------------------- 74 75 class PFileFlashPixView; 76 77 // Classes Definitions 78 // ------------------- 79 80 // File handle 81 82 class PFileFlashPixView : public PImageFile { 83 84 friend class PFlashPixImageView; 85 86 public: 87 // CHG_VIS_OUT - added an optional argument that allows a visible 88 // output index to be specified. Normally, this is 0, which is 89 // correct for a core file that contains a single image. 90 PFileFlashPixView (FicNom& fName, const char* theStorageName, 91 mode_Ouverture mode, unsigned int visibleOutputIndex = 0); 92 PFileFlashPixView (OLEStorage* theOwningStorage, const char* theStorageName, 93 mode_Ouverture mode, unsigned int visibleOutputIndex = 0); 94 ~PFileFlashPixView (); 95 96 void Init (); 97 98 Boolean OpenStorage (CLSID& classID, const char * name, OLEStorage ** res); 99 Boolean CreateStorage(CLSID& classID, const char * name, OLEStorage ** res); 100 101 FPXStatus Erreur() const; // Result of last action on the file 102 Boolean Commit(); 103 FPXStatus getStatus(); // { return oleFile->getFPXStatus(); }; 104 105 106 // Create CompObj in root storage 107 Boolean CreateCompObj(); 108 109 // Read and write CompObj in root storage 110 Boolean ReadCompObj(char **ppUserType, char **ppClipFormat); 111 Boolean WriteCompObj(char *pUserType, char *pClipFormat); 112 113 Boolean GetSummaryInfoProperty (DWORD pID, OLEProperty ** res); 114 Boolean SetSummaryInfoProperty (DWORD pID, DWORD propType, OLEProperty ** res); 115 Boolean GetGlobalInfoProperty (DWORD pID, OLEProperty ** res); 116 Boolean SetGlobalInfoProperty (DWORD pID, DWORD propType, OLEProperty ** res); 117 Boolean GetResultDescProperty (DWORD pID, OLEProperty ** res); 118 Boolean SetResultDescProperty (DWORD pID, DWORD propType, OLEProperty ** res); 119 Boolean GetSourceDescProperty (DWORD pID, OLEProperty ** res); 120 Boolean SetSourceDescProperty (DWORD pID, DWORD propType, OLEProperty ** res); 121 Boolean GetOperationProperty (DWORD pID, OLEProperty ** res); 122 Boolean SetOperationProperty (DWORD pID, DWORD propType, OLEProperty ** res); 123 Boolean GetTransformProperty (DWORD pID, OLEProperty ** res); 124 Boolean SetTransformProperty (DWORD pID, DWORD propType, OLEProperty ** res); 125 Boolean GetExtensionProperty (DWORD pID, OLEProperty ** res); 126 Boolean SetExtensionProperty (DWORD pID, DWORD propType, OLEProperty ** res); 127 128 Boolean GetExtensionNumber (LPWSTR theExtensionName, short *extNumber); 129 Boolean SetExtensionNumber (short *extNumber); 130 Boolean Renew( short **ppa, short newEntry, short newSize); 131 132 Boolean InitSummaryInfoPropertySet(); 133 Boolean GetSummaryInfoPropertySet(); 134 GetRootStorage()135 OLEStorage* GetRootStorage() { return rootStorage; } 136 isReadOnly()137 Boolean isReadOnly() { return readOnlyMode; } 138 139 // PTCH_OBJFIX - added method to return the index of the Source Description Data 140 // object. This is also the index of the data storage containing the image data. GetSourceDescNumber()141 unsigned int GetSourceDescNumber() { return sourceDescPropertyIndex; } 142 143 protected: 144 OLEFile* oleFile; // the OLE file handle... 145 Boolean readOnlyMode; 146 147 148 virtual FPXStatus GetError(); 149 150 private : 151 DWORD mode; // Open Access Mode to the OLE file 152 //OLEFile* oleFile; // the OLE file handle... 153 154 OLEStorage * parentStorage; // ... or the parent storage handle 155 OLEStorage * rootStorage; // the OLE root storage handle 156 157 OLEPropertySet* summaryInfoPropertySet; // Summary Info property set handle 158 159 OLEStream* compObj; // The CompObj stream 160 161 OLEPropertySet* globalInfoPropertySet; // Global Info property set handle 162 unsigned int visibleOutputIndex; // Which elem in Vis output is display image 163 164 OLEPropertySet* resultDescPropertySet; // Result Description property set handle 165 unsigned int resultDescPropertyIndex;// Index number used to form it's name; 166 167 OLEPropertySet* sourceDescPropertySet; // Source Description property set handle 168 unsigned int sourceDescPropertyIndex;// Index number used to form it's name; 169 170 OLEPropertySet* transformPropertySet; // Transform property set handle 171 unsigned int transformPropertyIndex; // Index number used to form it's name; 172 173 OLEPropertySet* operationPropertySet; // Operation property set handle 174 unsigned int operationPropertyIndex; // Index number used to form it's name; 175 176 OLEPropertySet* extensionListPropertySet;// Extension list property set handle 177 FPXShortArray fpxExtensionList; // Extension list number array 178 }; 179 180 #ifdef _WINDOWS 181 #ifdef DWORD_LOCAL_DEFINE 182 #undef DWORD 183 #endif // DWORD_LOCAL_DEFINE 184 #endif 185 // 'inline' Functions 186 // ------------------ 187 188 // 'extern' Functions 189 // ------------------ 190 191 // 'extern' Variables 192 // ------------------ 193 194 // ---------------------------------------------------------------------------- 195 #endif // FileFlashPixView_h 196 // ---------------------------------------------------------------------------- 197