core cleanup: start on the access levels control menu
[siplcs.git] / src / core / sipe-ocs2007.h
blob35c45a44bf65d5ebbc004c8610ebf8d8a659645a
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_away2(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);
57 /* this API needs to be refactored once access level menu creation is
58 refactored correctly to the backend out of sipe.c */
59 guint sipe_ocs2007_containers(void);
60 const gchar *sipe_ocs2007_access_level_name(guint id);
61 int sipe_ocs2007_container_id(guint index);
62 struct sipe_container *sipe_ocs2007_create_container(guint index,
63 const gchar *member_type,
64 const gchar *member_value,
65 gboolean is_group);
66 int sipe_ocs2007_find_access_level(struct sipe_core_private *sipe_private,
67 const gchar *type,
68 const gchar *value,
69 gboolean *is_group_access);
70 void sipe_ocs2007_change_access_level(struct sipe_core_private *sipe_private,
71 const int container_id,
72 const gchar *type,
73 const gchar *value);
74 void sipe_ocs2007_change_access_level_from_container(struct sipe_core_private *sipe_private,
75 struct sipe_container *container);
76 void sipe_ocs2007_change_access_level_for_domain(struct sipe_core_private *sipe_private,
77 const gchar *domain,
78 guint index);
79 GSList *sipe_ocs2007_get_access_domains(struct sipe_core_private *sipe_private);
81 /* buddy menu */
82 struct sipe_backend_buddy_menu *sipe_ocs2007_access_control_menu(struct sipe_core_private *sipe_private,
83 const gchar *buddy_name);
86 Local Variables:
87 mode: c
88 c-file-style: "bsd"
89 indent-tabs-mode: t
90 tab-width: 8
91 End: