1
0

svc_minibrowser.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef _SVC_MINIBROWSER_H
  2. #define _SVC_MINIBROWSER_H
  3. #include <bfc/dispatch.h>
  4. #include <api/service/services.h>
  5. class MiniBrowser;
  6. #include <bfc/nsguid.h>
  7. // {2E41D2E8-19A5-4029-9339-8FDF7481000A}
  8. static const GUID GUID_MINIBROWSER_ANY =
  9. { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
  10. // {C0A3D1AC-2430-45a7-B51B-AB04B74DD9EA}
  11. static const GUID GUID_MINIBROWSER_IEACTIVEX =
  12. { 0xc0a3d1ac, 0x2430, 0x45a7, { 0xb5, 0x1b, 0xab, 0x4, 0xb7, 0x4d, 0xd9, 0xea } };
  13. class NOVTABLE svc_miniBrowser : public Dispatchable {
  14. public:
  15. static FOURCC getServiceType() { return WaSvc::MINIBROWSER; }
  16. int testGuid(GUID g);
  17. MiniBrowser *createMiniBrowser();
  18. void destroyMiniBrowser(MiniBrowser *b);
  19. enum {
  20. TESTGUID =10,
  21. CREATEMINIBROWSER =20,
  22. DESTROYMINIBROWSER =30,
  23. };
  24. };
  25. inline int svc_miniBrowser::testGuid(GUID g) {
  26. return _call(TESTGUID, 0, g);
  27. }
  28. inline MiniBrowser *svc_miniBrowser::createMiniBrowser() {
  29. return _call(CREATEMINIBROWSER, (MiniBrowser *)0);
  30. }
  31. inline void svc_miniBrowser::destroyMiniBrowser(MiniBrowser *b) {
  32. _voidcall(DESTROYMINIBROWSER, b);
  33. }
  34. class NOVTABLE svc_miniBrowserI : public svc_miniBrowser {
  35. public:
  36. virtual int testGuid(GUID g)=0;
  37. virtual MiniBrowser *createMiniBrowser()=0;
  38. virtual void destroyMiniBrowser(MiniBrowser *b)=0;
  39. protected:
  40. RECVS_DISPATCH;
  41. };
  42. #include <api/service/svc_enum.h>
  43. class MiniBrowserSvcEnum : public SvcEnumT<svc_miniBrowser> {
  44. public:
  45. MiniBrowserSvcEnum(GUID g) : guid(g) {}
  46. protected:
  47. virtual int testService(svc_miniBrowser *svc) {
  48. return (svc->testGuid(guid));
  49. }
  50. private:
  51. GUID guid;
  52. };
  53. #endif