1 /*
2  * SkypeWeb Plugin for libpurple/Pidgin
3  * Copyright (c) 2014-2015 Eion Robb
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef SKYPEWEB_CONTACTS_H
20 #define SKYPEWEB_CONTACTS_H
21 
22 #include "libskypeweb.h"
23 
24 void skypeweb_get_icon(PurpleBuddy *buddy);
25 void skypeweb_download_uri_to_conv(SkypeWebAccount *sa, const gchar *uri, PurpleConversation *conv, time_t ts, const gchar* from);
26 void skypeweb_download_video_message(SkypeWebAccount *sa, const gchar *sid, PurpleConversation *conv);
27 void skypeweb_download_moji_to_conv(SkypeWebAccount *sa, const gchar *text, const gchar *url_thumbnail, PurpleConversation *conv, time_t ts, const gchar* from);
28 void skypeweb_present_uri_as_filetransfer(SkypeWebAccount *sa, const gchar *uri, const gchar *from);
29 
30 PurpleXfer *skypeweb_new_xfer(
31 #if PURPLE_VERSION_CHECK(3, 0, 0)
32 PurpleProtocolXfer *prplxfer,
33 #endif
34 PurpleConnection *pc, const char *who);
35 
36 void skypeweb_send_file(
37 #if PURPLE_VERSION_CHECK(3, 0, 0)
38 PurpleProtocolXfer *prplxfer,
39 #endif
40 PurpleConnection *pc, const gchar *who, const gchar *filename);
41 
42 gboolean skypeweb_can_receive_file(
43 #if PURPLE_VERSION_CHECK(3, 0, 0)
44 PurpleProtocolXfer *prplxfer,
45 #endif
46 PurpleConnection *pc, const gchar *who);
47 
48 void skypeweb_search_users(PurpleProtocolAction *action);
49 
50 void skypeweb_received_contacts(SkypeWebAccount *sa, PurpleXmlNode *contacts);
51 
52 void skypeweb_get_friend_profiles(SkypeWebAccount *sa, GSList *contacts);
53 void skypeweb_get_friend_profile(SkypeWebAccount *sa, const gchar *who);
54 
55 void skypeweb_get_friend_list(SkypeWebAccount *sa);
56 void skypeweb_get_info(PurpleConnection *pc, const gchar *username);
57 void skypeweb_get_self_details(SkypeWebAccount *sa);
58 
59 void skypeweb_buddy_remove(PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group);
60 void skypeweb_add_buddy_with_invite(PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group, const char* message);
61 void skypeweb_add_buddy(PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group);
62 void skypeweb_buddy_block(PurpleConnection *pc, const char *name);
63 void skypeweb_buddy_unblock(PurpleConnection *pc, const char *name);
64 
65 gboolean skypeweb_check_authrequests(SkypeWebAccount *sa);
66 
67 void skypeweb_set_mood_message(SkypeWebAccount *sa, const gchar *mood);
68 
69 void skypeweb_contact_suggestions(PurpleProtocolAction *action);
70 
71 #endif /* SKYPEWEB_CONTACTS_H */
72