ucs: add AddImContactToGroup operation
[siplcs.git] / src / core / sipe-ucs.h
bloba9a2be7ef49636fc03244a601cbe75a945b2f0ff
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;
29 /**
30 * Get buddy photo
32 * This is not directly related to UCS, but we can reuse the code.
34 * @param sipe_private SIPE core private data
35 * @param uri SIP URI of the user
37 void sipe_ucs_get_photo(struct sipe_core_private *sipe_private,
38 const gchar *uri);
40 /**
41 * Has contact list been migrated to UCS?
43 * @param sipe_private SIPE core private data
45 * @return @c TRUE if contact list has been migrated
47 gboolean sipe_ucs_is_migrated(struct sipe_core_private *sipe_private);
49 /**
50 * Add buddy to group
52 * @param sipe_private SIPE core private data
53 * @param group sipe_group structure
54 * @param buddy sipe_buddy structure
56 void sipe_ucs_group_add_buddy(struct sipe_core_private *sipe_private,
57 struct sipe_group *group,
58 struct sipe_buddy *buddy);
60 /**
61 * Remove buddy from group
63 * @param sipe_private SIPE core private data
64 * @param group sipe_group structure (may be @c NULL)
65 * @param buddy sipe_buddy structure
67 void sipe_ucs_group_remove_buddy(struct sipe_core_private *sipe_private,
68 struct sipe_group *group,
69 struct sipe_buddy *buddy);
71 /**
72 * Create group
74 * @param sipe_private SIPE core private data
75 * @param name name for group
76 * @param who SIP URI of the buddy to add to the new group
78 void sipe_ucs_group_create(struct sipe_core_private *sipe_private,
79 const gchar *name,
80 const gchar *who);
82 /**
83 * Rename group
85 * @param sipe_private SIPE core private data
86 * @param group sipe_group structure
87 * @param new_name new name for group
89 void sipe_ucs_group_rename(struct sipe_core_private *sipe_private,
90 struct sipe_group *group,
91 const gchar *new_name);
93 /**
94 * Remove group
96 * @param sipe_private SIPE core private data
97 * @param group sipe_group structure
99 void sipe_ucs_group_remove(struct sipe_core_private *sipe_private,
100 struct sipe_group *group);
103 * Initialize UCS
105 * @param sipe_private SIPE core private data
106 * @param migrated @c TRUE if contact list has been migrated
108 void sipe_ucs_init(struct sipe_core_private *sipe_private,
109 gboolean migrated);
112 * Free UCS data
114 * @param sipe_private SIPE core private data
116 void sipe_ucs_free(struct sipe_core_private *sipe_private);