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

pjsip_event Struct Reference
[Event]

#include <sip_event.h>

Public Member Functions

 PJ_DECL_LIST_MEMBER (struct pjsip_event)

Data Fields

pjsip_event_id_e type
union {
   struct {
      pj_timer_entry *   entry
   }   timer
   struct {
      union {
         pjsip_rx_data *   rdata
         pjsip_tx_data *   tdata
         pj_timer_entry *   timer
         pj_status_t   status
         void *   data
      }   src
      pjsip_transaction *   tsx
      int   prev_state
      pjsip_event_id_e   type
   }   tsx_state
   struct {
      pjsip_tx_data *   tdata
   }   tx_msg
   struct {
      pjsip_tx_data *   tdata
      pjsip_transaction *   tsx
   }   tx_error
   struct {
      pjsip_rx_data *   rdata
   }   rx_msg
   struct {
      void *   user1
      void *   user2
      void *   user3
      void *   user4
   }   user
body

Detailed Description

This structure describe event descriptor to fully identify a SIP event.

Events are the only way for a lower layer object to inform something to higher layer objects. Normally this is achieved by means of callback, i.e. the higher layer objects register a callback to handle the event on the lower layer objects.

This event descriptor is used for example by transactions, to inform endpoint about events, and by transports, to inform endpoint about unexpected transport error.

Forward declaration for events (sip_event.h).


Member Function Documentation

pjsip_event::PJ_DECL_LIST_MEMBER ( struct pjsip_event   ) 

This is necessary so that we can put events as a list.


Field Documentation

The event type, can be any value of pjsip_event_id_e.

Type of event source:

  • PJSIP_EVENT_TX_MSG
  • PJSIP_EVENT_RX_MSG,
  • PJSIP_EVENT_TRANSPORT_ERROR
  • PJSIP_EVENT_TIMER
  • PJSIP_EVENT_USER
struct { ... } pjsip_event::timer

Timer event.

The incoming message.

The receive data buffer.

The outgoing message.

The transmit data buffer.

The transmit data.

Transport error status.

Generic data.

Previous state.

struct { ... } pjsip_event::tsx_state

Transaction state has changed event.

struct { ... } pjsip_event::tx_msg

Message transmission event.

struct { ... } pjsip_event::tx_error

Transmission error event.

struct { ... } pjsip_event::rx_msg

Message arrival event.

User data 1.

User data 2.

User data 3.

User data 4.

struct { ... } pjsip_event::user

User event.

union { ... } pjsip_event::body

The event body as union, which fields depends on the event type. By convention, the first member of each struct in the union must be the pointer which is relevant to the event.


The documentation for this struct was generated from the following file:

 


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