4 *****************************************************************************
5 *** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ***
7 *** THIS INTERFACE IS DEPECRATED ***
9 *** DO NOT INCLUDE IT IN ANY NEW CODE ***
11 *** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ***
12 *****************************************************************************
16 * Copyright (C) 2010-11 SIPE Project <http://sipe.sourceforge.net/>
17 * Copyright (C) 2008 Novell, Inc.
18 * Copyright (C) 2007 Anibal Avelar <avelar@gmail.com>
19 * Copyright (C) 2005 Thomas Butter <butter@uni-mannheim.de>
21 * This program is free software; you can redistribute it and/or modify
22 * it under the terms of the GNU General Public License as published by
23 * the Free Software Foundation; either version 2 of the License, or
24 * (at your option) any later version.
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License
32 * along with this program; if not, write to the Free Software
33 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37 * Interface dependencies:
43 /* Forward declarations */
45 struct _PurpleAccount
;
46 struct _PurpleConnection
;
47 struct sipe_core_private
;
49 struct transaction_payload
;
51 /** MS-PRES publication */
52 struct sipe_publication
{
57 /** for 'state' category */
59 /** for 'state:calendarState' category */
61 /** for 'note' category */
63 /** for 'calendarData' category; 300(Team) container */
64 char *working_hours_xml_str
;
66 char *free_busy_base64
;
69 struct sipe_account_data
{
70 struct _PurpleConnection
*gc
;
74 /** Allowed server events to subscribe. From register OK response. */
76 struct sip_csta
*csta
; /* For RCC - Remote Call Control */
77 gboolean subscribed_buddies
; /* whether subscribed to buddies presence */
78 gboolean access_level_set
; /* whether basic access level set */
79 gboolean initial_state_published
; /* whether we published our initial state */
80 GSList
*our_publication_keys
; /* [MS-PRES] */
81 GHashTable
*our_publications
; /* [MS-PRES] */
82 GHashTable
*user_state_publications
; /* [MS-PRES] */
83 int presence_method_version
;
84 time_t do_not_publish
[SIPE_ACTIVITY_NUM_TYPES
];
90 gboolean batched_support
; /*if there is support for batched subscription*/
91 GSList
*containers
; /* MS-PRES containers */
92 struct _PurpleAccount
*account
;
94 struct sipe_calendar
*cal
;
96 /** 2005 Custom XML piece.
97 * Possibly set by other point of presence or just other client at earlier time.
98 * It should be preserved/modified, not overwritten. This implies subscription
100 * This XML keeps OC2005:
112 send_presence_soap(struct sipe_core_private
*sipe_private
,
113 gboolean do_publish_calendar
);
116 * THE BIG SPLIT - temporary interfaces
118 * Previously private functions in sipe.c that are
119 * - waiting to be factored out to an appropriate module
120 * - are needed by the already created new modules
124 void sipe_connection_cleanup(struct sipe_core_private
*sipe_private
);
125 void sipe_buddy_free_all(struct sipe_core_private
*sipe_private
);
126 #ifdef _SIPE_NEED_ACTIVITIES
127 /* need to improve or reduce visibilty of this interface */
128 const gchar
*sipe_activity_to_token(sipe_activity
);
130 void sipe_set_initial_status(struct sipe_core_private
*sipe_private
);
131 void sipe_set_invisible_status(struct sipe_core_private
*sipe_private
);
132 int sipe_get_availability_by_status(const gchar
*sipe_status_id
,
133 gchar
**activity_token
);
134 const gchar
*sipe_get_status_by_availability(int avail
,
136 void send_presence_status(struct sipe_core_private
*sipe_private
,
138 gboolean
sipe_is_user_state(struct sipe_core_private
*sipe_private
);
139 void sipe_update_user_info(struct sipe_core_private
*sipe_private
,
141 sipe_buddy_info_fields propkey
,
142 char *property_value
);
144 /* this should be in backend? */
145 void sipe_backend_account_status_and_note(struct sipe_core_private
*sipe_private
,
146 const gchar
*status_id
);
149 const gchar
*sipe_get_no_sip_uri(const gchar
*sip_uri
);
152 * referenced by sipe-notify.c - start
154 * all of these should be moved to sipe-notify.c
156 void process_incoming_notify_msrtc(struct sipe_core_private
*sipe_private
,
159 void process_incoming_notify_rlmi(struct sipe_core_private
*sipe_private
,
162 void process_incoming_notify_pidf(struct sipe_core_private
*sipe_private
,
165 void sipe_sched_calendar_status_update(struct sipe_core_private
*sipe_private
,
166 time_t calculate_from
);
167 /* referenced by sipe-notify.c - end */
170 /*** THE BIG SPLIT END ***/