2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU Library General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
17 #ifndef PURPLE_BONJOUR_BUDDY_H
18 #define PURPLE_BONJOUR_BUDDY_H
28 PurpleAccount
*account
;
48 BonjourJabberConversation
*conversation
;
50 gpointer mdns_impl_data
;
53 static const char *const buddy_TXT_records
[] = {
63 /* "port.p2pj", Deprecated - MUST ignore */
65 /* "txtvers", Deprecated - hardcoded to 1 */
68 "AIM", /* non standard */
73 * Creates a new buddy.
75 BonjourBuddy
*bonjour_buddy_new(const gchar
*name
, PurpleAccount
*account
);
78 * Clear any existing values from the buddy.
79 * This is called before updating so that we can notice removals
81 void clear_bonjour_buddy_values(BonjourBuddy
*buddy
);
84 * Sets a value in the BonjourBuddy struct, destroying the old value
86 void set_bonjour_buddy_value(BonjourBuddy
*buddy
, const char *record_key
, const char *value
, guint32 len
);
89 * Check if all the compulsory buddy data is present.
91 gboolean
bonjour_buddy_check(BonjourBuddy
*buddy
);
94 * If the buddy doesn't previously exists, it is created. Else, its data is changed (???)
95 * purple_buddy is optional; it saves an additional lookup if we already have it
97 void bonjour_buddy_add_to_purple(BonjourBuddy
*bonjour_buddy
, PurpleBuddy
*purple_buddy
);
100 * The buddy has signed off Bonjour.
101 * If the buddy is being saved, mark as offline, otherwise delete
103 void bonjour_buddy_signed_off(PurpleBuddy
*purple_buddy
);
106 * We got the buddy icon data; deal with it
108 void bonjour_buddy_got_buddy_icon(BonjourBuddy
*buddy
, gconstpointer data
, gsize len
);
111 * Deletes a buddy from memory.
113 void bonjour_buddy_delete(BonjourBuddy
*buddy
);
115 #endif /* PURPLE_BONJOUR_BUDDY_H */