BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJSIP Reference

Method names and manipulation. More...

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
 

Detailed Description

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
mThe method to initialize.
poolPool where memory allocation will be allocated from, if required.
strThe 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
mThe method structure to be initialized.
strThe 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
mThe method structure.
idThe 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
poolPool to allocate memory from, if required.
methodThe destination method to copy to.
rhsThe 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
m1The first method.
m2The second method.
Returns
Zero if equal, otherwise will return -1 if less or +1 if greater.

Variable Documentation

const pjsip_method pjsip_invite_method

INVITE method constant.

See also
pjsip_get_invite_method()
const pjsip_method pjsip_cancel_method

CANCEL method constant.

See also
pjsip_get_cancel_method()
const pjsip_method pjsip_ack_method

ACK method constant.

See also
pjsip_get_ack_method()
const pjsip_method pjsip_bye_method

BYE method constant.

See also
pjsip_get_bye_method()
const pjsip_method pjsip_register_method

REGISTER method constant.

See also
pjsip_get_register_method()
const pjsip_method pjsip_options_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.