dns_query_set.c

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 2015, Digium, Inc.
00005  *
00006  * Joshua Colp <jcolp@digium.com>
00007  *
00008  * See http://www.asterisk.org for more information about
00009  * the Asterisk project. Please do not directly contact
00010  * any of the maintainers of this project for assistance;
00011  * the project provides a web site, mailing lists and IRC
00012  * channels for your use.
00013  *
00014  * This program is free software, distributed under the terms of
00015  * the GNU General Public License Version 2. See the LICENSE file
00016  * at the top of the source tree.
00017  */
00018 
00019 /*! \file
00020  *
00021  * \brief DNS Query Set API
00022  *
00023  * \author Joshua Colp <jcolp@digium.com>
00024  */
00025 
00026 /*** MODULEINFO
00027    <support_level>core</support_level>
00028  ***/
00029 
00030 #include "asterisk.h"
00031 
00032 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 433370 $")
00033 
00034 #include "asterisk/vector.h"
00035 #include "asterisk/astobj2.h"
00036 #include "asterisk/dns_core.h"
00037 #include "asterisk/dns_query_set.h"
00038 
00039 /*! \brief A set of DNS queries */
00040 struct ast_dns_query_set {
00041    /*! \brief DNS queries */
00042    AST_VECTOR(, struct ast_dns_query *) queries;
00043    /*! \brief The total number of completed queries */
00044    unsigned int queries_completed;
00045    /*! \brief Callback to invoke upon completion */
00046    ast_dns_query_set_callback callback;
00047    /*! \brief User-specific data */
00048    void *user_data;
00049 };
00050 
00051 struct ast_dns_query_set *ast_dns_query_set_create(void)
00052 {
00053    return NULL;
00054 }
00055 
00056 int ast_dns_query_set_add(struct ast_dns_query_set *query_set, const char *name, int rr_type, int rr_class)
00057 {
00058    return -1;
00059 }
00060 
00061 size_t ast_dns_query_set_num_queries(const struct ast_dns_query_set *query_set)
00062 {
00063    return 0;
00064 }
00065 
00066 struct ast_dns_query *ast_dns_query_set_get(const struct ast_dns_query_set *query_set, unsigned int index)
00067 {
00068    return NULL;
00069 }
00070 
00071 void *ast_dns_query_set_get_data(const struct ast_dns_query_set *query_set)
00072 {
00073    return query_set->user_data;
00074 }
00075 
00076 void ast_dns_query_set_resolve_async(struct ast_dns_query_set *query_set, ast_dns_query_set_callback callback, void *data)
00077 {
00078    query_set->callback = callback;
00079    query_set->user_data = ao2_bump(data);
00080 }
00081 
00082 void ast_query_set_resolve(struct ast_dns_query_set *query_set)
00083 {
00084 }
00085 
00086 int ast_dns_query_set_resolve_cancel(struct ast_dns_query_set *query_set)
00087 {
00088    return -1;
00089 }
00090 
00091 void ast_dns_query_set_free(struct ast_dns_query_set *query_set)
00092 {
00093 }

Generated on Thu Apr 16 06:27:33 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6