GME
13
|
00001 import "oaidl.idl"; 00002 import "ocidl.idl"; 00003 00004 #include "InterfaceColl.h" 00005 #include "InterfaceVersion.h" 00006 00007 // --------------------------- Core IDL 00008 00009 // ------- Typedefs 00010 00011 typedef short metaid_type; 00012 typedef long objid_type; 00013 typedef short attrid_type; 00014 typedef unsigned char valtype_type; 00015 typedef unsigned char locking_type; 00016 typedef short lockval_type; 00017 typedef VARIANT guid_type; // guid(0 To 15) As Byte 00018 00019 interface ICoreMetaProject; 00020 interface ICoreMetaObject; 00021 interface ICoreMetaObjects; 00022 interface ICoreMetaAttribute; 00023 interface ICoreMetaAttributes; 00024 interface ICoreProject; 00025 interface ICoreObject; 00026 interface ICoreObjects; 00027 interface ICoreAttribute; 00028 interface ICoreAttributes; 00029 interface ICoreTerritory; 00030 00031 // ------- Consts 00032 00033 const metaid_type METAID_NONE = 0; 00034 const metaid_type METAID_ROOT = 1; 00035 00036 const objid_type OBJID_NONE = 0; 00037 const objid_type OBJID_ROOT = 1; 00038 00039 const attrid_type ATTRID_NONE = 0; 00040 const attrid_type ATTRID_LOCK = 1; 00041 const attrid_type ATTRID_NAME = 2; 00042 const attrid_type ATTRID_FATHER = 3; 00043 const attrid_type ATTRID_COLLECTION = 10000; 00044 00045 // ------- Enums 00046 00047 typedef enum locking_enum 00048 { 00049 [helpstring("No access, unlimited access for other CoreProjects")] 00050 LOCKING_NONE = 0, 00051 00052 [helpstring("Read access, only read access for other CoreProjects")] 00053 LOCKING_READ = 1, 00054 00055 [helpstring("Write access, only write access for other CoreProjects")] 00056 LOCKING_WRITE = 2, 00057 00058 [helpstring("Exclusive access, no access for other CoreProjects")] 00059 LOCKING_EXCLUSIVE = 3 00060 } locking_enum; 00061 00062 typedef enum valtype_enum 00063 { 00064 [helpstring("No value type")] 00065 VALTYPE_NONE = 0, 00066 00067 [helpstring("Collection")] 00068 VALTYPE_COLLECTION = 1, 00069 00070 [helpstring("Pointer")] 00071 VALTYPE_POINTER = 2, 00072 00073 [helpstring("Lock value type, for access negotiation")] 00074 VALTYPE_LOCK = 3, 00075 00076 [helpstring("Long (32 bit)")] 00077 VALTYPE_LONG = 4, 00078 00079 [helpstring("String")] 00080 VALTYPE_STRING = 5, 00081 00082 [helpstring("Binary")] 00083 VALTYPE_BINARY = 6, 00084 00085 [helpstring("Real (double precision)")] 00086 VALTYPE_REAL = 7, 00087 00088 VALTYPE_DICT = 8, 00089 [helpstring("Last value type")] 00090 VALTYPE_MAX = 8, 00091 } valtype_enum; 00092 00093 typedef enum transtype_enum 00094 { 00095 [helpstring("None")] 00096 TRANSTYPE_NONE = 0, 00097 00098 [helpstring("First")] 00099 TRANSTYPE_FIRST = 1, 00100 00101 [helpstring("Nested")] 00102 TRANSTYPE_NESTED = 2, 00103 00104 [helpstring("First or Nested")] 00105 TRANSTYPE_ANY = 3, 00106 00107 [helpstring("Read")] 00108 TRANSTYPE_READ = 4, 00109 00110 [helpstring("Read First")] 00111 TRANSTYPE_READFIRST = 5, 00112 00113 [helpstring("Read Nested")] 00114 TRANSTYPE_READNESTED = 6, 00115 00116 [helpstring("Read First or Nested")] 00117 TRANSTYPE_READANY = 7 00118 } transtype_enum; 00119 00120 // ------- Meta 00121 00122 [ 00123 object, 00124 uuid(98AA02D9-2E2C-11D3-B36D-0060082DF884), 00125 dual, 00126 helpstring("ICoreMetaProject Interface"), 00127 pointer_default(unique) 00128 ] 00129 interface ICoreMetaProject : IDispatch 00130 { 00131 [propget, helpstring("property GUID")] 00132 HRESULT GUID([out, retval] guid_type *p); 00133 00134 [propput, helpstring("property GUID")] 00135 HRESULT GUID([in] guid_type p); 00136 00137 // proper token 00138 [propget, helpstring("property Token")] 00139 HRESULT Token([out, retval] BSTR *p); 00140 00141 [propput, helpstring("property Token")] 00142 HRESULT Token([in] BSTR p); 00143 00144 [propget, helpstring("property Name")] 00145 HRESULT Name([out, retval] BSTR *p); 00146 00147 [propput, helpstring("property Name")] 00148 HRESULT Name([in] BSTR p); 00149 00150 [propget, id(DISPID_VALUE), helpstring("property Object")] 00151 HRESULT Object([in] metaid_type metaid, [out, retval] ICoreMetaObject **p); 00152 00153 [helpstring("getter for property Object")] 00154 HRESULT GetObjectDisp([in] metaid_type metaid, [out, retval] ICoreMetaObject **p); 00155 00156 [propget, helpstring("property Objects")] 00157 HRESULT Objects([out, retval] ICoreMetaObjects **p); 00158 00159 [helpstring("method AddObject")] 00160 HRESULT AddObject([in] metaid_type metaid, [in] BSTR token, 00161 [in] BSTR name, [out] ICoreMetaObject **p); 00162 }; 00163 00164 [ 00165 object, 00166 uuid(98AA02DB-2E2C-11D3-B36D-0060082DF884), 00167 dual, 00168 helpstring("ICoreMetaObject Interface"), 00169 pointer_default(unique) 00170 ] 00171 interface ICoreMetaObject : IDispatch 00172 { 00173 [propget, helpstring("property Project")] 00174 HRESULT Project([out, retval] ICoreMetaProject **p); 00175 00176 // unique in project 00177 [propget, helpstring("property MetaID")] 00178 HRESULT MetaID([out, retval] metaid_type *p); 00179 00180 // proper token 00181 [propget, helpstring("property Token")] 00182 HRESULT Token([out, retval] BSTR *p); 00183 00184 [propget, helpstring("property Name")] 00185 HRESULT Name([out, retval] BSTR *p); 00186 00187 [propget, id(DISPID_VALUE), helpstring("property Attribute")] 00188 HRESULT Attribute([in] attrid_type attrid, [out, retval] ICoreMetaAttribute **p); 00189 00190 [helpstring("getter for property Attribute")] 00191 HRESULT GetAttributeDisp([in] attrid_type attrid, [out, retval] ICoreMetaAttribute **p); 00192 00193 [propget, helpstring("property Attributes")] 00194 HRESULT Attributes([out, retval] ICoreMetaAttributes **p); 00195 00196 [propget, helpstring("property ClassIDs")] 00197 HRESULT ClassIDs([out, retval] SAFEARRAY(guid_type) *p); 00198 00199 // p might be NULL 00200 [helpstring("property AddAttribute")] 00201 HRESULT AddAttribute([in] attrid_type attrid, [in] BSTR token, 00202 [in] BSTR name, [in] valtype_type valtype, 00203 [out] ICoreMetaAttribute **p); 00204 00205 [helpstring("property AddClassID")] 00206 HRESULT AddClassID([in] guid_type classid); 00207 }; 00208 00209 [ 00210 object, 00211 uuid(98AA02E1-2E2C-11D3-B36D-0060082DF884), 00212 dual, 00213 helpstring("ICoreMetaAttribute Interface"), 00214 pointer_default(unique) 00215 ] 00216 interface ICoreMetaAttribute : IDispatch 00217 { 00218 [propget, helpstring("property Object")] 00219 HRESULT Object([out, retval] ICoreMetaObject **p); 00220 00221 // unique in object, must return the valid attrid and S_OK 00222 [propget, helpstring("property AttrID")] 00223 HRESULT AttrID([out, retval] attrid_type *p); 00224 00225 // proper token 00226 [propget, helpstring("property Token")] 00227 HRESULT Token([out, retval] BSTR *p); 00228 00229 [propget, helpstring("property Name")] 00230 HRESULT Name([out, retval] BSTR *p); 00231 00232 [propget, helpstring("property ValueType")] 00233 HRESULT ValueType([out, retval] valtype_type *p); 00234 00235 [propget, helpstring("property LockAttrID")] 00236 HRESULT LockAttrID([out, retval] attrid_type *p); 00237 00238 [propget, helpstring("property MaxSize")] 00239 HRESULT MaxSize([out, retval] long *p); 00240 }; 00241 00242 // ------- Core 00243 00244 [ 00245 object, 00246 uuid(AD9DFA4E-3A3B-11D3-B36C-0060082DF884), 00247 dual, 00248 helpstring("ICoreStorage Interface"), 00249 pointer_default(unique) 00250 ] 00251 interface ICoreStorage : IDispatch 00252 { 00253 // --- MetaProject 00254 00255 [propget, helpstring("property MetaProject")] 00256 HRESULT MetaProject([out, retval] ICoreMetaProject **p); 00257 00258 [propput, helpstring("property MetaProject")] 00259 HRESULT MetaProject([in] ICoreMetaProject *p); 00260 00261 // 0x0001 SERIAL 00262 [propget, helpstring("property StorageType")] 00263 HRESULT StorageType([out, retval] long *p); 00264 00265 // --- MetaObejct 00266 00267 [propget, helpstring("property MetaObject")] 00268 HRESULT MetaObject([out, retval] ICoreMetaObject **p); 00269 00270 // slow, use MetaID 00271 [propput, helpstring("property MetaObject")] 00272 HRESULT MetaObject([in] ICoreMetaObject *p); 00273 00274 [propget, helpstring("property MetaID")] 00275 HRESULT MetaID([out, retval] metaid_type *p); 00276 00277 [propput, helpstring("property MetaID")] 00278 HRESULT MetaID([in] metaid_type p); 00279 00280 // --- MetaAttribute 00281 00282 [propget, helpstring("property MetaAttribute")] 00283 HRESULT MetaAttribute([out, retval] ICoreMetaAttribute **p); 00284 00285 // slow, use AttrID 00286 [propput, helpstring("property MetaAttribute")] 00287 HRESULT MetaAttribute([in] ICoreMetaAttribute *p); 00288 00289 [propget, helpstring("property AttrID")] 00290 HRESULT AttrID([out, retval] attrid_type *p); 00291 00292 [propput, helpstring("property AttrID")] 00293 HRESULT AttrID([in] attrid_type p); 00294 00295 // --- Project 00296 00297 [helpstring("method OpenProject, if ro_mode is not NULL, itt will receive the read_only status")] 00298 HRESULT OpenProject([in] BSTR connection, [out] VARIANT_BOOL *ro_mode); 00299 00300 [helpstring("method CloseProject, will not save data if abort is set")] 00301 HRESULT CloseProject([in] VARIANT_BOOL abort); 00302 00303 [helpstring("method SaveProject, save_as_conn, if not empty specifies new name")] 00304 HRESULT SaveProject([in] BSTR save_as_conn, [in, defaultvalue(0)] VARIANT_BOOL keepoldname); 00305 00306 [helpstring("method CreateProject")] 00307 HRESULT CreateProject([in] BSTR connection); 00308 00309 [helpstring("method DeleteProject")] 00310 HRESULT DeleteProject(); 00311 00312 [helpstring("method BeginTransaction")] 00313 HRESULT BeginTransaction(); 00314 00315 // if fails, call it again or call abort 00316 [helpstring("method CommitTransaction")] 00317 HRESULT CommitTransaction(); 00318 00319 [helpstring("method AbortTransaction")] 00320 HRESULT AbortTransaction(); 00321 00322 // --- Object 00323 00324 [helpstring("method OpenObject")] 00325 HRESULT OpenObject([in] objid_type ObjID); 00326 00327 [helpstring("method CloseObject")] 00328 HRESULT CloseObject(); 00329 00330 [helpstring("method CreateObject")] 00331 HRESULT CreateObject([out] objid_type *ObjID); 00332 00333 [helpstring("method DeleteObject")] 00334 HRESULT DeleteObject(); 00335 00336 [helpstring("method LockObejct")] 00337 HRESULT LockObject(); 00338 00339 // --- Attribute 00340 00341 [propget, helpstring("property AttributeValue")] 00342 HRESULT AttributeValue([retval, out] VARIANT *p); 00343 00344 [propput, helpstring("property AttributeValue")] 00345 HRESULT AttributeValue([in] VARIANT p); 00346 00347 }; 00348 00349 [ 00350 object, 00351 uuid(AD9DFA4E-2A3B-11D3-B36C-0060082DF884), 00352 dual, 00353 helpstring("ICoreProject Interface"), 00354 pointer_default(unique) 00355 ] 00356 interface ICoreProject : IDispatch 00357 { 00358 [propput, helpstring("property Storage")] 00359 HRESULT Storage([in] ICoreStorage *p); 00360 00361 [propget, helpstring("property Storage")] 00362 HRESULT Storage([out, retval] ICoreStorage **p); 00363 00364 [propget, helpstring("property MetaProject")] 00365 HRESULT MetaProject([out, retval] ICoreMetaProject **p); 00366 00367 // --- Private Storage 00368 00369 [helpstring("method OpenProject, if ro_mode is not NULL, itt will receive the read_only status")] 00370 HRESULT OpenProject([in] BSTR connection, [in] ICoreMetaProject *p, 00371 [out, defaultvalue(0)] VARIANT_BOOL *ro_mode); 00372 00373 [helpstring("method CloseProject, will not be saved if abort is set")] 00374 HRESULT CloseProject([in, defaultvalue((VARIANT_BOOL)0)] VARIANT_BOOL abort); 00375 00376 [helpstring("method CreateProject")] 00377 HRESULT CreateProject([in] BSTR connection, [in] ICoreMetaProject *p); 00378 00379 [helpstring("method SaveProject")] 00380 HRESULT SaveProject([in, defaultvalue("")] BSTR save_as_conn, [in, defaultvalue(0)] VARIANT_BOOL keepoldname); 00381 00382 [helpstring("method DeleteProject")] 00383 HRESULT DeleteProject([in] BSTR connection); 00384 00385 [helpstring("method OpenProject, with undo size specification")] 00386 HRESULT OpenProject2([in] BSTR connection, [in] long pUndoSize, [in] ICoreMetaProject *p, 00387 [out, defaultvalue(0)] VARIANT_BOOL *ro_mode); 00388 00389 [helpstring("method CreateProject, with undo size specification")] 00390 HRESULT CreateProject2([in] BSTR connection, [in] long pUndoSize, [in] ICoreMetaProject *p); 00391 00392 // --- Objects 00393 00394 [propget, id(DISPID_VALUE), helpstring("property Object")] 00395 HRESULT Object([in] metaid_type metaid, [in] objid_type ObjID, 00396 [out, retval] ICoreObject **p); 00397 00398 [helpstring("getter for property Object")] 00399 HRESULT GetObjectDisp([in] metaid_type metaid, [in] objid_type ObjID, 00400 [out, retval] ICoreObject **p); 00401 00402 [helpstring("method CreateObject")] 00403 HRESULT CreateObject([in] metaid_type metaid, [out] ICoreObject **p); 00404 00405 [propget, helpstring("property RootObject")] 00406 HRESULT RootObject([out, retval] ICoreObject **p); 00407 00408 // --- Transaction 00409 00410 [helpstring("method BeginTransaction")] 00411 HRESULT BeginTransaction([in, defaultvalue(TRANSTYPE_ANY)] transtype_enum transtype); 00412 00413 // if fails, call it again or call abort 00414 [helpstring("method CommitTransaction")] 00415 HRESULT CommitTransaction([in, defaultvalue(TRANSTYPE_ANY)] transtype_enum transtype); 00416 00417 [helpstring("method AbortTransaction")] 00418 HRESULT AbortTransaction([in, defaultvalue(TRANSTYPE_ANY)] transtype_enum transtype); 00419 00420 [propget, helpstring("property NestedTransactionCount")] 00421 HRESULT NestedTransactionCount([out, retval] short *p); 00422 00423 // --- Undo 00424 00425 [helpstring("method UndoTransaction")] 00426 HRESULT UndoTransaction(); 00427 00428 [helpstring("method RedoTransaction")] 00429 HRESULT RedoTransaction(); 00430 00431 [helpstring("method FlushUndoQueue")] 00432 HRESULT FlushUndoQueue(); 00433 00434 [helpstring("method FlushRedoQueue")] 00435 HRESULT FlushRedoQueue(); 00436 00437 [propget, helpstring("property UndoQueueSize")] 00438 HRESULT UndoQueueSize([out, retval] short *p); 00439 00440 [propget, helpstring("property RedoQueueSize")] 00441 HRESULT RedoQueueSize([out, retval] short *p); 00442 00443 // --- Territory 00444 00445 [helpstring("method CreateTerritory")] 00446 HRESULT CreateTerritory([out] ICoreTerritory **p); 00447 00448 [helpstring("method PushTerritory")] 00449 HRESULT PushTerritory([in] ICoreTerritory *p); 00450 00451 [helpstring("method PopTerritory")] 00452 HRESULT PopTerritory(); 00453 }; 00454 00455 [ 00456 object, 00457 uuid(826A8736-563B-11D3-B301-005004D38590), 00458 dual, 00459 helpstring("ICoreObject Interface"), 00460 pointer_default(unique) 00461 ] 00462 interface ICoreObject : IDispatch 00463 { 00464 [propget, helpstring("property Project")] 00465 HRESULT Project([out, retval] ICoreProject **p); 00466 00467 [propget, helpstring("property MetaObject")] 00468 HRESULT MetaObject([out, retval] ICoreMetaObject **p); 00469 00470 [propget, helpstring("property ObjID")] 00471 HRESULT ObjID([out, retval] objid_type *p); 00472 00473 [propget, id(DISPID_VALUE), helpstring("property Attribute")] 00474 HRESULT Attribute([in] attrid_type attrid, [out, retval] ICoreAttribute **p); 00475 00476 [helpstring("getter for property Attribute")] 00477 HRESULT GetAttributeDisp([in] attrid_type attrid, [out, retval] ICoreAttribute **p); 00478 00479 [propget, helpstring("property Attributes")] 00480 HRESULT Attributes([out, retval] ICoreAttributes **p); 00481 00482 [propget, helpstring("property AttributeValue")] 00483 HRESULT AttributeValue([in] attrid_type attrid, [out, retval] VARIANT *p); 00484 00485 [helpstring("getter for property AttributeValue")] 00486 HRESULT GetAttributeValueDisp([in] attrid_type attrid, [out, retval] VARIANT *p); 00487 00488 [propput, helpstring("property AttributeValue")] 00489 HRESULT AttributeValue([in] attrid_type attrid, [in] VARIANT p); 00490 00491 [helpstring("setter for property AttributeValue")] 00492 HRESULT SetAttributeValueDisp([in] attrid_type attrid, [in] VARIANT p); 00493 00494 [propget, helpstring("property LoadedAttrValue")] 00495 HRESULT LoadedAttrValue([in] attrid_type attrid, [out, retval] VARIANT *p); 00496 00497 [helpstring("getter for property LoadedAttrValue")] 00498 HRESULT GetLoadedAttrValueDisp([in] attrid_type attrid, [out, retval] VARIANT *p); 00499 00500 [propget, helpstring("property PreviousAttrValue")] 00501 HRESULT PreviousAttrValue([in] attrid_type attrid, [out, retval] VARIANT *p); 00502 00503 [helpstring("getter for property PreviousAttrValue")] 00504 HRESULT GetPreviousAttrValueDisp([in] attrid_type attrid, [out, retval] VARIANT *p); 00505 00506 [propget, helpstring("property PeerLockValue")] 00507 HRESULT PeerLockValue([in] attrid_type attrid, [out, retval] locking_type *p); 00508 00509 [helpstring("getter for property PeerLockValue")] 00510 HRESULT GetPeerLockValueDisp([in] attrid_type attrid, [out, retval] locking_type *p); 00511 00512 [helpstring("property SearchCollection")] 00513 HRESULT SearchCollection([in] attrid_type coll_attrid, 00514 [in] attrid_type search_attrid, [in] VARIANT search_value, 00515 [out, retval] ICoreObject **p); 00516 00517 [propget, helpstring("property IsDeleted")] 00518 HRESULT IsDeleted([out] VARIANT_BOOL *p); 00519 00520 [helpstring("method Delete")] 00521 HRESULT Delete(); 00522 00523 [helpstring("method Clone")] 00524 HRESULT Clone([out] ICoreObject **p); 00525 }; 00526 00527 [ 00528 object, 00529 uuid(826A8738-563B-11D3-B301-005004D38590), 00530 dual, 00531 helpstring("ICoreAttribute Interface"), 00532 pointer_default(unique) 00533 ] 00534 interface ICoreAttribute : IDispatch 00535 { 00536 [propget, helpstring("property Object")] 00537 HRESULT Object([out, retval] ICoreObject **p); 00538 00539 [propget, helpstring("property MetaAttribute")] 00540 HRESULT MetaAttribute([out, retval] ICoreMetaAttribute **p); 00541 00542 [propget, id(DISPID_VALUE), helpstring("property Value")] 00543 HRESULT Value([out, retval] VARIANT *p); 00544 00545 [propput, id(DISPID_VALUE), helpstring("property Value")] 00546 HRESULT Value([in] VARIANT p); 00547 00548 [propget, helpstring("property LoadedValue")] 00549 HRESULT LoadedValue([out, retval] VARIANT *p); 00550 00551 [propget, helpstring("property PreviousValue")] 00552 HRESULT PreviousValue([out, retval] VARIANT *p); 00553 }; 00554 00555 [ 00556 object, 00557 uuid(4C3A57C3-8DFF-11D3-B336-005004D38590), 00558 dual, 00559 helpstring("ICoreTerritory Interface"), 00560 pointer_default(unique) 00561 ] 00562 interface ICoreTerritory : IDispatch 00563 { 00564 [propget, helpstring("property Project")] 00565 HRESULT Project([out, retval] ICoreProject **p); 00566 00567 [propget, helpstring("property Attributes")] 00568 HRESULT Attributes([out, retval] ICoreAttributes **p); 00569 00570 [helpstring("method Clear")] 00571 HRESULT Clear(); 00572 }; 00573 00574 MGACOLL_INTERFACE(43D12111-12CA-11D3-A6EC-0060082DF884, CoreMetaObject) 00575 MGACOLL_INTERFACE(43D12127-12CA-11D3-A6EC-0060082DF884, CoreMetaAttribute) 00576 MGACOLL_INTERFACE(43D12111-22CA-11D3-A6EC-0060082DF884, CoreObject) 00577 MGACOLL_INTERFACE(43D12127-22CA-11D3-A6EC-0060082DF884, CoreAttribute) 00578 00579 // --------------------------- VersionInfo 00580 00581 typedef enum GMEInterfaceVersion_enum 00582 { 00583 GMEInterfaceVersion_None = 0, 00584 GMEInterfaceVersion_Legacy = 4, 00585 GMEInterfaceVersion_Current = INTERFACE_VERSION 00586 } GMEInterfaceVersion_enum; 00587 00588 cpp_quote("#define GMEInterfaceVersion GMEInterfaceVersion_enum") 00589 00590 [ 00591 oleautomation, 00592 uuid(9A228010-020B-11d2-BBB3-0040051F7117), 00593 helpstring("GME VersionInfo Interface") 00594 ] 00595 interface IGMEVersionInfo : IUnknown 00596 { 00597 [propget, helpstring("property version")] 00598 HRESULT version([out, retval] GMEInterfaceVersion_enum *pVal); 00599 }; 00600 00601 [ 00602 object, 00603 uuid(FAB8C11E-747A-45A5-BF05-1A8FB353B03B), 00604 dual, 00605 pointer_default(unique) 00606 ] 00607 interface ICoreDictionaryAttributeValue : IDispatch 00608 { 00609 [propget, id(DISPID_VALUE)] 00610 HRESULT Value([in] BSTR Key, [out, retval] BSTR *Value); 00611 00612 [propput, id(DISPID_VALUE)] 00613 HRESULT Value([in] BSTR Key, [in] BSTR Value); 00614 00615 [propget] 00616 HRESULT Keys([out, retval] VARIANT *Keys); 00617 00618 [propget] 00619 HRESULT Map([out, retval] VARIANT* Map); 00620 00621 [propput] 00622 HRESULT Map([in] VARIANT Map); 00623 00624 HRESULT Clone([out] ICoreDictionaryAttributeValue** ret); 00625 }; 00626 00627 //-------------------------------------------------------------------------------