aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/service/svcs/svc_minibrowser.h
blob: 9772131b11e41babfe1916d8fa106451eb23db38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef _SVC_MINIBROWSER_H
#define _SVC_MINIBROWSER_H

#include <bfc/dispatch.h>
#include <api/service/services.h>

class MiniBrowser;

#include <bfc/nsguid.h>

// {2E41D2E8-19A5-4029-9339-8FDF7481000A}
static const GUID GUID_MINIBROWSER_ANY = 
{ 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };

// {C0A3D1AC-2430-45a7-B51B-AB04B74DD9EA}
static const GUID GUID_MINIBROWSER_IEACTIVEX = 
{ 0xc0a3d1ac, 0x2430, 0x45a7, { 0xb5, 0x1b, 0xab, 0x4, 0xb7, 0x4d, 0xd9, 0xea } };

class NOVTABLE svc_miniBrowser : public Dispatchable {
public:
  static FOURCC getServiceType() { return WaSvc::MINIBROWSER; }

  int testGuid(GUID g);
  MiniBrowser *createMiniBrowser();
  void destroyMiniBrowser(MiniBrowser *b);

  enum {
    TESTGUID            =10,
    CREATEMINIBROWSER   =20,
    DESTROYMINIBROWSER  =30,
  };
};

inline int svc_miniBrowser::testGuid(GUID g) {
  return _call(TESTGUID, 0, g);
}

inline MiniBrowser *svc_miniBrowser::createMiniBrowser() {
  return _call(CREATEMINIBROWSER, (MiniBrowser *)0);
}

inline void svc_miniBrowser::destroyMiniBrowser(MiniBrowser *b) {
  _voidcall(DESTROYMINIBROWSER, b);
}

class NOVTABLE svc_miniBrowserI : public svc_miniBrowser {
public:
  virtual int testGuid(GUID g)=0;
  virtual MiniBrowser *createMiniBrowser()=0;
  virtual void destroyMiniBrowser(MiniBrowser *b)=0;

protected:
  RECVS_DISPATCH;
};

#include <api/service/svc_enum.h>

class MiniBrowserSvcEnum : public SvcEnumT<svc_miniBrowser> {
public:
  MiniBrowserSvcEnum(GUID g) : guid(g) {}
protected:
  virtual int testService(svc_miniBrowser *svc) {
    return (svc->testGuid(guid));
  }
private:
  GUID guid;
};

#endif