purple: work around broken dbus-server.h
[siplcs.git] / src / core / sipe-ucs.h
blob1664186ff8d95eaee7cd123a2d317af32a886473
1 /**
2 * @file sipe-ucs.h
4 * pidgin-sipe
6 * Copyright (C) 2013-2016 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 sipe_backend_search_token;
26 struct sipe_buddy;
27 struct sipe_core_private;
28 struct sipe_group;
29 struct sipe_ucs_transaction;
31 /**
32 * Search EWS contact list
34 * This is not directly related to UCS, but we can reuse the code.
36 * @param sipe_private SIPE core private data
37 * @param token opaque search token provided by backend
38 * @param given_name search parameters provided by the user...
39 * @param surname
40 * @param email
41 * @param sipid
42 * @param company
43 * @param country
45 void sipe_ucs_search(struct sipe_core_private *sipe_private,
46 struct sipe_backend_search_token *token,
47 const gchar *given_name,
48 const gchar *surname,
49 const gchar *email,
50 const gchar *sipid,
51 const gchar *company,
52 const gchar *country);
54 /**
55 * Has contact list been migrated to UCS?
57 * @param sipe_private SIPE core private data
59 * @return @c TRUE if contact list has been migrated
61 gboolean sipe_ucs_is_migrated(struct sipe_core_private *sipe_private);
63 /**
64 * Returns UCS EWS URL
66 * @param sipe_private SIPE core private data
68 * @return EWS URL string
70 const gchar *sipe_ucs_ews_url(struct sipe_core_private *sipe_private);
72 /**
73 * Create new UCS transactions
75 * @param sipe_private SIPE core private data
77 * @return UCS transaction
79 struct sipe_ucs_transaction *sipe_ucs_transaction(struct sipe_core_private *sipe_private);
81 /**
82 * Add existing/new buddy to group
84 * @param sipe_private SIPE core private data
85 * @param trans UCS transaction (may be @c NULL)
86 * @param group sipe_group structure
87 * @param buddy sipe_buddy structure (may be @c NULL)
88 * @param who SIP URI of the new buddy
90 void sipe_ucs_group_add_buddy(struct sipe_core_private *sipe_private,
91 struct sipe_ucs_transaction *trans,
92 struct sipe_group *group,
93 struct sipe_buddy *buddy,
94 const gchar *who);
96 /**
97 * Remove buddy from group
99 * @param sipe_private SIPE core private data
100 * @param trans UCS transaction (may be @c NULL)
101 * @param group sipe_group structure (may be @c NULL)
102 * @param buddy sipe_buddy structure
104 void sipe_ucs_group_remove_buddy(struct sipe_core_private *sipe_private,
105 struct sipe_ucs_transaction *trans,
106 struct sipe_group *group,
107 struct sipe_buddy *buddy);
110 * Create group
112 * @param sipe_private SIPE core private data
113 * @param trans UCS transaction (may be @c NULL)
114 * @param name name for group
115 * @param who SIP URI of the buddy to add to the new group
117 void sipe_ucs_group_create(struct sipe_core_private *sipe_private,
118 struct sipe_ucs_transaction *trans,
119 const gchar *name,
120 const gchar *who);
123 * Rename group
125 * @param sipe_private SIPE core private data
126 * @param group sipe_group structure
127 * @param new_name new name for group
129 void sipe_ucs_group_rename(struct sipe_core_private *sipe_private,
130 struct sipe_group *group,
131 const gchar *new_name);
134 * Remove group
136 * @param sipe_private SIPE core private data
137 * @param group sipe_group structure
139 void sipe_ucs_group_remove(struct sipe_core_private *sipe_private,
140 struct sipe_group *group);
143 * Initialize UCS
145 * @param sipe_private SIPE core private data
146 * @param migrated @c TRUE if contact list has been migrated
148 void sipe_ucs_init(struct sipe_core_private *sipe_private,
149 gboolean migrated);
152 * Free UCS data
154 * @param sipe_private SIPE core private data
156 void sipe_ucs_free(struct sipe_core_private *sipe_private);