1
0

api_syscb.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // ----------------------------------------------------------------------------
  2. // Generated by InterfaceFactory [Wed May 07 00:58:14 2003]
  3. //
  4. // File : api_syscb.h
  5. // Class : api_syscb
  6. // class layer : Dispatchable Interface
  7. // ----------------------------------------------------------------------------
  8. #ifndef __API_SYSCB_H
  9. #define __API_SYSCB_H
  10. #include <bfc/dispatch.h>
  11. #include <bfc/platform/types.h>
  12. class SysCallback;
  13. // ----------------------------------------------------------------------------
  14. class NOVTABLE api_syscb: public Dispatchable
  15. {
  16. protected:
  17. api_syscb() {}
  18. ~api_syscb() {}
  19. public:
  20. int syscb_registerCallback(SysCallback *cb, void *param = 0);
  21. int syscb_deregisterCallback(SysCallback *cb);
  22. int syscb_issueCallback(int eventtype, int msg, intptr_t param1 = 0, intptr_t param2 = 0);
  23. /** pass eventtype == 0 to enumerate all syscallbacks
  24. ** call Release() on the returned SysCallback when you are done
  25. ** although very few wasabi objects support this at this time (2 June 2008)
  26. **/
  27. SysCallback *syscb_enum(int eventtype, size_t n);
  28. protected:
  29. enum {
  30. API_SYSCB_SYSCB_REGISTERCALLBACK = 20,
  31. API_SYSCB_SYSCB_DEREGISTERCALLBACK = 10,
  32. API_SYSCB_SYSCB_ISSUECALLBACK = 30,
  33. API_SYSCB_SYSCB_ENUM = 40,
  34. };
  35. };
  36. // ----------------------------------------------------------------------------
  37. inline int api_syscb::syscb_registerCallback(SysCallback *cb, void *param) {
  38. int __retval = _call(API_SYSCB_SYSCB_REGISTERCALLBACK, (int)0, cb, param);
  39. return __retval;
  40. }
  41. inline int api_syscb::syscb_deregisterCallback(SysCallback *cb) {
  42. int __retval = _call(API_SYSCB_SYSCB_DEREGISTERCALLBACK, (int)0, cb);
  43. return __retval;
  44. }
  45. inline int api_syscb::syscb_issueCallback(int eventtype, int msg, intptr_t param1 , intptr_t param2) {
  46. int __retval = _call(API_SYSCB_SYSCB_ISSUECALLBACK, (int)0, eventtype, msg, param1, param2);
  47. return __retval;
  48. }
  49. inline SysCallback *api_syscb::syscb_enum(int eventtype, size_t n)
  50. {
  51. return _call(API_SYSCB_SYSCB_ENUM, (SysCallback *)0, eventtype, n);
  52. }
  53. // ----------------------------------------------------------------------------
  54. // -- generated code - edit in api_syscbi.h
  55. // {57B7A1B6-700E-44ff-9CB0-70B92BAF3959}
  56. static const GUID syscbApiServiceGuid =
  57. { 0x57b7a1b6, 0x700e, 0x44ff, { 0x9c, 0xb0, 0x70, 0xb9, 0x2b, 0xaf, 0x39, 0x59 } };
  58. extern api_syscb *sysCallbackApi;
  59. #endif // __API_SYSCB_H