avpops_db.h

来自「性能优秀的SIP Proxy」· C头文件 代码 · 共 84 行

H
84
字号
/* * $Id: avpops_db.h,v 1.2 2006/02/15 15:55:52 miconda Exp $ * * Copyright (C) 2004 Voice Sistem SRL * * This file is part of Open SIP Express Router. * * AVPOPS OpenSER-module 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. * * AVPOPS OpenSER-module 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 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * For any questions about this software and its license, please contact * Voice Sistem at following e-mail address: *         office@voice-sistem.ro * * * History: * --------- *  2004-10-04  first version (ramona) *  2004-11-11  added support for db schemes for avp_db_load (ramona) */#ifndef _AVP_OPS_DB_H_#define _AVP_OPS_DB_H_#include "../../db/db.h"#include "../../parser/msg_parser.h"#include "../../str.h"#include "../../sr_module.h"/* definition of a DB scheme*/struct db_scheme{	char *name;	char *uuid_col;	char *username_col;	char *domain_col;	char *value_col;	char *table;	int  db_flags;	struct db_scheme *next;};typedef struct _avpname_list {	xl_spec_t sname;	struct _avpname_list *next;} avpname_list_t, *avpname_list_p;int avpops_db_bind(char* db_url);int avpops_db_init(char* db_url, char* db_table, char **db_columns);db_res_t *db_load_avp( str *uuid, str *username, str *domain,		char *attr, char *table, struct db_scheme *scheme);void db_close_query( db_res_t *res );int db_store_avp( db_key_t *keys, db_val_t *vals, int n, char *table);int db_delete_avp( str *uuid, str *username, str *domain,		char *attr, char *table);int db_query_avp(struct sip_msg* msg, char *query, avpname_list_t* dest);int avp_add_db_scheme( modparam_t type, void* val);struct db_scheme *avp_get_db_scheme( char *name );#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?