ocs2007: refactor sipe_ocs2007_status_from_legacy_availability()
[siplcs.git] / src / core / sipe-ocs2007.h
blob49625fa198cf235037d31f8a1b307a6f6bfc55b5
1 /**
2 * @file sipe-ocs2007.h
4 * pidgin-sipe
6 * Copyright (C) 2011 SIPE Project <http://sipe.sourceforge.net/>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 /* Forward declarations */
25 struct sipmsg;
26 struct sipe_container;
27 struct sipe_core_private;
29 /**
30 * Member is directly placed to access level container.
31 * For example SIP URI of user is in the container.
33 #define SIPE_OCS2007_INDENT_MARKED_FMT "* %s"
35 /**
36 * OCS2007 status ID, availability & activity
38 guint sipe_ocs2007_availability_from_status(const gchar *sipe_status_id,
39 const gchar **activity_token);
40 const gchar *sipe_ocs2007_status_from_legacy_availability(guint availability);
41 const gchar *sipe_ocs2007_legacy_activity_description(guint availability);
42 gboolean sipe_ocs2007_status_is_busy(const gchar *status_id);
43 gboolean sipe_ocs2007_availability_is_away(guint availability);
45 /**
46 * Publish status (OCS2007+)
48 void sipe_ocs2007_presence_publish(struct sipe_core_private *sipe_private,
49 gpointer unused);
50 void sipe_ocs2007_free(struct sipe_core_private *sipe_private);
51 void sipe_ocs2007_category_publish(struct sipe_core_private *sipe_private);
52 void sipe_ocs2007_reset_status(struct sipe_core_private *sipe_private);
53 void sipe_ocs2007_process_roaming_self(struct sipe_core_private *sipe_private,
54 struct sipmsg *msg);
56 /**
57 * OCS2007 Access Levels
59 const gchar *sipe_ocs2007_access_level_name(guint id);
60 int sipe_ocs2007_find_access_level(struct sipe_core_private *sipe_private,
61 const gchar *type,
62 const gchar *value,
63 gboolean *is_group_access);
64 void sipe_ocs2007_change_access_level(struct sipe_core_private *sipe_private,
65 const int container_id,
66 const gchar *type,
67 const gchar *value);
69 /* buddy menu */
70 struct sipe_backend_buddy_menu *sipe_ocs2007_access_control_menu(struct sipe_core_private *sipe_private,
71 const gchar *buddy_name);
74 Local Variables:
75 mode: c
76 c-file-style: "bsd"
77 indent-tabs-mode: t
78 tab-width: 8
79 End: