CDDBPlugInBase.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef CDDB_PLUGIN_BASE_H
  2. #define CDDB_PLUGIN_BASE_H
  3. // Version of module interface
  4. #define CDDBMODULE_VERSION 1
  5. // Module Categories
  6. // modules need to set this approprately to tell the manager what services it provides
  7. #define CDDBMODULE_DECODER 0x10
  8. #define CDDBMODULE_DECODERINFO 0x20
  9. #define CDDBMODULE_ENCODER 0x40
  10. #define CDDBMODULE_SIGNATURE 0x80
  11. #define CDDBMODULE_FILEINFO 0x100
  12. #define CDDBMODULE_SECURITY 0x200
  13. //
  14. // base module type
  15. // all modules derive from this type
  16. //
  17. #ifndef CDDBMODULEINTERFACE
  18. #define CDDBMODULEINTERFACE
  19. typedef struct
  20. {
  21. void *handle;
  22. char *moduleID;
  23. int version;
  24. int categories;
  25. int initialized;
  26. int (__stdcall *Init)(void*);
  27. int (__stdcall *Deinit)();
  28. } CDDBModuleInterface;
  29. #endif
  30. // entry point function type
  31. typedef CDDBModuleInterface* (__cdecl *CDDBModuleQueryInterfaceFunc)(const char* lpszInterface);
  32. //
  33. // internal module handle
  34. //
  35. typedef struct
  36. {
  37. void *handle;
  38. int initialized;
  39. CDDBModuleInterface *baseInterface;
  40. } CDDBModule;
  41. #endif /* CDDB_PLUGIN_BASE_H */