[Igarden-commit] Garden/source/Plugins Plugin.h,1.7,1.8
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2007-02-22 05:05:54
|
Update of /cvsroot/igarden/Garden/source/Plugins In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv14924 Modified Files: Plugin.h Log Message: Win32 changes Index: Plugin.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/Plugin.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Plugin.h 15 Oct 2006 01:10:46 -0000 1.7 --- Plugin.h 22 Feb 2007 05:05:50 -0000 1.8 *************** *** 1,16 **** //*********************************************************************************************** // ! // The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at // http://www.mozilla.org/MPL/ ! // ! // Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ! // ANY KIND, either express or implied. See the License for the specific language governing rights and // limitations under the License. ! // // The Original Code is GardenWorks plugin interface. ! // // The Initial Developer of the Original Code is Redstart Software. // Portions created by Initial Developer are Copyright (C) 2004 Redstart Software. All Rights Reserved. ! // // Contributor(s): // Jeffrey Bedell(je...@re...) --- 1,16 ---- //*********************************************************************************************** // ! // The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at // http://www.mozilla.org/MPL/ ! // ! // Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ! // ANY KIND, either express or implied. See the License for the specific language governing rights and // limitations under the License. ! // // The Original Code is GardenWorks plugin interface. ! // // The Initial Developer of the Original Code is Redstart Software. // Portions created by Initial Developer are Copyright (C) 2004 Redstart Software. All Rights Reserved. ! // // Contributor(s): // Jeffrey Bedell(je...@re...) *************** *** 35,44 **** #define EqualGUID(uid1, uid2) CFEqual(uid1, uid2) #else - #define S_OK 0 - #define STDMETHODCALLTYPE - #define REFIID GUID & #define CFUUIDCreateFromUUIDBytes(ptr, iid) iid - #define E_NOINTERFACE 0x80000004 - #define E_FAIL 0x80000008 #define ReleaseGUID(uid) #define EqualGUID(uid1, uid2) (memcmp(&uid1, &uid2, sizeof(uid1)) == 0) --- 35,39 ---- *************** *** 46,49 **** --- 41,51 ---- #define FAILED(Status) ((HRESULT)(Status)<0) + #if !OPT_WINOS + #define REFIID GUID & + #define S_OK 0 + #define STDMETHODCALLTYPE + #define E_NOINTERFACE 0x80000004 + #define E_FAIL 0x80000008 + typedef uint32 HRESULT; typedef uint32 ULONG; *************** *** 52,72 **** typedef unsigned short WORD; typedef unsigned char BYTE; typedef void* CFAllocatorRef; typedef struct { ! uint8 bytes[16]; ! // DWORD Data1; ! // WORD Data2; ! // WORD Data3; ! // BYTE Data4[8]; } GUID; typedef GUID CFUUIDRef; typedef void *CFPlugInRef; ! REFIID CFUUIDGetUUIDBytes(CFUUIDRef ref) { return ref; } ! CFUUIDRef CFUUIDGetConstantUUIDWithBytes(void *, uint8 byte0, uint8 byte1, uint8 byte2, uint8 byte3, uint8 byte4, uint8 byte5, uint8 byte6, uint8 byte7, uint8 byte8, uint8 byte9, uint8 byte10, uint8 byte11, --- 54,77 ---- typedef unsigned short WORD; typedef unsigned char BYTE; + #endif typedef void* CFAllocatorRef; + #if !OPT_WINOS typedef struct { ! // uint8 bytes[16]; ! DWORD Data1; ! WORD Data2; ! WORD Data3; ! BYTE Data4[8]; } GUID; + #endif typedef GUID CFUUIDRef; typedef void *CFPlugInRef; ! inline REFIID CFUUIDGetUUIDBytes(CFUUIDRef ref) { return ref; } ! inline CFUUIDRef CFUUIDGetConstantUUIDWithBytes(void *, uint8 byte0, uint8 byte1, uint8 byte2, uint8 byte3, uint8 byte4, uint8 byte5, uint8 byte6, uint8 byte7, uint8 byte8, uint8 byte9, uint8 byte10, uint8 byte11, *************** *** 74,82 **** { CFUUIDRef result; ! ! result.bytes[0] = byte0; result.bytes[1] = byte1; result.bytes[2] = byte2; result.bytes[3] = byte3; ! result.bytes[4] = byte4; result.bytes[5] = byte5; result.bytes[6] = byte6; result.bytes[7] = byte7; ! result.bytes[8] = byte8; result.bytes[9] = byte9; result.bytes[10] = byte10; result.bytes[11] = byte11; ! result.bytes[12] = byte12; result.bytes[13] = byte13; result.bytes[14] = byte14; result.bytes[15] = byte15; return result; } --- 79,88 ---- { CFUUIDRef result; ! ! result.Data1 = (byte0<<24L) | (byte1<<16L) | (byte2<<8L) | byte3; ! result.Data2 = (byte4<<8L) | byte5; ! result.Data3 = (byte6<<8L) | byte7; ! result.Data4[0] = byte8; result.Data4[1] = byte9; result.Data4[2] = byte10; result.Data4[3] = byte11; ! result.Data4[4] = byte12; result.Data4[5] = byte13; result.Data4[6] = byte14; result.Data4[7] = byte15; return result; } *************** *** 84,87 **** --- 90,94 ---- #define IUnknownUUID CFUUIDGetConstantUUIDWithBytes(NULL, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) + #if !OPT_WINOS struct IUnknown { *************** *** 90,93 **** --- 97,101 ---- virtual ULONG Release(void) = 0; }; + #endif // #include "ref.hxx" *************** *** 111,115 **** virtual void GetManufacturerName(String& buf) = 0; virtual void GetLongDescription(String& desc) = 0; ! protected: private: --- 119,123 ---- virtual void GetManufacturerName(String& buf) = 0; virtual void GetLongDescription(String& desc) = 0; ! protected: private: |