Fawkes API  Fawkes Development Version
fuse_imagelist_content.h
1 
2 /***************************************************************************
3  * fuse_imagelist_content.h - FUSE image list content encapsulation
4  *
5  * Created: Tue Nov 20 14:56:23 2007 (Ella on heat)
6  * Copyright 2005-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 _FIREVISION_FVUTILS_NET_FUSE_IMAGELIST_CONTENT_H_
25 #define _FIREVISION_FVUTILS_NET_FUSE_IMAGELIST_CONTENT_H_
26 
27 #include <fvutils/net/fuse.h>
28 #include <fvutils/net/fuse_message_content.h>
29 #include <sys/types.h>
30 
31 namespace firevision {
32 
33 class FuseImageListContent : public FuseMessageContent
34 {
35 public:
37  FuseImageListContent(uint32_t type, void *payload, size_t payload_size);
39 
40  void add_imageinfo(const char * image_id,
41  colorspace_t colorspace,
42  unsigned int pixel_width,
43  unsigned int pixel_height);
44 
45  void reset_iterator();
46  bool has_next();
48 
49  virtual void serialize();
50 
51 private:
52  fawkes::DynamicBuffer * list_;
53  FUSE_imagelist_message_t imagelist_msg_;
54 };
55 
56 } // end namespace firevision
57 
58 #endif
firevision::FuseImageListContent::~FuseImageListContent
~FuseImageListContent()
Destructor.
Definition: fuse_imagelist_content.cpp:78
fawkes::DynamicBuffer
Definition: dynamic_buffer.h:55
firevision::FuseMessageContent::payload_size
virtual size_t payload_size() const
Return payload size.
Definition: fuse_message_content.cpp:92
firevision::FUSE_imageinfo_t
Image info message.
Definition: fuse.h:173
firevision::FuseImageListContent::has_next
bool has_next()
Check if another image info is available.
Definition: fuse_imagelist_content.cpp:120
firevision::FuseImageListContent::FuseImageListContent
FuseImageListContent()
Constructor.
Definition: fuse_imagelist_content.cpp:48
firevision::FUSE_imagelist_message_t
Image list message.
Definition: fuse.h:194
firevision::FuseImageListContent::reset_iterator
void reset_iterator()
Reset iterator.
Definition: fuse_imagelist_content.cpp:111
firevision::FuseMessageContent::payload
virtual void * payload() const
Return pointer to payload.
Definition: fuse_message_content.cpp:78
firevision::FuseImageListContent::add_imageinfo
void add_imageinfo(const char *image_id, colorspace_t colorspace, unsigned int pixel_width, unsigned int pixel_height)
Add image info.
Definition: fuse_imagelist_content.cpp:92
firevision::FuseImageListContent::next
FUSE_imageinfo_t * next()
Get next image info.
Definition: fuse_imagelist_content.cpp:131
firevision::FuseImageListContent::serialize
virtual void serialize()
Definition: fuse_imagelist_content.cpp:144