00001 /* 00002 * $Id$ 00003 * 00004 * Copyright (C) 2001-2005 FhG FOKUS 00005 * Copyright (C) 2006-2007 iptelorg GmbH 00006 * 00007 * This file is part of ser, a free SIP server. 00008 * 00009 * ser 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 * For a license to use the ser software under conditions 00015 * other than those described here, or to purchase support for this 00016 * software, please contact iptel.org by e-mail at the following addresses: 00017 * info@iptel.org 00018 * 00019 * ser is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 * GNU General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU General Public License 00025 * along with this program; if not, write to the Free Software 00026 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00027 */ 00028 00029 #ifndef _DB_URI_H 00030 #define _DB_URI_H 1 00031 00036 #include "db_gen.h" 00037 #include "../../str.h" 00038 00039 00040 #ifdef __cplusplus 00041 extern "C" { 00042 #endif /* __cplusplus */ 00043 00044 struct db_uri; 00045 00046 typedef unsigned char (db_uri_cmp_t)(struct db_uri* uri1, struct db_uri* uri2); 00047 00048 typedef struct db_uri { 00049 db_gen_t gen; /* Generic part of the structure */ 00050 str scheme; /* URI scheme */ 00051 str body; /* Entire URI body */ 00052 db_uri_cmp_t* cmp; /* Comparison function */ 00053 } db_uri_t; 00054 00055 00056 /* 00057 * Create a database URI structure 00058 */ 00059 struct db_uri* db_uri(const char* uri); 00060 00061 void db_uri_free(struct db_uri* uri); 00062 00063 unsigned char db_uri_cmp(struct db_uri* uri1, struct db_uri* uri2); 00064 00065 db_uri_cmp_t db_uri_cmp; 00066 00067 #ifdef __cplusplus 00068 } 00069 #endif /* __cplusplus */ 00070 00073 #endif /* _DB_URI_H */
1.7.1