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 */
44 struct _PurpleAccount
;
45 struct _PurpleConnection
;
46 struct sipe_core_private
;
49 /** MS-PRES publication */
50 struct sipe_publication
{
55 /** for 'state' category */
57 /** for 'state:calendarState' category */
59 /** for 'note' category */
61 /** for 'calendarData' category; 300(Team) container */
62 char *working_hours_xml_str
;
64 char *free_busy_base64
;
67 struct sipe_account_data
{
68 struct _PurpleConnection
*gc
;
72 /** Allowed server events to subscribe. From register OK response. */
74 struct sip_csta
*csta
; /* For RCC - Remote Call Control */
75 gboolean subscribed_buddies
; /* whether subscribed to buddies presence */
76 gboolean access_level_set
; /* whether basic access level set */
77 gboolean initial_state_published
; /* whether we published our initial state */
78 GSList
*our_publication_keys
; /* [MS-PRES] */
79 GHashTable
*our_publications
; /* [MS-PRES] */
80 GHashTable
*user_state_publications
; /* [MS-PRES] */
81 int presence_method_version
;
82 time_t do_not_publish
[SIPE_ACTIVITY_NUM_TYPES
];
88 gboolean batched_support
; /*if there is support for batched subscription*/
89 GSList
*containers
; /* MS-PRES containers */
90 struct _PurpleAccount
*account
;
92 struct sipe_calendar
*cal
;
94 /** 2005 Custom XML piece.
95 * Possibly set by other point of presence or just other client at earlier time.
96 * It should be preserved/modified, not overwritten. This implies subscription
98 * This XML keeps OC2005:
107 * THE BIG SPLIT - temporary interfaces
109 * Previously private functions in sipe.c that are
110 * - waiting to be factored out to an appropriate module
111 * - are needed by the already created new modules
114 #ifdef _SIPE_NEED_ACTIVITIES
115 /* need to improve or reduce visibility of this interface */
116 const gchar
*sipe_activity_to_token(sipe_activity
);
117 const gchar
*sipe_activity_description(sipe_activity
);
118 sipe_activity
sipe_activity_from_token(const gchar
*token
);
119 const gchar
*sipe_activity_description_from_token(const gchar
*token
);
121 void sipe_set_unknown_status(struct sipe_core_private
*sipe_private
);
122 void sipe_set_initial_status(struct sipe_core_private
*sipe_private
);
123 void sipe_set_invisible_status(struct sipe_core_private
*sipe_private
);
124 int sipe_get_availability_by_status(const gchar
*sipe_status_id
,
125 gchar
**activity_token
);
126 const gchar
*sipe_get_status_by_availability(int avail
,
128 void sipe_get_act_avail_by_status_2005(const char *status
,
131 const gchar
*sipe_get_status_by_act_avail_2005(const int activity
,
132 const int availablity
,
133 char **activity_desc
);
134 void send_presence_status(struct sipe_core_private
*sipe_private
,
136 gboolean
sipe_is_user_state(struct sipe_core_private
*sipe_private
);
137 gboolean
sipe_is_user_available(struct sipe_core_private
*sipe_private
);
138 void sipe_apply_calendar_status(struct sipe_core_private
*sipe_private
,
139 struct sipe_buddy
*sbuddy
,
140 const char *status_id
);
142 /* libpurple memory leak workaround */
143 void sipe_blist_menu_free_containers(struct sipe_core_private
*sipe_private
);
146 * referenced by sipe-notify.c - start
148 const gchar
*sipe_get_buddy_status(struct sipe_core_private
*sipe_private
,
150 void sipe_buddy_status_from_activity(struct sipe_core_private
*sipe_private
,
152 const gchar
*activity
,
154 /* referenced by sipe-notify.c - end */
157 /*** THE BIG SPLIT END ***/