Fawkes API Fawkes Development Version
list_message.h
1
2/***************************************************************************
3 * plugin_list_messages.h - Fawkes Plugin Messages
4 *
5 * Created: Sat Jun 02 01:21:03 2007
6 * Copyright 2006-2007 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24#ifndef _FAWKES_PLUGIN_LIST_MESSAGE_H_
25#define _FAWKES_PLUGIN_LIST_MESSAGE_H_
26
27#include <netcomm/fawkes/message_content.h>
28#include <plugin/net/messages.h>
29
30namespace fawkes {
31
32class DynamicBuffer;
33
35{
36public:
38 PluginListMessage(unsigned int component_id,
39 unsigned int msg_id,
40 void * payload,
41 size_t payload_size);
42 virtual ~PluginListMessage();
43
44 void append(const char *plugin_name, size_t len);
45 virtual void serialize();
46
47 void reset_iterator();
48 bool has_next();
49 char *next();
50
51private:
52 DynamicBuffer * plugin_list;
54};
55
56} // namespace fawkes
57
58#endif
Dynamically growing buffer.
Fawkes network message content.
virtual size_t payload_size()
Return payload size.
virtual void * payload()
Return pointer to payload.
Plugin list message.
Definition: list_message.h:35
bool has_next()
Check if more list elements are available.
char * next()
Get next plugin from list.
PluginListMessage()
Constructor.
void reset_iterator()
Reset iterator.
void append(const char *plugin_name, size_t len)
Append plugin name.
virtual void serialize()
Serialize message content.
virtual ~PluginListMessage()
Destructor.
Fawkes library namespace.
Plugin list message.
Definition: messages.h:100