Move include files in debian packge into 'senf' subdirectory
[senf.git] / Packets / PacketTypes.hh
1 // Copyright (C) 2007 
2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
4 //     Stefan Bund <g0dil@berlios.de>
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20
21 /** \file
22     \brief PacketTypes public header */
23
24 #ifndef HH_PacketTypes_
25 #define HH_PacketTypes_ 1
26
27 // Custom includes
28 #include <vector>
29 #include <boost/intrusive_ptr.hpp>
30 #include <boost/cstdint.hpp>
31 #include "../boost/intrusive/ilist.hpp"
32 #include "../boost/intrusive/ilist_hook.hpp"
33
34 //#include "PacketTypes.mpp"
35 ///////////////////////////////hh.p////////////////////////////////////////
36
37 namespace senf {
38
39     class PacketData;
40     class PacketInterpreterBase;
41
42 namespace detail {
43
44     class PacketImpl;
45
46 namespace packet {
47
48     /** \brief Internal: Tempalte typedef for used smart pointer
49
50         \internal
51      */
52     template <class T>
53     struct smart_pointer {
54         typedef boost::intrusive_ptr<T> ptr_t;
55     };
56     
57     struct interpreter_list_tag;
58     typedef boost::intrusive::ilist_base_hook<interpreter_list_tag> interpreter_list_base;
59     typedef interpreter_list_base::value_traits<PacketInterpreterBase> interpreter_list_type;
60
61     typedef boost::intrusive::ilist<interpreter_list_type,false> interpreter_list;
62
63     typedef boost::uint8_t byte;
64     typedef std::vector<byte> raw_container;
65     typedef raw_container::size_type size_type;
66     typedef raw_container::difference_type difference_type;
67     
68     typedef raw_container::iterator iterator;
69     typedef raw_container::const_iterator const_iterator;
70     typedef long refcount_t; // This is long since boost uses long for refcounts .. hmm ..
71
72 namespace test {
73
74     class TestDriver;
75
76 }}}}
77
78 ///////////////////////////////hh.e////////////////////////////////////////
79 #endif
80 #if !defined(SENF_PACKETS_DECL_ONLY) && !defined(HH_PacketTypes_i_)
81 #define HH_PacketTypes_i_
82 //#include "PacketTypes.cci"
83 //#include "PacketTypes.ct"
84 //#include "PacketTypes.cti"
85 #endif
86
87 \f
88 // Local Variables:
89 // mode: c++
90 // fill-column: 100
91 // c-file-style: "senf"
92 // indent-tabs-mode: nil
93 // ispell-local-dictionary: "american"
94 // compile-command: "scons -u test"
95 // comment-column: 40
96 // End: