Avoid manual handling of icons in request field list items
* Use `PurpleKeyValuePair` as field list items
* Replace `icons` list with `has_icons` flag, thus fixing memleak
* Replace `purple_request_field_list_get_icons` with `purple_request_field_list_has_icons`
Testing Done:
Compile and run.
Reviewed at https://reviews.imfreedom.org/r/563/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
*/
#include<purple.h>
#include"buddy.h"
#include"bonjour.h"
#include<avahi-client/client.h>
#include<avahi-client/lookup.h>
#include<avahi-client/publish.h>
#include<avahi-common/address.h>
#include<avahi-common/malloc.h>
#include<avahi-common/error.h>
#include<avahi-common/strlst.h>
#include<avahi-glib/glib-malloc.h>
#include<avahi-glib/glib-watch.h>
/* Avahi only defines the types that it actually uses (which at this time doesn't include NULL) */
#ifndef AVAHI_DNS_TYPE_NULL
#define AVAHI_DNS_TYPE_NULL 0x0A
#endif
/* data used by avahi bonjour implementation */
typedefstruct{
AvahiClient*client;
AvahiGLibPoll*glib_poll;
AvahiServiceBrowser*sb;
AvahiEntryGroup*group;
AvahiEntryGroup*buddy_icon_group;
}AvahiSessionImplData;
typedefstruct{
AvahiServiceResolver*resolver;
AvahiIfIndexinterface;
AvahiProtocolprotocol;
gchar*name;
gchar*type;
gchar*domain;
/* This is a reference to the entry in BonjourBuddy->ips */