/*
 * presence_callinfo module - presence_callinfo header file
 *
 * Copyright (C) 2010 Ovidiu Sas
 * Copyright (C) 2013 OpenSIPS Solutions
 *
 * This file is part of opensips, a free SIP server.
 *
 * opensips 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
 *
 * opensips 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * History:
 * --------
 *  2010-03-11  initial version (osas)
 *  2010-07-13  added support for SCA Broadsoft with dialog module (bogdan)
 */

#ifndef _PRES_CALLINFO_H_
#define _PRES_CALLINFO_H_

#include "../presence/bind_presence.h"

#define SCA_PUB_A_CHAR   'A'  /* caller */
#define SCA_PUB_B_CHAR   'B'  /* callee */
#define SCA_PUB_A      (1<<0)  /* caller */
#define SCA_PUB_B      (1<<1)  /* callee */

#define should_publish_A(_flags,_mute_s) \
    ( (_flags & SCA_PUB_A) && (_mute_s.len<=0 || _mute_s.s[0]!='Y') )
#define should_publish_B(_flags,_mute_s) \
    ( (_flags & SCA_PUB_B) && (_mute_s.len<=0 || _mute_s.s[1]!='Y') )

/* presence API */
extern presence_api_t pres;

/* if dialog support is on or off */
extern int no_dialog_support;

extern int *sca_log_level;
#define LM_SCA(fmt, args...) LM_GEN(*sca_log_level, fmt, ##args )

#endif
