pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication
Loading

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJSIP Reference

Methods
[Messaging Elements]

Method names and manipulation.

Data Structures

struct  pjsip_method

Enumerations

enum  pjsip_method_e {
  PJSIP_INVITE_METHOD, PJSIP_CANCEL_METHOD, PJSIP_ACK_METHOD, PJSIP_BYE_METHOD,
  PJSIP_REGISTER_METHOD, PJSIP_OPTIONS_METHOD, PJSIP_OTHER_METHOD
}

Functions

const pjsip_methodpjsip_get_invite_method (void)
const pjsip_methodpjsip_get_cancel_method (void)
const pjsip_methodpjsip_get_ack_method (void)
const pjsip_methodpjsip_get_bye_method (void)
const pjsip_methodpjsip_get_register_method (void)
const pjsip_methodpjsip_get_options_method (void)
void pjsip_method_init (pjsip_method *m, pj_pool_t *pool, const pj_str_t *str)
void pjsip_method_init_np (pjsip_method *m, pj_str_t *str)
void pjsip_method_set (pjsip_method *m, pjsip_method_e id)
void pjsip_method_copy (pj_pool_t *pool, pjsip_method *method, const pjsip_method *rhs)
int pjsip_method_cmp (const pjsip_method *m1, const pjsip_method *m2)

Variables

const pjsip_method pjsip_invite_method
const pjsip_method pjsip_cancel_method
const pjsip_method pjsip_ack_method
const pjsip_method pjsip_bye_method
const pjsip_method pjsip_register_method
const pjsip_method pjsip_options_method

Enumeration Type Documentation

This enumeration declares SIP methods as described by RFC3261. Additional methods do exist, and they are described by corresponding RFCs for the SIP extentensions. Since they won't alter the characteristic of the processing of the message, they don't need to be explicitly mentioned here.

Enumerator:
PJSIP_INVITE_METHOD 

INVITE method, for establishing dialogs.

PJSIP_CANCEL_METHOD 

CANCEL method, for cancelling request.

PJSIP_ACK_METHOD 

ACK method.

PJSIP_BYE_METHOD 

BYE method, for terminating dialog.

PJSIP_REGISTER_METHOD 

REGISTER method.

PJSIP_OPTIONS_METHOD 

OPTIONS method.

PJSIP_OTHER_METHOD 

Other method.


Function Documentation

const pjsip_method* pjsip_get_invite_method ( void   ) 

Get INVITE method constant.

const pjsip_method* pjsip_get_cancel_method ( void   ) 

Get CANCEL method constant.

const pjsip_method* pjsip_get_ack_method ( void   ) 

Get ACK method constant.

const pjsip_method* pjsip_get_bye_method ( void   ) 

Get BYE method constant.

const pjsip_method* pjsip_get_register_method ( void   ) 

Get REGISTER method constant.

const pjsip_method* pjsip_get_options_method ( void   ) 

Get OPTIONS method constant.

void pjsip_method_init ( pjsip_method m,
pj_pool_t pool,
const pj_str_t str 
)

Initialize the method structure from a string. This function will check whether the method is a known method then set both the id and name accordingly.

Parameters:
m The method to initialize.
pool Pool where memory allocation will be allocated from, if required.
str The method string.
void pjsip_method_init_np ( pjsip_method m,
pj_str_t str 
)

Initialize the method structure from a string, without cloning the string. See pjsip_method_init.

Parameters:
m The method structure to be initialized.
str The method string.
void pjsip_method_set ( pjsip_method m,
pjsip_method_e  id 
)

Set the method with the predefined method ID. This function will also set the name member of the structure to the correct string according to the method.

Parameters:
m The method structure.
id The method ID.
void pjsip_method_copy ( pj_pool_t pool,
pjsip_method method,
const pjsip_method rhs 
)

Copy one method structure to another. If the method is of the known methods, then memory allocation is not required.

Parameters:
pool Pool to allocate memory from, if required.
method The destination method to copy to.
rhs The source method to copy from.
int pjsip_method_cmp ( const pjsip_method m1,
const pjsip_method m2 
)

Compare one method with another, and conveniently determine whether the first method is equal, less than, or greater than the second method.

Parameters:
m1 The first method.
m2 The second method.
Returns:
Zero if equal, otherwise will return -1 if less or +1 if greater.

Variable Documentation

INVITE method constant.

See also:
pjsip_get_invite_method()

CANCEL method constant.

See also:
pjsip_get_cancel_method()

ACK method constant.

See also:
pjsip_get_ack_method()

BYE method constant.

See also:
pjsip_get_bye_method()

REGISTER method constant.

See also:
pjsip_get_register_method()

OPTIONS method constant.

See also:
pjsip_get_options_method()

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.