purple: take renamed API 3.x.x headers in use
[siplcs.git] / src / core / sipe-ucs.h
blobe1584fc140b3181ba8300ce02563c55390e5ba19
1 /**
2 * @file sipe-ucs.h
4 * pidgin-sipe
6 * Copyright (C) 2013 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_buddy;
26 struct sipe_core_private;
27 struct sipe_group;
28 struct sipe_ucs_transaction;
30 /**
31 * Get buddy photo
33 * This is not directly related to UCS, but we can reuse the code.
35 * @param sipe_private SIPE core private data
36 * @param uri SIP URI of the user
38 void sipe_ucs_get_photo(struct sipe_core_private *sipe_private,
39 const gchar *uri);
41 /**
42 * Has contact list been migrated to UCS?
44 * @param sipe_private SIPE core private data
46 * @return @c TRUE if contact list has been migrated
48 gboolean sipe_ucs_is_migrated(struct sipe_core_private *sipe_private);
50 /**
51 * Create new UCS transactions
53 * @param sipe_private SIPE core private data
55 * @return UCS transaction
57 struct sipe_ucs_transaction *sipe_ucs_transaction(struct sipe_core_private *sipe_private);
59 /**
60 * Add existing/new buddy to group
62 * @param sipe_private SIPE core private data
63 * @param trans UCS transaction (may be @c NULL)
64 * @param group sipe_group structure
65 * @param buddy sipe_buddy structure (may be @c NULL)
66 * @param who SIP URI of the new buddy
68 void sipe_ucs_group_add_buddy(struct sipe_core_private *sipe_private,
69 struct sipe_ucs_transaction *trans,
70 struct sipe_group *group,
71 struct sipe_buddy *buddy,
72 const gchar *who);
74 /**
75 * Remove buddy from group
77 * @param sipe_private SIPE core private data
78 * @param trans UCS transaction (may be @c NULL)
79 * @param group sipe_group structure (may be @c NULL)
80 * @param buddy sipe_buddy structure
82 void sipe_ucs_group_remove_buddy(struct sipe_core_private *sipe_private,
83 struct sipe_ucs_transaction *trans,
84 struct sipe_group *group,
85 struct sipe_buddy *buddy);
87 /**
88 * Create group
90 * @param sipe_private SIPE core private data
91 * @param trans UCS transaction (may be @c NULL)
92 * @param name name for group
93 * @param who SIP URI of the buddy to add to the new group
95 void sipe_ucs_group_create(struct sipe_core_private *sipe_private,
96 struct sipe_ucs_transaction *trans,
97 const gchar *name,
98 const gchar *who);
101 * Rename group
103 * @param sipe_private SIPE core private data
104 * @param group sipe_group structure
105 * @param new_name new name for group
107 void sipe_ucs_group_rename(struct sipe_core_private *sipe_private,
108 struct sipe_group *group,
109 const gchar *new_name);
112 * Remove group
114 * @param sipe_private SIPE core private data
115 * @param group sipe_group structure
117 void sipe_ucs_group_remove(struct sipe_core_private *sipe_private,
118 struct sipe_group *group);
121 * Initialize UCS
123 * @param sipe_private SIPE core private data
124 * @param migrated @c TRUE if contact list has been migrated
126 void sipe_ucs_init(struct sipe_core_private *sipe_private,
127 gboolean migrated);
130 * Free UCS data
132 * @param sipe_private SIPE core private data
134 void sipe_ucs_free(struct sipe_core_private *sipe_private);