media: also fill zero ports of active candidates
[siplcs.git] / src / core / sipe-ucs.h
blob19610414ff8335210de520ccebc633721d969932
1 /**
2 * @file sipe-ucs.h
4 * pidgin-sipe
6 * Copyright (C) 2013-2014 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 * Get buddy photo
34 * This is not directly related to UCS, but we can reuse the code.
36 * @param sipe_private SIPE core private data
37 * @param uri SIP URI of the user
39 void sipe_ucs_get_photo(struct sipe_core_private *sipe_private,
40 const gchar *uri);
42 /**
43 * Search EWS contact list
45 * This is not directly related to UCS, but we can reuse the code.
47 * @param sipe_private SIPE core private data
48 * @param token opaque search token provided by backend
49 * @param given_name search parameters provided by the user...
50 * @param surname
51 * @param email
52 * @param sipid
53 * @param company
54 * @param country
56 void sipe_ucs_search(struct sipe_core_private *sipe_private,
57 struct sipe_backend_search_token *token,
58 const gchar *given_name,
59 const gchar *surname,
60 const gchar *email,
61 const gchar *sipid,
62 const gchar *company,
63 const gchar *country);
65 /**
66 * Has contact list been migrated to UCS?
68 * @param sipe_private SIPE core private data
70 * @return @c TRUE if contact list has been migrated
72 gboolean sipe_ucs_is_migrated(struct sipe_core_private *sipe_private);
74 /**
75 * Create new UCS transactions
77 * @param sipe_private SIPE core private data
79 * @return UCS transaction
81 struct sipe_ucs_transaction *sipe_ucs_transaction(struct sipe_core_private *sipe_private);
83 /**
84 * Add existing/new buddy to group
86 * @param sipe_private SIPE core private data
87 * @param trans UCS transaction (may be @c NULL)
88 * @param group sipe_group structure
89 * @param buddy sipe_buddy structure (may be @c NULL)
90 * @param who SIP URI of the new buddy
92 void sipe_ucs_group_add_buddy(struct sipe_core_private *sipe_private,
93 struct sipe_ucs_transaction *trans,
94 struct sipe_group *group,
95 struct sipe_buddy *buddy,
96 const gchar *who);
98 /**
99 * Remove buddy from group
101 * @param sipe_private SIPE core private data
102 * @param trans UCS transaction (may be @c NULL)
103 * @param group sipe_group structure (may be @c NULL)
104 * @param buddy sipe_buddy structure
106 void sipe_ucs_group_remove_buddy(struct sipe_core_private *sipe_private,
107 struct sipe_ucs_transaction *trans,
108 struct sipe_group *group,
109 struct sipe_buddy *buddy);
112 * Create group
114 * @param sipe_private SIPE core private data
115 * @param trans UCS transaction (may be @c NULL)
116 * @param name name for group
117 * @param who SIP URI of the buddy to add to the new group
119 void sipe_ucs_group_create(struct sipe_core_private *sipe_private,
120 struct sipe_ucs_transaction *trans,
121 const gchar *name,
122 const gchar *who);
125 * Rename group
127 * @param sipe_private SIPE core private data
128 * @param group sipe_group structure
129 * @param new_name new name for group
131 void sipe_ucs_group_rename(struct sipe_core_private *sipe_private,
132 struct sipe_group *group,
133 const gchar *new_name);
136 * Remove group
138 * @param sipe_private SIPE core private data
139 * @param group sipe_group structure
141 void sipe_ucs_group_remove(struct sipe_core_private *sipe_private,
142 struct sipe_group *group);
145 * Initialize UCS
147 * @param sipe_private SIPE core private data
148 * @param migrated @c TRUE if contact list has been migrated
150 void sipe_ucs_init(struct sipe_core_private *sipe_private,
151 gboolean migrated);
154 * Free UCS data
156 * @param sipe_private SIPE core private data
158 void sipe_ucs_free(struct sipe_core_private *sipe_private);