Ignore:
Timestamp:
Jan 18, 2008 8:14:17 PM (16 years ago)
Author:
nanang
Message:

Ticket #452:
Updated errno.h & .c to accomodate SRTP Transport & libsrtp error code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/users/nanang/pjmedia/include/pjmedia/errno.h

    r1700 r1710  
    4343 */ 
    4444#define PJMEDIA_ERRNO_START       (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE) 
     45#define PJMEDIA_ERRNO_END         (PJMEDIA_ERRNO_START + PJ_ERRNO_SPACE_SIZE - 1) 
    4546 
    4647 
     
    4849 * Mapping from PortAudio error codes to pjmedia error space. 
    4950 */ 
    50 #define PJMEDIA_PORTAUDIO_ERRNO_START (PJMEDIA_ERRNO_START+PJ_ERRNO_SPACE_SIZE-1000) 
    51  
     51#define PJMEDIA_PORTAUDIO_ERRNO_START (PJMEDIA_ERRNO_END-10000) 
     52#define PJMEDIA_PORTAUDIO_ERRNO_END   (PJMEDIA_PORTAUDIO_ERRNO_START + 10000 -1) 
    5253/** 
    5354 * Convert PortAudio error code to PJMEDIA error code. 
    54  */ 
    55 #define PJMEDIA_ERRNO_FROM_PORTAUDIO(err)   (err+PJMEDIA_PORTAUDIO_ERRNO_START) 
     55 * PortAudio error code range: 0 >= err >= -10000 
     56 */ 
     57#define PJMEDIA_ERRNO_FROM_PORTAUDIO(err)   ((int)PJMEDIA_PORTAUDIO_ERRNO_START-err) 
     58 
     59 
     60/** 
     61 * Mapping from LibSRTP error codes to pjmedia error space. 
     62 */ 
     63#define PJMEDIA_LIBSRTP_ERRNO_START (PJMEDIA_ERRNO_END-10200) 
     64#define PJMEDIA_LIBSRTP_ERRNO_END   (PJMEDIA_LIBSRTP_ERRNO_START + 200 - 1) 
     65/** 
     66 * Convert LibSRTP error code to PJMEDIA error code. 
     67 * LibSRTP error code range: 0 <= err < 200 
     68 */ 
     69#define PJMEDIA_ERRNO_FROM_LIBSRTP(err)   (PJMEDIA_LIBSRTP_ERRNO_START+err) 
    5670 
    5771 
     
    532546/** 
    533547 * @hideinitializer 
     548 * SRTP crypto-suite name not match the offerer tag. 
     549 */ 
     550#define PJMEDIA_SRTP_ECRYPTONOTMATCH (PJMEDIA_ERRNO_START+220)   /* 220220 */ 
     551/** 
     552 * @hideinitializer 
     553 * Invalid SRTP key length for specific crypto. 
     554 */ 
     555#define PJMEDIA_SRTP_EINKEYLEN      (PJMEDIA_ERRNO_START+221)    /* 220221 */ 
     556/** 
     557 * @hideinitializer 
     558 * Unsupported SRTP crypto-suite. 
     559 */ 
     560#define PJMEDIA_SRTP_ENOTSUPCRYPTO  (PJMEDIA_ERRNO_START+222)    /* 220222 */ 
     561/** 
     562 * @hideinitializer 
     563 * SRTP SDP contains ambigue answer. 
     564 */ 
     565#define PJMEDIA_SRTP_ESDPAMBIGUEANS (PJMEDIA_ERRNO_START+223)    /* 220223 */ 
     566/** 
     567 * @hideinitializer 
     568 * Duplicated crypto tag. 
     569 */ 
     570#define PJMEDIA_SRTP_ESDPDUPCRYPTOTAG (PJMEDIA_ERRNO_START+224)  /* 220224 */ 
     571/** 
     572 * @hideinitializer 
     573 * Invalid crypto attribute. 
     574 */ 
     575#define PJMEDIA_SRTP_ESDPINCRYPTO   (PJMEDIA_ERRNO_START+225)    /* 220225 */ 
     576/** 
     577 * @hideinitializer 
     578 * Invalid crypto tag. 
     579 */ 
     580#define PJMEDIA_SRTP_ESDPINCRYPTOTAG (PJMEDIA_ERRNO_START+226)   /* 220226 */ 
     581/** 
     582 * @hideinitializer 
     583 * Invalid SDP media transport for SRTP. 
     584 */ 
     585#define PJMEDIA_SRTP_ESDPINTRANSPORT (PJMEDIA_ERRNO_START+227)   /* 220227 */ 
     586/** 
     587 * @hideinitializer 
     588 * SRTP crypto attribute required in SDP. 
     589 */ 
     590#define PJMEDIA_SRTP_ESDPREQCRYPTO  (PJMEDIA_ERRNO_START+228)    /* 220228 */ 
     591/** 
     592 * @hideinitializer 
    534593 * Secure transport required in SDP media descriptor. 
    535594 */ 
    536 #define PJMEDIA_SRTP_ESDPREQSECTP   (PJMEDIA_ERRNO_START+220)    /* 220220 */ 
    537 /** 
    538  * @hideinitializer 
    539  * SDP contains ambigue answer. 
    540  */ 
    541 #define PJMEDIA_SRTP_ESDPAMBIGUEANS (PJMEDIA_ERRNO_START+221)    /* 220221 */ 
    542  
     595#define PJMEDIA_SRTP_ESDPREQSECTP   (PJMEDIA_ERRNO_START+229)    /* 220229 */ 
    543596 
    544597 
Note: See TracChangeset for help on using the changeset viewer.