00001 00005 /* purple 00006 * 00007 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de> 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 00022 */ 00023 00024 #ifndef _PURPLE_DNSSRV_H 00025 #define _PURPLE_DNSSRV_H 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 typedef struct _PurpleSrvResponse PurpleSrvResponse; 00032 typedef struct _PurpleSrvQueryData PurpleSrvQueryData; 00033 00034 struct _PurpleSrvResponse { 00035 char hostname[256]; 00036 int port; 00037 int weight; 00038 int pref; 00039 }; 00040 00041 typedef void (*PurpleSrvCallback)(PurpleSrvResponse *resp, int results, gpointer data); 00042 00052 PurpleSrvQueryData *purple_srv_resolve(const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata); 00053 00059 void purple_srv_cancel(PurpleSrvQueryData *query_data); 00060 00061 #ifdef __cplusplus 00062 } 00063 #endif 00064 00065 #endif /* _PURPLE_DNSSRV_H */