add "603 Decline" response to undelivered message handling
[siplcs.git] / src / core / sipe-core-private.h
blob400453e4dbdac32de8a288fbca6277ed03e77d40
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;
29 /**
30 * Private part of the Sipe data structure
32 * This part contains the information only needed by the core
34 struct sipe_account_data; /* to be removed... */
35 struct sipe_core_private {
36 /**
37 * The public part is the first item, i.e. a pointer to the
38 * public part can also be used as a pointer to the private part.
40 struct sipe_core_public public;
42 /* sip-transport.c private data */
43 struct sip_transport *transport;
44 const struct sip_service_data *service_data;
45 guint transport_type;
47 /* SIPE protocol information */
48 gchar *username;
49 gchar *contact;
50 gchar *epid;
51 gchar *focus_factory_uri;
52 GSList *sessions;
54 /* Buddies */
55 GHashTable *buddies;
57 /* Scheduling system */
58 GSList *timeouts;
60 /* Active subscriptions */
61 GHashTable *subscriptions;
63 /* Voice call */
64 struct sipe_media_call_private *media_call;
65 /**
66 * Provides the necessary information on where we can obtain
67 * credentials for the A/V Edge server service.
69 gchar *mras_uri;
70 gchar *media_relay_username;
71 gchar *media_relay_password;
72 GSList *media_relays;
75 /* Group chat */
76 struct sipe_groupchat *groupchat;
78 /* @TODO: move to purple backend when menu code moves */
79 GSList *blist_menu_containers;
81 struct sipe_dns_query *dns_query;
83 /* the original data structure*/
84 struct sipe_account_data *temporary;
87 /**
88 * Flags - stored in sipe_core_public.flags but names not exported
90 /* server is OCS2007+ */
91 #define SIPE_CORE_PRIVATE_FLAG_OCS2007 0x80000000
92 /* we are connected from outside the enterprise network boundary
93 * via Edge Server */
94 #define SIPE_CORE_PRIVATE_FLAG_REMOTE_USER 0x40000000
96 #define SIPE_CORE_PUBLIC_FLAG_IS(flag) \
97 ((sipe_private->public.flags & SIPE_CORE_FLAG_ ## flag) == SIPE_CORE_FLAG_ ## flag)
98 #define SIPE_CORE_PUBLIC_FLAG_SET(flag) \
99 (sipe_private->public.flags |= SIPE_CORE_FLAG_ ## flag)
100 #define SIPE_CORE_PUBLIC_FLAG_UNSET(flag) \
101 (sipe_private->public.flags &= ~SIPE_CORE_FLAG_ ## flag)
102 #define SIPE_CORE_PRIVATE_FLAG_IS(flag) \
103 ((sipe_private->public.flags & SIPE_CORE_PRIVATE_FLAG_ ## flag) == SIPE_CORE_PRIVATE_FLAG_ ## flag)
104 #define SIPE_CORE_PRIVATE_FLAG_SET(flag) \
105 (sipe_private->public.flags |= SIPE_CORE_PRIVATE_FLAG_ ## flag)
106 #define SIPE_CORE_PRIVATE_FLAG_UNSET(flag) \
107 (sipe_private->public.flags &= ~SIPE_CORE_PRIVATE_FLAG_ ## flag)
109 /* Convenience macros */
110 #define SIPE_CORE_PRIVATE ((struct sipe_core_private *)sipe_public)
111 #define SIPE_CORE_PUBLIC ((struct sipe_core_public *)sipe_private)
113 /* Transition macros */
114 #define SIPE_ACCOUNT_DATA SIPE_CORE_PRIVATE->temporary
115 #define SIPE_ACCOUNT_DATA_PRIVATE sipe_private->temporary
118 Local Variables:
119 mode: c
120 c-file-style: "bsd"
121 indent-tabs-mode: t
122 tab-width: 8
123 End: