WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

#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

◆ PJ_DECL_LIST_MEMBER()

pjsip_event::PJ_DECL_LIST_MEMBER ( struct pjsip_event  )

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

Field Documentation

◆ type

pjsip_event_id_e pjsip_event::type

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

◆ entry

pj_timer_entry* pjsip_event::entry

The timer entry.

◆  [1/2]

struct { ... } pjsip_event::timer

Timer event.

◆ rdata

pjsip_rx_data* pjsip_event::rdata

The incoming message.

The receive data buffer.

◆ tdata

pjsip_tx_data* pjsip_event::tdata

The outgoing message.

The transmit data buffer.

The transmit data.

◆ timer [2/2]

pj_timer_entry* pjsip_event::timer

The timer.

◆ status

pj_status_t pjsip_event::status

Transport error status.

◆ data

void* pjsip_event::data

Generic data.

◆ tsx

pjsip_transaction* pjsip_event::tsx

The transaction.

◆ prev_state

int pjsip_event::prev_state

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.

◆ user1

void* pjsip_event::user1

User data 1.

◆ user2

void* pjsip_event::user2

User data 2.

◆ user3

void* pjsip_event::user3

User data 3.

◆ user4

void* pjsip_event::user4

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.