/* $Id$ */ /* * Copyright (C) 2003-2007 Benny Prijono * * This program 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. * * This program 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 */ #ifndef __PJSIP_SIP_REG_H__ #define __PJSIP_SIP_REG_H__ /** * @file sip_reg.h * @brief SIP Registration Client */ #include #include #include /** * @defgroup PJSUA_REGC Client Registration * @ingroup PJSIP_HIGH_UA * @brief High Layer API for performing client registration. * @{ * * This provides API for performing client registration. Application must * link with pjsip-ua static library to use this API. */ PJ_BEGIN_DECL /** Typedef for client registration data. */ typedef struct pjsip_regc pjsip_regc; /** Maximum contacts in registration. */ #define PJSIP_REGC_MAX_CONTACT 10 /** Expiration not specified. */ #define PJSIP_REGC_EXPIRATION_NOT_SPECIFIED ((pj_uint32_t)0xFFFFFFFFUL) /** Buffer to hold all contacts. */ #define PJSIP_REGC_CONTACT_BUF_SIZE 512 /** Structure to hold parameters when calling application's callback. * The application's callback is called when the client registration process * has finished. */ struct pjsip_regc_cbparam { pjsip_regc *regc; /**< Client registration structure. */ void *token; /**< Arbitrary token. */ pj_status_t status; /**< Error status. */ int code; /**< SIP status code received. */ pj_str_t reason; /**< SIP reason phrase received. */ pjsip_rx_data *rdata; /**< The complete received response. */ int expiration;/**< Next expiration interval. */ int contact_cnt;/**