Fawkes API  Fawkes Development Version
net_list_content.h
1 
2 /***************************************************************************
3  * net_list_content.h - Fawkes Network Config List Message
4  *
5  * Created: Fri Dec 07 14:52:59 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 _CONFIG_NET_LIST_CONTENT_H_
25 #define _CONFIG_NET_LIST_CONTENT_H_
26 
27 #include <config/config.h>
28 #include <config/net_messages.h>
29 #include <netcomm/fawkes/message_content.h>
30 
31 namespace fawkes {
32 
33 class DynamicBuffer;
34 
35 class ConfigListContent : public FawkesNetworkMessageContent
36 {
37 public:
39  ConfigListContent(unsigned int component_id,
40  unsigned int msg_id,
41  void * payload,
42  size_t payload_size);
43  virtual ~ConfigListContent();
44 
46 
47  virtual void serialize();
48 
49  void reset_iterator();
50  bool has_next();
51  config_list_entity_header_t *next(size_t *size);
52 
53 private:
54  DynamicBuffer * config_list;
56 };
57 
58 } // end namespace fawkes
59 
60 #endif
fawkes::config_list_msg_t
Config list message.
Definition: net_messages.h:152
fawkes::DynamicBuffer
Definition: dynamic_buffer.h:53
fawkes::ConfigListContent::next
config_list_entity_header_t * next(size_t *size)
Get next plugin from list.
Definition: net_list_content.cpp:229
fawkes::FawkesNetworkMessageContent::payload
virtual void * payload()
Return pointer to payload.
Definition: message_content.cpp:74
fawkes::ConfigListContent::has_next
bool has_next()
Check if more list elements are available.
Definition: net_list_content.cpp:217
fawkes::ConfigListContent::ConfigListContent
ConfigListContent()
Constructor.
Definition: net_list_content.cpp:48
fawkes::Configuration::ValueIterator
Definition: config.h:75
fawkes::ConfigListContent::~ConfigListContent
virtual ~ConfigListContent()
Destructor.
Definition: net_list_content.cpp:75
fawkes::ConfigListContent::reset_iterator
void reset_iterator()
Reset iterator.
Definition: net_list_content.cpp:207
fawkes::ConfigListContent::serialize
virtual void serialize()
Definition: net_list_content.cpp:195
fawkes::config_list_entity_header_t
Config list entity header.
Definition: net_messages.h:158
fawkes
fawkes::ConfigListContent::append
void append(Configuration::ValueIterator *i)
Append from iterator.
Definition: net_list_content.cpp:101
fawkes::FawkesNetworkMessageContent::payload_size
virtual size_t payload_size()
Return payload size.
Definition: message_content.cpp:88