aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/skin/feeds/api_textfeed.h
blob: fecde4d4daea77f1b01023d2e0f1b5177c5b0032 (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
#ifndef __WASABI_API_TEXTFEED_H
#define __WASABI_API_TEXTFEED_H

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

class ifc_dependent;

// {A04E3420-CBA1-4ae1-B3C0-8DE127D2B861}
static const GUID textfeed_dependent_GUID = { 0xa04e3420, 0xcba1, 0x4ae1, { 0xb3, 0xc0, 0x8d, 0xe1, 0x27, 0xd2, 0xb8, 0x61 } };

class NOVTABLE svc_textFeed : public Dispatchable
{
public:
	static FOURCC getServiceType() { return WaSvc::TEXTFEED; }
	static const GUID *depend_getClassGuid()
	{
		return &textfeed_dependent_GUID;
	}
	static const char *getServiceName() { return "Untitled Textfeed"; }

public:
	int hasFeed(const wchar_t *name);
	const wchar_t *getFeedText(const wchar_t *name);
	const wchar_t *getFeedDescription(const wchar_t *name);
	ifc_dependent *getDependencyPtr();

public:
	enum 
	{
	    Event_TEXTCHANGE = 100,  // param is const char* to id, ptr points to new text
	};

	DISPATCH_CODES
	{
	    SVCTEXTFEED_HASFEED          = 10,
	    //20,30 retired
	    SVCTEXTFEED_GETFEEDTEXT      = 40,
	    SVCTEXTFEED_GETFEEDDESC      = 45,
	    SVCTEXTFEED_GETDEPENDENCYPTR = 100,
	};
};

inline int svc_textFeed::hasFeed(const wchar_t *name)
{
	return _call(SVCTEXTFEED_HASFEED, 0, name);
}

inline const wchar_t *svc_textFeed::getFeedText(const wchar_t *name)
{
	return _call(SVCTEXTFEED_GETFEEDTEXT, (const wchar_t *)NULL, name);
}

inline const wchar_t *svc_textFeed::getFeedDescription(const wchar_t *name)
{
	return _call(SVCTEXTFEED_GETFEEDDESC, (const wchar_t *)NULL, name);
}

inline ifc_dependent *svc_textFeed::getDependencyPtr()
{
	return _call(SVCTEXTFEED_GETDEPENDENCYPTR, (ifc_dependent*)NULL);
}


#endif