source: proiecte/PPPP/gdm/common/gdm-address.h @ 134

Last change on this file since 134 was 134, checked in by (none), 14 years ago

gdm sources with the modifications for webcam

File size: 3.0 KB
Line 
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21
22#ifndef __GDM_ADDRESS_H
23#define __GDM_ADDRESS_H
24
25#include <glib-object.h>
26#ifndef G_OS_WIN32
27#include <sys/types.h>
28#include <sys/socket.h>
29#include <netdb.h>
30#else
31#include <winsock2.h>
32#undef interface
33#endif
34
35G_BEGIN_DECLS
36
37#define GDM_TYPE_ADDRESS (gdm_address_get_type ())
38
39typedef struct _GdmAddress GdmAddress;
40
41GType                    gdm_address_get_type                  (void);
42
43GdmAddress *             gdm_address_new_from_sockaddr         (struct sockaddr *sa,
44                                                                size_t           size);
45
46int                      gdm_address_get_family_type           (GdmAddress              *address);
47struct sockaddr_storage *gdm_address_get_sockaddr_storage      (GdmAddress              *address);
48struct sockaddr_storage *gdm_address_peek_sockaddr_storage     (GdmAddress              *address);
49
50gboolean                 gdm_address_get_hostname              (GdmAddress              *address,
51                                                                char                   **hostname);
52gboolean                 gdm_address_get_numeric_info          (GdmAddress              *address,
53                                                                char                   **numeric_hostname,
54                                                                char                   **service);
55gboolean                 gdm_address_is_local                  (GdmAddress              *address);
56gboolean                 gdm_address_is_loopback               (GdmAddress              *address);
57
58gboolean                 gdm_address_equal                     (GdmAddress              *a,
59                                                                GdmAddress              *b);
60
61GdmAddress *             gdm_address_copy                      (GdmAddress              *address);
62void                     gdm_address_free                      (GdmAddress              *address);
63
64
65void                     gdm_address_debug                     (GdmAddress              *address);
66
67const GList *            gdm_address_peek_local_list           (void);
68
69
70G_END_DECLS
71
72#endif /* __GDM_ADDRESS_H */
Note: See TracBrowser for help on using the repository browser.