00001 /* 00002 * Copyright (C) 2005 iptelorg GmbH 00003 * 00004 * This file is part of ser, a free SIP server. 00005 * 00006 * ser is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version 00010 * 00011 * For a license to use the ser software under conditions 00012 * other than those described here, or to purchase support for this 00013 * software, please contact iptel.org by e-mail at the following addresses: 00014 * info@iptel.org 00015 * 00016 * ser is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 */ 00025 00026 #ifndef __MSG_RULES_H 00027 #define __MSG_RULES_H 00028 00029 #include <cds/sstr.h> 00030 #include <xcap/xcap_client.h> 00031 #include <xcap/common_policy.h> 00032 00033 typedef cp_ruleset_t msg_rules_t; 00034 00035 /* Type defining action for pres_rules */ 00036 typedef enum { 00037 msg_handling_block, 00038 /* msg_handling_confirm, */ 00039 msg_handling_allow 00040 } msg_handling_t; 00041 00042 int get_msg_rules(const str_t *username, const str_t *filename, 00043 xcap_query_params_t *xcap_params, msg_rules_t **dst); 00044 void free_msg_rules(cp_ruleset_t *r); 00045 void free_msg_actions(cp_actions_t *a); 00046 00047 /* returns 0 if rule found, 1 if not found and -1 on error */ 00048 int get_msg_rules_action(msg_rules_t *r, const str_t *wuri, msg_handling_t *dst_action); 00049 00050 #endif
1.7.1