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
27 PurpleAccount
*account
;
47 BonjourJabberConversation
*conversation
;
49 gpointer mdns_impl_data
;
52 static const char *const buddy_TXT_records
[] = {
62 /* "port.p2pj", Deprecated - MUST ignore */
64 /* "txtvers", Deprecated - hardcoded to 1 */
67 "AIM", /* non standard */
72 * Creates a new buddy.
74 BonjourBuddy
*bonjour_buddy_new(const gchar
*name
, PurpleAccount
*account
);
77 * Clear any existing values from the buddy.
78 * This is called before updating so that we can notice removals
80 void clear_bonjour_buddy_values(BonjourBuddy
*buddy
);
83 * Sets a value in the BonjourBuddy struct, destroying the old value
85 void set_bonjour_buddy_value(BonjourBuddy
*buddy
, const char *record_key
, const char *value
, guint32 len
);
88 * Check if all the compulsory buddy data is present.
90 gboolean
bonjour_buddy_check(BonjourBuddy
*buddy
);
93 * If the buddy doesn't previously exists, it is created. Else, its data is changed (???)
94 * purple_buddy is optional; it saves an additional lookup if we already have it
96 void bonjour_buddy_add_to_purple(BonjourBuddy
*bonjour_buddy
, PurpleBuddy
*purple_buddy
);
99 * The buddy has signed off Bonjour.
100 * If the buddy is being saved, mark as offline, otherwise delete
102 void bonjour_buddy_signed_off(PurpleBuddy
*purple_buddy
);
105 * We got the buddy icon data; deal with it
107 void bonjour_buddy_got_buddy_icon(BonjourBuddy
*buddy
, gconstpointer data
, gsize len
);
110 * Deletes a buddy from memory.
112 void bonjour_buddy_delete(BonjourBuddy
*buddy
);
114 #endif /* PURPLE_BONJOUR_BUDDY_H */