1d6c16b1bf2420a04fd2813ee96ebe948ebfb769
[senf.git] / senf / Packets / PacketTypes.hh
1 // $Id$
2 //
3 // Copyright (C) 2007
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 //
6 // The contents of this file are subject to the Fraunhofer FOKUS Public License
7 // Version 1.0 (the "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at 
9 // http://senf.berlios.de/license.html
10 //
11 // The Fraunhofer FOKUS Public License Version 1.0 is based on, 
12 // but modifies the Mozilla Public License Version 1.1.
13 // See the full license text for the amendments.
14 //
15 // Software distributed under the License is distributed on an "AS IS" basis, 
16 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
17 // for the specific language governing rights and limitations under the License.
18 //
19 // The Original Code is Fraunhofer FOKUS code.
20 //
21 // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. 
22 // (registered association), Hansastraße 27 c, 80686 Munich, Germany.
23 // All Rights Reserved.
24 //
25 // Contributor(s):
26 //   Stefan Bund <g0dil@berlios.de>
27
28 /** \file
29     \brief PacketTypes public header */
30
31 #ifndef HH_SENF_Packets_PacketTypes_
32 #define HH_SENF_Packets_PacketTypes_ 1
33
34 // Custom includes
35 #include <vector>
36 #include <boost/intrusive_ptr.hpp>
37 #include <boost/cstdint.hpp>
38 #include <senf/boost_intrusive/ilist.hpp>
39 #include <senf/boost_intrusive/ilist_hook.hpp>
40
41 //#include "PacketTypes.mpp"
42 //-/////////////////////////////////////////////////////////////////////////////////////////////////
43
44 namespace senf {
45
46     class PacketData;
47     class PacketInterpreterBase;
48
49 namespace detail {
50
51     class PacketImpl;
52
53 namespace packet {
54
55     /** \brief Internal: Template typedef for used smart pointer
56
57         \internal
58      */
59     template <class T>
60     struct smart_pointer {
61         typedef boost::intrusive_ptr<T> ptr_t;
62     };
63
64     struct interpreter_list_tag;
65     typedef boost::intrusive::ilist_base_hook<interpreter_list_tag> interpreter_list_base;
66     typedef interpreter_list_base::value_traits<PacketInterpreterBase> interpreter_list_type;
67
68     typedef boost::intrusive::ilist<interpreter_list_type,false> interpreter_list;
69
70     typedef boost::uint8_t byte;
71     typedef std::vector<byte> raw_container;
72     typedef raw_container::size_type size_type;
73     typedef raw_container::difference_type difference_type;
74
75     typedef raw_container::iterator iterator;
76     typedef raw_container::const_iterator const_iterator;
77     typedef long refcount_t; // This is long since boost uses long for refcounts .. hmm ..
78
79 namespace test {
80
81     class TestDriver;
82
83 }}}}
84
85 //-/////////////////////////////////////////////////////////////////////////////////////////////////
86 #endif
87 #if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_PacketTypes_i_)
88 #define HH_SENF_Packets_PacketTypes_i_
89 //#include "PacketTypes.cci"
90 //#include "PacketTypes.ct"
91 //#include "PacketTypes.cti"
92 #endif
93
94 \f
95 // Local Variables:
96 // mode: c++
97 // fill-column: 100
98 // c-file-style: "senf"
99 // indent-tabs-mode: nil
100 // ispell-local-dictionary: "american"
101 // compile-command: "scons -u test"
102 // comment-column: 40
103 // End: