//////////////////////////////////////////////////////////////// // // OrangeCD Suite plugin interfaces // Copyright (c) 1997-2006, Firetongue Software // // File: ocdapi.idl // //-------------------------------------------------------------- import "unknwn.idl"; import "oaidl.idl"; // Plugin DLL entry point, declared as // STDAPI GetPlugin(DWORD dwReserved, IOUIPlugin **ppPlugin) cpp_quote("#define PLUGIN_ENTRY_POINT _T(\"GetPlugin\")") // {C44CED72-60FA-4a80-9222-BCB4D0785DD2} cpp_quote("DEFINE_GUID(IID_IORecord, 0xc44ced72, 0x60fa, 0x4a80, 0x92, 0x22, 0xbc, 0xb4, 0xd0, 0x78, 0x5d, 0xd2);") // {C64AB117-EE2B-48bb-9E20-ED1BF6951DF9} cpp_quote("DEFINE_GUID(IID_IODatabase, 0xc64ab117, 0xee2b, 0x48bb, 0x9e, 0x20, 0xed, 0x1b, 0xf6, 0x95, 0x1d, 0xf9);") // {090FD371-8A3F-4d7d-8CE4-B1CB44DE3CD4} cpp_quote("DEFINE_GUID(IID_IOSelection, 0x90fd371, 0x8a3f, 0x4d7d, 0x8c, 0xe4, 0xb1, 0xcb, 0x44, 0xde, 0x3c, 0xd4);") // {C9B03881-D51E-43c3-8B3A-91F0CA2A66B7} cpp_quote("DEFINE_GUID(IID_IOUIPluginHost, 0xc9b03881, 0xd51e, 0x43c3, 0x8b, 0x3a, 0x91, 0xf0, 0xca, 0x2a, 0x66, 0xb7);") // {31AB1A27-3947-4198-9DCF-2B9F4ED3E0C3} cpp_quote("DEFINE_GUID(IID_IOUIPlugin, 0x31ab1a27, 0x3947, 0x4198, 0x9d, 0xcf, 0x2b, 0x9f, 0x4e, 0xd3, 0xe0, 0xc3);") //////////////////////////////////////////////////////////////// // Database property ID enumeration typedef enum { O_TITLE = 1, O_ARTIST = 2, O_SORT_ARTIST = 3, O_YEAR = 4, O_CATEGORY = 5, O_GENRE = 6, O_SUBGENRE = 7, O_FORMAT = 8, O_NOTES = 9, O_FREEDB_NOTES = 10, O_RELEASE_DATE = 11, O_LABEL = 12, O_LABEL_NUMBER = 13, O_MONO = 14, O_LIVE = 15, O_TRACK_TITLE = 16, O_INSTRUMENTAL = 17, O_LYRICS = 18, O_TRACK_TIME = 19, O_VARIOUS_ARTISTS = 20, O_VARIOUS_COMPOSERS = 21, O_RECORDING_DATE = 22, O_SINGLE = 23, O_COMPILATION = 24, O_SOUNDTRACK = 25, O_COMPOSER = 26, O_SORT_COMPOSER = 27, O_DATE_ADDED = 28, O_LAST_PLAYED = 29, O_TOTAL_PLAYED = 30, O_PRIVATE = 31, O_TOTAL_IN_SET = 32, O_NUM_IN_SET = 33, O_RARE = 34, O_BOOTLEG = 35, O_IN_COLLECTION = 36, O_INTERVIEW = 37, O_MULTICHANNEL = 38, O_HYBRID_MULTICHANNEL = 39, O_HIRES = 40, O_HYBRID_HIRES = 41, O_CHARSET = 42, O_TEXT1 = 43, O_TEXT2 = 44, O_TEXT3 = 45, O_TEXT4 = 46, O_REFERENCE_NUM = 47, O_PRICE = 48, O_ORIG_PRICE = 49, O_BITRATE = 50, O_FILE_NAME = 51, O_PATH = 52, O_FILE_SIZE = 53, O_ICON_INDEX = 54, O_ASIN = 55, O_UPC = 56, O_SUBTITLE = 57, O_RELEASE_COUNTRY = 58, O_RELEASE_COMPANY = 59, O_REISSUE_LABEL = 60, O_REISSUE_DATE = 61, O_DISTRIBUTOR = 62, O_PROMO = 63, O_KEYWORDS = 64, O_STORE = 65, O_LOCATION = 66, O_STATUS = 67, O_BORROWER = 68, O_TEXT5 = 69, O_TEXT6 = 70, O_TEXT7 = 71, O_TEXT8 = 72, O_TEXT9 = 73, O_TEXT10 = 74, O_BOOL1 = 75, O_BOOL2 = 76, O_BOOL3 = 77, O_BOOL4 = 78, O_BOOL5 = 79, O_BOOL6 = 80, O_BOOL7 = 81, O_BOOL8 = 82, O_BOOL9 = 83, O_BOOL10 = 84, O_RATING = 85, O_MEMO1 = 86, O_MEMO2 = 87, O_MEMO3 = 88, O_MEMO4 = 89, O_MEMO5 = 90, O_DATE1 = 91, O_DATE2 = 92, O_DATE3 = 93, O_DATE4 = 94, O_DATE5 = 95, O_CHECKIN_DATE = 96, O_CHECKOUT_DATE = 97, O_LAST_MODIFIED = 98, O_RECORDING_SOURCE = 99, O_RECORDING_GENERATION = 100, O_RECORDING_QUALITY = 101, O_RECORDING_TOUR = 102, O_RECORDING_CITY = 103, O_RECORDING_COUNTRY = 104, O_RECORDING_VENUE = 105, O_RECORDING_STUDIO = 106, O_BPM = 107, O_SPARS = 108, O_PACKAGING = 109, O_CONDITION = 110, O_BOOKLET_PAGES = 111, } O_PROPID; //////////////////////////////////////////////////////////////// // UI context enumeration typedef enum { O_MAIN_MENU = 0x0001, // main menu, Tools submenu O_FOLDERS_POPUP = 0x0002, // content tree popup menu O_ALBUM_LIST_POPUP = 0x0004, // album list popup menu O_TRACK_LIST_POPUP = 0x0008, // album list popup menu O_ALBUM_PAGE_POPUP = 0x00010, // album display popup menu O_TRACK_PAGE_POPUP = 0x0020, // track display popup menu O_ALL_CONTEXTS = 0x0FFF, O_NEW_SUBMENU = 0x1000, // defines new submenu, subsequent calls to // AddMenuItem will result in adding to submenu. } O_UICONTEXT; //////////////////////////////////////////////////////////////// // Selection type enumeration typedef enum { O_EMPTY, // none of the below O_SINGLE_TRACK, // single track O_MULTIPLE_TRACKS, // multiple tracks of same volume O_SINGLE_ALBUM, // single album consisting of one or more volumes O_SINGLE_VOLUME, // single volume of multiple-disc album O_MULTIPLE_VOLUMES // multiple volumes, not forming a complete album } O_SELTYPE; //////////////////////////////////////////////////////////////// // Menu item state flags typedef enum { O_CHECKED = 0x0001, // checked menu item O_RADIO = 0x0002, // menu item marked with radio circle O_DISABLED = 0x0004, // disabled menu item O_HIDDEN = 0x0008, // hidden menu item } O_MENUSTATE; //////////////////////////////////////////////////////////////// // IORecord interface [ object, uuid(C44CED72-60FA-4a80-9222-BCB4D0785DD2), pointer_default(unique) ] interface IORecord : IUnknown { // Returns number of tracks in this record HRESULT GetNumTracks( [out] UINT *puNumTracks ); // Returns property values: // nTrackID == 0 to get record properties // nTrackID > 0 to get individual tracks properties HRESULT GetProp( [in] O_PROPID propid, [in] UINT nTrackID, [out] VARIANT *pValue ); }; //////////////////////////////////////////////////////////////// // IODatabase interface [ object, uuid(C64AB117-EE2B-48bb-9E20-ED1BF6951DF9), pointer_default(unique) ] interface IODatabase : IUnknown { // Lists IDs of all records in the database HRESULT ListRecords( [in] DWORD *pdwBuf, [in,out] UINT *pnSize ); // Opens a record specified by ID HRESULT OpenRecord( [in] DWORD dwID, [out] IORecord **ppRecord ); }; //////////////////////////////////////////////////////////////// // IOSelection interface [ object, uuid(090FD371-8A3F-4d7d-8CE4-B1CB44DE3CD4), pointer_default(unique) ] interface IOSelection : IUnknown { // Determine type of current selection HRESULT GetType( [out] O_SELTYPE *pType ); // When pdwRecordIDBuf==NULL, returns number of currently selected records // in pnSize. When pdwRecordIDBuf!=NULL, fills the buffer with record IDs // and returns number of IDs filled. HRESULT GetRecordIDs( [out] DWORD *pdwRecordIDBuf, [in,out] UINT *pnSize ); // Same as above, except it returns track numbers as well as record IDs, // thus some of the record IDs can be duplicates. HRESULT GetTracks( [out] DWORD *pdwRecordIDBuf, [out] UINT *pnTrackIDBuf, [in,out] UINT *pnSize ); }; //////////////////////////////////////////////////////////////// // IOUIPluginHost interface [ object, uuid(C9B03881-D51E-43c3-8B3A-91F0CA2A66B7), pointer_default(unique) ] interface IOUIPluginHost : IUnknown { // Retrieve currently opened database HRESULT GetDatabase( [out] IODatabase **ppDatabase ); // Add menu items in contexts specified by mask HRESULT AddMenuItem( [in] DWORD dwContextMask, [in] UINT commandID, [in] BSTR bstrText ); }; //////////////////////////////////////////////////////////////// // IOUIPlugin interface [ object, uuid(31AB1A27-3947-4198-9DCF-2B9F4ED3E0C3), pointer_default(unique) ] interface IOUIPlugin : IUnknown { // Called to initialize plugin and set current database HRESULT Initialize( [in] IOUIPluginHost *pHost ); // Called to retrieve menu item text and state. HRESULT GetMenuState( [in] UINT command, [in] O_UICONTEXT context, //can be combination of flags! [in] IOSelection *pSelection, [out] DWORD *pMenuState, [out] BSTR *pbstrMenuText ); // Called to execute a command HRESULT Execute( [in] UINT command, [in] O_UICONTEXT context, [in] IOSelection *pSelection, [in] HWND hParent ); };