Anope IRC Services  Version 2.0
os_news.h
Go to the documentation of this file.
1 #ifndef OS_NEWS
2 #define OS_NEWS
3 
4 enum NewsType
5 {
9 };
10 
12 {
15  const char *msgs[10];
16 };
17 
19 {
23  time_t time;
24 
25  NewsItem() : Serializable("NewsItem") { }
26 };
27 
28 class NewsService : public Service
29 {
30  public:
31  NewsService(Module *m) : Service(m, "NewsService", "news") { }
32 
33  virtual NewsItem *CreateNewsItem() = 0;
34 
35  virtual void AddNewsItem(NewsItem *n) = 0;
36 
37  virtual void DelNewsItem(NewsItem *n) = 0;
38 
39  virtual std::vector<NewsItem *> &GetNewsList(NewsType t) = 0;
40 };
41 
42 static ServiceReference<NewsService> news_service("NewsService", "news");
43 
44 #endif // OS_NEWS
45 
NewsType type
Definition: os_news.h:20
NewsType type
Definition: os_news.h:13
const char * msgs[10]
Definition: os_news.h:15
NewsItem()
Definition: os_news.h:25
Anope::string who
Definition: os_news.h:22
Anope::string name
Definition: os_news.h:14
time_t time
Definition: os_news.h:23
virtual NewsItem * CreateNewsItem()=0
virtual std::vector< NewsItem * > & GetNewsList(NewsType t)=0
static ServiceReference< NewsService > news_service("NewsService","news")
NewsType
Definition: os_news.h:4
virtual void AddNewsItem(NewsItem *n)=0
virtual void DelNewsItem(NewsItem *n)=0
Anope::string text
Definition: os_news.h:21
NewsService(Module *m)
Definition: os_news.h:31