md4: remove dependencies on NSS headers
[siplcs.git] / src / core / sipe-core-private.h
blobee9436b3b6de734ca4fc2f729b1635010c7858ca
1 /**
2 * @file sipe-core-private.h
4 * pidgin-sipe
6 * Copyright (C) 2010 SIPE Project <http://sipe.sourceforge.net/>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /* Forward declarations */
24 struct sip_service_data;
25 struct sip_transport;
26 struct sipe_media_call_private;
27 struct sipe_groupchat;
28 struct sipe_svc;
30 /**
31 * Private part of the Sipe data structure
33 * This part contains the information only needed by the core
35 struct sipe_account_data; /* to be removed... */
36 struct sipe_core_private {
37 /**
38 * The public part is the first item, i.e. a pointer to the
39 * public part can also be used as a pointer to the private part.
41 struct sipe_core_public public;
43 /* sip-transport.c private data */
44 struct sip_transport *transport;
45 const struct sip_service_data *service_data;
46 guint transport_type;
48 /* SIPE protocol information */
49 gchar *username;
50 gchar *contact;
51 gchar *epid;
52 gchar *focus_factory_uri;
53 GSList *sessions;
54 GSList *sessions_to_accept;
56 /* Buddies */
57 GHashTable *buddies;
59 /* Scheduling system */
60 GSList *timeouts;
62 /* Active subscriptions */
63 GHashTable *subscriptions;
65 /* Voice call */
66 struct sipe_media_call_private *media_call;
67 /**
68 * Provides the necessary information on where we can obtain
69 * credentials for the A/V Edge server service.
71 gchar *mras_uri;
72 gchar *media_relay_username;
73 gchar *media_relay_password;
74 GSList *media_relays;
76 /* Group chat */
77 struct sipe_groupchat *groupchat;
79 /* @TODO: move to purple backend when menu code moves */
80 GSList *blist_menu_containers;
82 struct sipe_dns_query *dns_query;
84 /* Web services */
85 struct sipe_svc *svc;
87 /* the original data structure*/
88 struct sipe_account_data *temporary;
91 /**
92 * Flags - stored in sipe_core_public.flags but names not exported
94 /* server is OCS2007+ */
95 #define SIPE_CORE_PRIVATE_FLAG_OCS2007 0x80000000
96 /* we are connected from outside the enterprise network boundary
97 * via Edge Server */
98 #define SIPE_CORE_PRIVATE_FLAG_REMOTE_USER 0x40000000
99 /* multiple points of presence detected */
100 #define SIPE_CORE_PRIVATE_FLAG_MPOP 0x20000000
102 #define SIPE_CORE_PUBLIC_FLAG_IS(flag) \
103 ((sipe_private->public.flags & SIPE_CORE_FLAG_ ## flag) == SIPE_CORE_FLAG_ ## flag)
104 #define SIPE_CORE_PUBLIC_FLAG_SET(flag) \
105 (sipe_private->public.flags |= SIPE_CORE_FLAG_ ## flag)
106 #define SIPE_CORE_PUBLIC_FLAG_UNSET(flag) \
107 (sipe_private->public.flags &= ~SIPE_CORE_FLAG_ ## flag)
108 #define SIPE_CORE_PRIVATE_FLAG_IS(flag) \
109 ((sipe_private->public.flags & SIPE_CORE_PRIVATE_FLAG_ ## flag) == SIPE_CORE_PRIVATE_FLAG_ ## flag)
110 #define SIPE_CORE_PRIVATE_FLAG_SET(flag) \
111 (sipe_private->public.flags |= SIPE_CORE_PRIVATE_FLAG_ ## flag)
112 #define SIPE_CORE_PRIVATE_FLAG_UNSET(flag) \
113 (sipe_private->public.flags &= ~SIPE_CORE_PRIVATE_FLAG_ ## flag)
115 /* Convenience macros */
116 #define SIPE_CORE_PRIVATE ((struct sipe_core_private *)sipe_public)
117 #define SIPE_CORE_PUBLIC ((struct sipe_core_public *)sipe_private)
119 /* Transition macros */
120 #define SIPE_ACCOUNT_DATA SIPE_CORE_PRIVATE->temporary
121 #define SIPE_ACCOUNT_DATA_PRIVATE sipe_private->temporary
124 Local Variables:
125 mode: c
126 c-file-style: "bsd"
127 indent-tabs-mode: t
128 tab-width: 8
129 End: