123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef _TEXTFEED_H
- #define _TEXTFEED_H
- #include <bfc/common.h>
- #include <map>
- #include <string>
- #include <utility>
- #include <bfc/depend.h>
- #include <api/service/svcs/svc_textfeed.h>
- #include <api/syscb/callbacks/corecbi.h>
- class TextFeed : public svc_textFeedI, public DependentI
- {
- public:
- int registerFeed(const wchar_t *feedid, const wchar_t *initial_text=L"", const wchar_t *description=L"");
- int sendFeed(const wchar_t *feedid, const wchar_t *text);
- virtual const wchar_t *getFeedText(const wchar_t *feedid);
- virtual const wchar_t *getFeedDescription(const wchar_t *feedid);
- protected:
- virtual api_dependent *getDependencyPtr() { return this; }
- virtual void dependent_onRegViewer(api_dependentviewer *viewer, int add);
- virtual void *dependent_getInterface(const GUID *classguid);
- virtual void onRegClient() { }
- virtual void onDeregClient() { }
- virtual int hasFeed(const wchar_t *name);
- private:
- std::map<std::wstring, std::pair<std::wstring, std::wstring> > feeds;
- };
- #endif
|