libgnomevfsmm  2.26.0
address.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _LIBGNOMEVFSMM_ADDRESS_H
4 #define _LIBGNOMEVFSMM_ADDRESS_H
5 
6 
7 #include <glibmm.h>
8 
9 /* Copyright 2003 gnome-vfsmm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library 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 GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free
23  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25 
26 #include <libgnomevfs/gnome-vfs-address.h>
27 
28 #include <libgnomevfsmm/enums.h>
30 
31 
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 extern "C" { typedef struct _GnomeVFSAddress GnomeVFSAddress; }
34 #endif
35 
36 namespace Gnome
37 {
38 
39 namespace Vfs
40 {
41 
42 class Address
43 {
44  public:
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46  typedef Address CppObjectType;
47  typedef GnomeVFSAddress BaseObjectType;
48 
49  static GType get_type() G_GNUC_CONST;
50 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
51 
52  Address();
53 
54  explicit Address(GnomeVFSAddress* gobject, bool make_a_copy = true);
55 
56  Address(const Address& other);
57  Address& operator=(const Address& other);
58 
59  ~Address();
60 
61  void swap(Address& other);
62 
64  GnomeVFSAddress* gobj() { return gobject_; }
65 
67  const GnomeVFSAddress* gobj() const { return gobject_; }
68 
70  GnomeVFSAddress* gobj_copy() const;
71 
72 protected:
73  GnomeVFSAddress* gobject_;
74 
75 private:
76 
77 public:
78 
79 
80 public:
81  explicit Address(const Glib::ustring& address);
82  explicit Address(guint32 ipv4_address);
83  explicit Address(struct sockaddr* sa, int len);
84 
85 
86  int get_family_type() const;
87 
88  Glib::ustring to_string() const;
89 
90  guint32 get_ipv4() const;
91  //gtkmmproc error: gnome_vfs_address_get_sockaddr : method defs lookup failed (1)
92 
93  GnomeVFSAddress** gobj_addr() { return &gobject_; }
94 
95 
96 };
97 
98 } // namespace Vfs
99 } // namespace Gnome
100 
101 
102 namespace Gnome
103 {
104 
105 namespace Vfs
106 {
107 
112 inline void swap(Address& lhs, Address& rhs)
113  { lhs.swap(rhs); }
114 
115 } // namespace Vfs
116 
117 } // namespace Gnome
118 
119 namespace Glib
120 {
121 
130 Gnome::Vfs::Address wrap(GnomeVFSAddress* object, bool take_copy = false);
131 
132 #ifndef DOXYGEN_SHOULD_SKIP_THIS
133 template <>
134 class Value<Gnome::Vfs::Address> : public Glib::Value_Boxed<Gnome::Vfs::Address>
135 {};
136 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
137 
138 } // namespace Glib
139 
140 
141 #endif /* _LIBGNOMEVFSMM_ADDRESS_H */
142