1
0

api_textfeed.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef __WASABI_API_TEXTFEED_H
  2. #define __WASABI_API_TEXTFEED_H
  3. #include <bfc/dispatch.h>
  4. #include <bfc/platform/types.h>
  5. #include <api/service/services.h>
  6. class ifc_dependent;
  7. // {A04E3420-CBA1-4ae1-B3C0-8DE127D2B861}
  8. static const GUID textfeed_dependent_GUID = { 0xa04e3420, 0xcba1, 0x4ae1, { 0xb3, 0xc0, 0x8d, 0xe1, 0x27, 0xd2, 0xb8, 0x61 } };
  9. class NOVTABLE svc_textFeed : public Dispatchable
  10. {
  11. public:
  12. static FOURCC getServiceType() { return WaSvc::TEXTFEED; }
  13. static const GUID *depend_getClassGuid()
  14. {
  15. return &textfeed_dependent_GUID;
  16. }
  17. static const char *getServiceName() { return "Untitled Textfeed"; }
  18. public:
  19. int hasFeed(const wchar_t *name);
  20. const wchar_t *getFeedText(const wchar_t *name);
  21. const wchar_t *getFeedDescription(const wchar_t *name);
  22. ifc_dependent *getDependencyPtr();
  23. public:
  24. enum
  25. {
  26. Event_TEXTCHANGE = 100, // param is const char* to id, ptr points to new text
  27. };
  28. DISPATCH_CODES
  29. {
  30. SVCTEXTFEED_HASFEED = 10,
  31. //20,30 retired
  32. SVCTEXTFEED_GETFEEDTEXT = 40,
  33. SVCTEXTFEED_GETFEEDDESC = 45,
  34. SVCTEXTFEED_GETDEPENDENCYPTR = 100,
  35. };
  36. };
  37. inline int svc_textFeed::hasFeed(const wchar_t *name)
  38. {
  39. return _call(SVCTEXTFEED_HASFEED, 0, name);
  40. }
  41. inline const wchar_t *svc_textFeed::getFeedText(const wchar_t *name)
  42. {
  43. return _call(SVCTEXTFEED_GETFEEDTEXT, (const wchar_t *)NULL, name);
  44. }
  45. inline const wchar_t *svc_textFeed::getFeedDescription(const wchar_t *name)
  46. {
  47. return _call(SVCTEXTFEED_GETFEEDDESC, (const wchar_t *)NULL, name);
  48. }
  49. inline ifc_dependent *svc_textFeed::getDependencyPtr()
  50. {
  51. return _call(SVCTEXTFEED_GETDEPENDENCYPTR, (ifc_dependent*)NULL);
  52. }
  53. #endif