| account.hpp | | account.hpp | |
|
| /* $Id: account.hpp 4704 2014-01-16 05:30:46Z ming $ */ | | /* $Id: account.hpp 4889 2014-08-18 09:09:18Z bennylp $ */ | |
| /* | | /* | |
| * Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | | |
| skipping to change at line 563 | | skipping to change at line 563 | |
| * \a pjsua_contact_rewrite_method. See also pjsua_contact_rewrite_meth
od. | | * \a pjsua_contact_rewrite_method. See also pjsua_contact_rewrite_meth
od. | |
| * | | * | |
| * Value PJSUA_CONTACT_REWRITE_UNREGISTER(1) is the legacy behavior. | | * Value PJSUA_CONTACT_REWRITE_UNREGISTER(1) is the legacy behavior. | |
| * | | * | |
| * Default value: PJSUA_CONTACT_REWRITE_METHOD | | * Default value: PJSUA_CONTACT_REWRITE_METHOD | |
| * (PJSUA_CONTACT_REWRITE_NO_UNREG | PJSUA_CONTACT_REWRITE_ALWAYS_UPD
ATE) | | * (PJSUA_CONTACT_REWRITE_NO_UNREG | PJSUA_CONTACT_REWRITE_ALWAYS_UPD
ATE) | |
| */ | | */ | |
| int contactRewriteMethod; | | int contactRewriteMethod; | |
| | | | |
| /** | | /** | |
|
| | | * Specify if source TCP port should be used as the initial Contact | |
| | | * address if TCP/TLS transport is used. Note that this feature will | |
| | | * be automatically turned off when nameserver is configured because | |
| | | * it may yield different destination address due to DNS SRV resolution | |
| | | . | |
| | | * Also some platforms are unable to report the local address of the | |
| | | * TCP socket when it is still connecting. In these cases, this | |
| | | * feature will also be turned off. | |
| | | * | |
| | | * Default: 1 (yes). | |
| | | */ | |
| | | int contactUseSrcPort; | |
| | | | |
| | | /** | |
| * This option is used to overwrite the "sent-by" field of the Via head
er | | * This option is used to overwrite the "sent-by" field of the Via head
er | |
| * for outgoing messages with the same interface address as the one in | | * for outgoing messages with the same interface address as the one in | |
| * the REGISTER request, as long as the request uses the same transport | | * the REGISTER request, as long as the request uses the same transport | |
| * instance as the previous REGISTER request. | | * instance as the previous REGISTER request. | |
| * | | * | |
| * Default: TRUE | | * Default: TRUE | |
| */ | | */ | |
| int viaRewriteUse; | | int viaRewriteUse; | |
| | | | |
| /** | | /** | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 15 lines changed or added | |
|
| config.h | | config.h | |
|
| /* $Id: config.h 4795 2014-03-14 06:58:10Z riza $ */ | | /* $Id: config.h 4913 2014-09-03 08:39:58Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 1151 | | skipping to change at line 1151 | |
| #if !defined(PJ_THREAD_ALLOCATE_STACK) | | #if !defined(PJ_THREAD_ALLOCATE_STACK) | |
| # error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h" | | # error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h" | |
| #endif | | #endif | |
| | | | |
| PJ_BEGIN_DECL | | PJ_BEGIN_DECL | |
| | | | |
| /** PJLIB version major number. */ | | /** PJLIB version major number. */ | |
| #define PJ_VERSION_NUM_MAJOR 2 | | #define PJ_VERSION_NUM_MAJOR 2 | |
| | | | |
| /** PJLIB version minor number. */ | | /** PJLIB version minor number. */ | |
|
| #define PJ_VERSION_NUM_MINOR 2 | | #define PJ_VERSION_NUM_MINOR 3 | |
| | | | |
| /** PJLIB version revision number. */ | | /** PJLIB version revision number. */ | |
|
| #define PJ_VERSION_NUM_REV 1 | | #define PJ_VERSION_NUM_REV 0 | |
| | | | |
| /** | | /** | |
| * Extra suffix for the version (e.g. "-trunk"), or empty for | | * Extra suffix for the version (e.g. "-trunk"), or empty for | |
| * web release version. | | * web release version. | |
| */ | | */ | |
| #define PJ_VERSION_NUM_EXTRA "" | | #define PJ_VERSION_NUM_EXTRA "" | |
| | | | |
| /** | | /** | |
| * PJLIB version number consists of three bytes with the following format: | | * PJLIB version number consists of three bytes with the following format: | |
| * 0xMMIIRR00, where MM: major number, II: minor number, RR: revision | | * 0xMMIIRR00, where MM: major number, II: minor number, RR: revision | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| endpoint.hpp | | endpoint.hpp | |
|
| /* $Id: endpoint.hpp 4704 2014-01-16 05:30:46Z ming $ */ | | /* $Id: endpoint.hpp 4887 2014-08-13 09:14:53Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | | |
| skipping to change at line 30 | | skipping to change at line 30 | |
| #define __PJSUA2_UA_HPP__ | | #define __PJSUA2_UA_HPP__ | |
| | | | |
| /** | | /** | |
| * @file pjsua2/endpoint.hpp | | * @file pjsua2/endpoint.hpp | |
| * @brief PJSUA2 Base Agent Operation | | * @brief PJSUA2 Base Agent Operation | |
| */ | | */ | |
| #include <pjsua2/persistent.hpp> | | #include <pjsua2/persistent.hpp> | |
| #include <pjsua2/media.hpp> | | #include <pjsua2/media.hpp> | |
| #include <pjsua2/siptypes.hpp> | | #include <pjsua2/siptypes.hpp> | |
| #include <list> | | #include <list> | |
|
| | | #include <map> | |
| | | | |
| /** PJSUA2 API is inside pj namespace */ | | /** PJSUA2 API is inside pj namespace */ | |
| namespace pj | | namespace pj | |
| { | | { | |
| | | | |
| /** | | /** | |
| * @defgroup PJSUA2_UA Endpoint | | * @defgroup PJSUA2_UA Endpoint | |
| * @ingroup PJSUA2_Ref | | * @ingroup PJSUA2_Ref | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| skipping to change at line 717 | | skipping to change at line 718 | |
| void libInit( const EpConfig &prmEpConfig) throw(Error); | | void libInit( const EpConfig &prmEpConfig) throw(Error); | |
| | | | |
| /** | | /** | |
| * Call this function after all initialization is done, so that the | | * Call this function after all initialization is done, so that the | |
| * library can do additional checking set up. Application may call this | | * library can do additional checking set up. Application may call this | |
| * function any time after init(). | | * function any time after init(). | |
| */ | | */ | |
| void libStart() throw(Error); | | void libStart() throw(Error); | |
| | | | |
| /** | | /** | |
|
| * Register a thread to poll for events. This function should be | | * Register a thread that was created by external or native API to the | |
| * called by an external worker thread, and it will block polling | | * library. Note that each time this function is called, it will alloca | |
| * for events until the library is destroyed. | | te | |
| | | * some memory to store the thread description, which will only be free | |
| | | d | |
| | | * when the library is destroyed. | |
| | | * | |
| | | * @param name The optional name to be assigned to the thread. | |
| | | */ | |
| | | void libRegisterThread(const string &name) throw(Error); | |
| | | | |
| | | /** | |
| | | * Check if this thread has been registered to the library. Note that | |
| | | * this function is only applicable for library main & worker threads a | |
| | | nd | |
| | | * external/native threads registered using libRegisterThread(). | |
| */ | | */ | |
|
| void libRegisterWorkerThread(const string &name) throw(Error); | | bool libIsThreadRegistered(); | |
| | | | |
| /** | | /** | |
| * Stop all worker threads. | | * Stop all worker threads. | |
| */ | | */ | |
| void libStopWorkerThreads(); | | void libStopWorkerThreads(); | |
| | | | |
| /** | | /** | |
| * Poll pjsua for events, and if necessary block the caller thread for | | * Poll pjsua for events, and if necessary block the caller thread for | |
| * the specified maximum interval (in miliseconds). | | * the specified maximum interval (in miliseconds). | |
| * | | * | |
| | | | |
| skipping to change at line 1166 | | skipping to change at line 1177 | |
| */ | | */ | |
| virtual void onSelectAccount(OnSelectAccountParam &prm) | | virtual void onSelectAccount(OnSelectAccountParam &prm) | |
| { PJ_UNUSED_ARG(prm); } | | { PJ_UNUSED_ARG(prm); } | |
| | | | |
| private: | | private: | |
| static Endpoint *instance_; // static instance | | static Endpoint *instance_; // static instance | |
| LogWriter *writer; // Custom writer, if any | | LogWriter *writer; // Custom writer, if any | |
| AudioMediaVector mediaList; | | AudioMediaVector mediaList; | |
| AudDevManager audioDevMgr; | | AudDevManager audioDevMgr; | |
| CodecInfoVector codecInfoList; | | CodecInfoVector codecInfoList; | |
|
| | | std::map<pj_thread_t*, pj_thread_desc*> threadDescMap; | |
| | | | |
| /* Pending logging */ | | /* Pending logging */ | |
| bool mainThreadOnly; | | bool mainThreadOnly; | |
| void *mainThread; | | void *mainThread; | |
| unsigned pendingJobSize; | | unsigned pendingJobSize; | |
| std::list<PendingJob*> pendingJobs; | | std::list<PendingJob*> pendingJobs; | |
| | | | |
| void performPendingJobs(); | | void performPendingJobs(); | |
| | | | |
| /* Endpoint static callbacks */ | | /* Endpoint static callbacks */ | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 20 lines changed or added | |
|
| event.h | | event.h | |
|
| /* $Id: event.h 3905 2011-12-09 05:15:39Z ming $ */ | | /* $Id: event.h 4815 2014-04-10 10:01:07Z bennylp $ */ | |
| /* | | /* | |
| * Copyright (C) 2011-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2011-2011 Teluu Inc. (http://www.teluu.com) | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | | |
| skipping to change at line 243 | | skipping to change at line 243 | |
| typedef pj_status_t pjmedia_event_cb(pjmedia_event *event, | | typedef pj_status_t pjmedia_event_cb(pjmedia_event *event, | |
| void *user_data); | | void *user_data); | |
| | | | |
| /** | | /** | |
| * This enumeration describes flags for event publication via | | * This enumeration describes flags for event publication via | |
| * #pjmedia_event_publish(). | | * #pjmedia_event_publish(). | |
| */ | | */ | |
| typedef enum pjmedia_event_publish_flag | | typedef enum pjmedia_event_publish_flag | |
| { | | { | |
| /** | | /** | |
|
| | | * Default flag. | |
| | | */ | |
| | | PJMEDIA_EVENT_PUBLISH_DEFAULT, | |
| | | | |
| | | /** | |
| * Publisher will only post the event to the event manager. It is the | | * Publisher will only post the event to the event manager. It is the | |
| * event manager that will later notify all the publisher's subscribers
. | | * event manager that will later notify all the publisher's subscribers
. | |
| */ | | */ | |
| PJMEDIA_EVENT_PUBLISH_POST_EVENT = 1 | | PJMEDIA_EVENT_PUBLISH_POST_EVENT = 1 | |
| | | | |
| } pjmedia_event_publish_flag; | | } pjmedia_event_publish_flag; | |
| | | | |
| /** | | /** | |
| * Event manager flag. | | * Event manager flag. | |
| */ | | */ | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 6 lines changed or added | |
|
| media.hpp | | media.hpp | |
|
| /* $Id: media.hpp 4793 2014-03-14 04:09:50Z bennylp $ */ | | /* $Id: media.hpp 4845 2014-05-19 05:51:10Z bennylp $ */ | |
| /* | | /* | |
| * Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | | |
| skipping to change at line 513 | | skipping to change at line 513 | |
| */ | | */ | |
| virtual ~AudioMediaRecorder(); | | virtual ~AudioMediaRecorder(); | |
| | | | |
| private: | | private: | |
| /** | | /** | |
| * Recorder Id. | | * Recorder Id. | |
| */ | | */ | |
| int recorderId; | | int recorderId; | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * Tone descriptor (abstraction for pjmedia_tone_desc) | |
| | | */ | |
| | | class ToneDesc : public pjmedia_tone_desc | |
| | | { | |
| | | public: | |
| | | ToneDesc() | |
| | | { | |
| | | pj_bzero(this, sizeof(*this)); | |
| | | } | |
| | | ~ToneDesc() {} | |
| | | }; | |
| | | | |
| | | /** | |
| | | * Array of tone descriptor. | |
| | | */ | |
| | | typedef std::vector<ToneDesc> ToneDescVector; | |
| | | | |
| | | /** | |
| | | * Tone digit (abstraction for pjmedia_tone_digit) | |
| | | */ | |
| | | class ToneDigit : public pjmedia_tone_digit | |
| | | { | |
| | | public: | |
| | | ToneDigit() | |
| | | { | |
| | | pj_bzero(this, sizeof(*this)); | |
| | | } | |
| | | ~ToneDigit() {} | |
| | | }; | |
| | | | |
| | | /** | |
| | | * Array of tone digits. | |
| | | */ | |
| | | typedef std::vector<ToneDigit> ToneDigitVector; | |
| | | | |
| | | /** | |
| | | * A digit in tone digit map | |
| | | */ | |
| | | struct ToneDigitMapDigit | |
| | | { | |
| | | public: | |
| | | string digit; | |
| | | int freq1; | |
| | | int freq2; | |
| | | }; | |
| | | | |
| | | /** | |
| | | * Tone digit map | |
| | | */ | |
| | | typedef std::vector<ToneDigitMapDigit> ToneDigitMapVector; | |
| | | | |
| | | /** | |
| | | * Tone generator. | |
| | | */ | |
| | | class ToneGenerator : public AudioMedia | |
| | | { | |
| | | public: | |
| | | /** | |
| | | * Constructor. | |
| | | */ | |
| | | ToneGenerator(); | |
| | | | |
| | | /** | |
| | | * Destructor. | |
| | | */ | |
| | | ~ToneGenerator(); | |
| | | | |
| | | /** | |
| | | * Create tone generator. | |
| | | */ | |
| | | void createToneGenerator(unsigned clock_rate = 16000, | |
| | | unsigned channel_count = 1) throw(Error); | |
| | | | |
| | | /** | |
| | | * Check if the tone generator is still busy producing some tones. | |
| | | * @return Non-zero if busy. | |
| | | */ | |
| | | bool isBusy() const; | |
| | | | |
| | | /** | |
| | | * Instruct the tone generator to stop current processing. | |
| | | */ | |
| | | void stop() throw(Error); | |
| | | | |
| | | /** | |
| | | * Rewind the playback. This will start the playback to the first | |
| | | * tone in the playback list. | |
| | | */ | |
| | | void rewind() throw(Error); | |
| | | | |
| | | /** | |
| | | * Instruct the tone generator to play single or dual frequency tones | |
| | | * with the specified duration. The new tones will be appended to | |
| | | * currently playing tones, unless stop() is called before calling this | |
| | | * function. The playback will begin as soon as the tone generator is | |
| | | * connected to other media. | |
| | | * | |
| | | * @param tones Array of tones to be played. | |
| | | * @param loop Play the tone in a loop. | |
| | | */ | |
| | | void play(const ToneDescVector &tones, | |
| | | bool loop=false) throw(Error); | |
| | | | |
| | | /** | |
| | | * Instruct the tone generator to play multiple MF digits with each of | |
| | | * the digits having individual ON/OFF duration. Each of the digit in t | |
| | | he | |
| | | * digit array must have the corresponding descriptor in the digit map. | |
| | | * The new tones will be appended to currently playing tones, unless | |
| | | * stop() is called before calling this function. The playback will beg | |
| | | in | |
| | | * as soon as the tone generator is connected to a sink media. | |
| | | * | |
| | | * @param digits Array of MF digits. | |
| | | * @param loop Play the tone in a loop. | |
| | | */ | |
| | | void playDigits(const ToneDigitVector &digits, | |
| | | bool loop=false) throw(Error); | |
| | | | |
| | | /** | |
| | | * Get the digit-map currently used by this tone generator. | |
| | | * | |
| | | * @return The digitmap currently used by the tone generato | |
| | | r | |
| | | */ | |
| | | ToneDigitMapVector getDigitMap() const throw(Error); | |
| | | | |
| | | /** | |
| | | * Set digit map to be used by the tone generator. | |
| | | * | |
| | | * @param digit_map Digitmap to be used by the tone generato | |
| | | r. | |
| | | */ | |
| | | void setDigitMap(const ToneDigitMapVector &digit_map) throw(Error); | |
| | | | |
| | | private: | |
| | | pj_pool_t *pool; | |
| | | pjmedia_port *tonegen; | |
| | | pjmedia_tone_digit_map digitMap; | |
| | | }; | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * Sound device management | | * Sound device management | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * Audio device information structure. | | * Audio device information structure. | |
| */ | | */ | |
| struct AudioDevInfo | | struct AudioDevInfo | |
| { | | { | |
| /** | | /** | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 143 lines changed or added | |
|
| pjmedia-codec.h | | pjmedia-codec.h | |
|
| /* $Id: pjmedia-codec.h 4331 2013-01-23 06:18:18Z ming $ */ | | /* $Id: pjmedia-codec.h 4815 2014-04-10 10:01:07Z bennylp $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 38 | | skipping to change at line 38 | |
| #include <pjmedia-codec/audio_codecs.h> | | #include <pjmedia-codec/audio_codecs.h> | |
| #include <pjmedia-codec/l16.h> | | #include <pjmedia-codec/l16.h> | |
| #include <pjmedia-codec/ffmpeg_vid_codecs.h> | | #include <pjmedia-codec/ffmpeg_vid_codecs.h> | |
| #include <pjmedia-codec/gsm.h> | | #include <pjmedia-codec/gsm.h> | |
| #include <pjmedia-codec/speex.h> | | #include <pjmedia-codec/speex.h> | |
| #include <pjmedia-codec/ilbc.h> | | #include <pjmedia-codec/ilbc.h> | |
| #include <pjmedia-codec/g722.h> | | #include <pjmedia-codec/g722.h> | |
| #include <pjmedia-codec/g7221.h> | | #include <pjmedia-codec/g7221.h> | |
| #include <pjmedia-codec/ipp_codecs.h> | | #include <pjmedia-codec/ipp_codecs.h> | |
| #include <pjmedia-codec/opencore_amr.h> | | #include <pjmedia-codec/opencore_amr.h> | |
|
| | | #include <pjmedia-codec/openh264.h> | |
| #include <pjmedia-codec/passthrough.h> | | #include <pjmedia-codec/passthrough.h> | |
| #include <pjmedia-codec/silk.h> | | #include <pjmedia-codec/silk.h> | |
| | | | |
| #endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */ | | #endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */ | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| sip_config.h | | sip_config.h | |
|
| /* $Id: sip_config.h 4770 2014-02-27 06:16:36Z nanang $ */ | | /* $Id: sip_config.h 4899 2014-08-21 05:58:36Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 140 | | skipping to change at line 140 | |
| pj_bool_t follow_early_media_fork; | | pj_bool_t follow_early_media_fork; | |
| | | | |
| /** | | /** | |
| * Specify whether "alias" param should be added to the Via header | | * Specify whether "alias" param should be added to the Via header | |
| * in any outgoing request with connection oriented transport. | | * in any outgoing request with connection oriented transport. | |
| * | | * | |
| * Default is PJSIP_REQ_HAS_VIA_ALIAS. | | * Default is PJSIP_REQ_HAS_VIA_ALIAS. | |
| */ | | */ | |
| pj_bool_t req_has_via_alias; | | pj_bool_t req_has_via_alias; | |
| | | | |
|
| | | /** | |
| | | * Resolve hostname when trying to get the network interface to be p | |
| | | ut | |
| | | * in Via or Contact header. | |
| | | * | |
| | | * Default is PJSIP_RESOLVE_HOSTNAME_TO_GET_INTERFACE. | |
| | | */ | |
| | | pj_bool_t resolve_hostname_to_get_interface; | |
| | | | |
| | | /** | |
| | | * Disable security check on incoming messages in a secure dialog. | |
| | | * A secure dialog is created when the request that creates the dial | |
| | | og | |
| | | * uses "sips" scheme in its request URI. Contact URI should use "si | |
| | | ps" | |
| | | * scheme and the top-most Record-Route URI, if any, should use eith | |
| | | er | |
| | | * "sips" scheme or "transport=tls" param. See also | |
| | | * https://trac.pjsip.org/repos/ticket/1735. | |
| | | * | |
| | | * Default is PJ_FALSE. | |
| | | */ | |
| | | pj_bool_t disable_secure_dlg_check; | |
| | | | |
| } endpt; | | } endpt; | |
| | | | |
| /** Transaction layer settings. */ | | /** Transaction layer settings. */ | |
| struct { | | struct { | |
| | | | |
| /** Maximum number of transactions. The value is initialized with | | /** Maximum number of transactions. The value is initialized with | |
| * PJSIP_MAX_TSX_COUNT | | * PJSIP_MAX_TSX_COUNT | |
| */ | | */ | |
| unsigned max_count; | | unsigned max_count; | |
| | | | |
| | | | |
| skipping to change at line 356 | | skipping to change at line 376 | |
| * This option can also be controlled at run-time by the | | * This option can also be controlled at run-time by the | |
| * \a req_has_via_alias setting in pjsip_cfg_t. | | * \a req_has_via_alias setting in pjsip_cfg_t. | |
| * | | * | |
| * Default is PJ_TRUE. | | * Default is PJ_TRUE. | |
| */ | | */ | |
| #ifndef PJSIP_REQ_HAS_VIA_ALIAS | | #ifndef PJSIP_REQ_HAS_VIA_ALIAS | |
| # define PJSIP_REQ_HAS_VIA_ALIAS PJ_TRUE | | # define PJSIP_REQ_HAS_VIA_ALIAS PJ_TRUE | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| | | * Resolve hostname when trying to get the network interface to be put in V | |
| | | ia | |
| | | * or Contact header. | |
| | | * | |
| | | * This option can also be controlled at run-time by the | |
| | | * \a resolve_hostname_to_get_interface setting in pjsip_cfg_t. | |
| | | * | |
| | | * Default is PJ_FALSE. | |
| | | */ | |
| | | #ifndef PJSIP_RESOLVE_HOSTNAME_TO_GET_INTERFACE | |
| | | # define PJSIP_RESOLVE_HOSTNAME_TO_GET_INTERFACE PJ_FALSE | |
| | | #endif | |
| | | | |
| | | /** | |
| * Accept call replace in early state when invite is not initiated | | * Accept call replace in early state when invite is not initiated | |
| * by the user agent. RFC 3891 Section 3 disallows this, however, | | * by the user agent. RFC 3891 Section 3 disallows this, however, | |
| * for better interoperability reason, this might be ignored. | | * for better interoperability reason, this might be ignored. | |
| * | | * | |
| * This option can also be controlled at run-time by the | | * This option can also be controlled at run-time by the | |
| * \a accept_replace_in_early_state setting in pjsip_cfg_t. | | * \a accept_replace_in_early_state setting in pjsip_cfg_t. | |
| * | | * | |
| * Default is 0 (no). | | * Default is 0 (no). | |
| */ | | */ | |
| #ifndef PJSIP_ACCEPT_REPLACE_IN_EARLY_STATE | | #ifndef PJSIP_ACCEPT_REPLACE_IN_EARLY_STATE | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 39 lines changed or added | |
|
| sip_transport_tcp.h | | sip_transport_tcp.h | |
|
| /* $Id: sip_transport_tcp.h 4506 2013-04-26 06:01:43Z bennylp $ */ | | /* $Id: sip_transport_tcp.h 4860 2014-06-19 05:07:12Z riza $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 105 | | skipping to change at line 105 | |
| | | | |
| /** | | /** | |
| * Set the low level QoS parameters to the transport. This is a lower | | * Set the low level QoS parameters to the transport. This is a lower | |
| * level operation than setting the \a qos_type field and may not be | | * level operation than setting the \a qos_type field and may not be | |
| * supported on all platforms. | | * supported on all platforms. | |
| * | | * | |
| * Default is QoS not set. | | * Default is QoS not set. | |
| */ | | */ | |
| pj_qos_params qos_params; | | pj_qos_params qos_params; | |
| | | | |
|
| | | /** | |
| | | * Specify options to be set on the transport. | |
| | | * | |
| | | * By default there is no options. | |
| | | * | |
| | | */ | |
| | | pj_sockopt_params sockopt_params; | |
| | | | |
| } pjsip_tcp_transport_cfg; | | } pjsip_tcp_transport_cfg; | |
| | | | |
| /** | | /** | |
| * Initialize pjsip_tcp_transport_cfg structure with default values for | | * Initialize pjsip_tcp_transport_cfg structure with default values for | |
| * the specifed address family. | | * the specifed address family. | |
| * | | * | |
| * @param cfg The structure to initialize. | | * @param cfg The structure to initialize. | |
| * @param af Address family to be used. | | * @param af Address family to be used. | |
| */ | | */ | |
| PJ_DECL(void) pjsip_tcp_transport_cfg_default(pjsip_tcp_transport_cfg *cfg, | | PJ_DECL(void) pjsip_tcp_transport_cfg_default(pjsip_tcp_transport_cfg *cfg, | |
| | | | |
| skipping to change at line 201 | | skipping to change at line 209 | |
| * @return PJ_SUCCESS when the transport has been successfully | | * @return PJ_SUCCESS when the transport has been successfully | |
| * started and registered to transport manager, or | | * started and registered to transport manager, or | |
| * the appropriate error code. | | * the appropriate error code. | |
| */ | | */ | |
| PJ_DECL(pj_status_t) pjsip_tcp_transport_start3( | | PJ_DECL(pj_status_t) pjsip_tcp_transport_start3( | |
| pjsip_endpoint *endpt, | | pjsip_endpoint *endpt, | |
| const pjsip_tcp_transport_cfg *cfg, | | const pjsip_tcp_transport_cfg *cfg, | |
| pjsip_tpfactory **p_factory | | pjsip_tpfactory **p_factory | |
| ); | | ); | |
| | | | |
|
| | | /** | |
| | | * Retrieve the internal socket handle used by the TCP transport. Note | |
| | | * that this socket normally is registered to ioqueue, so application | |
| | | * needs to take care not to perform operation that disrupts ioqueue | |
| | | * operation. | |
| | | * | |
| | | * @param transport The TCP transport. | |
| | | * | |
| | | * @return The socket handle, or PJ_INVALID_SOCKET if no socket | |
| | | * is currently being used. | |
| | | */ | |
| | | PJ_DECL(pj_sock_t) pjsip_tcp_transport_get_socket(pjsip_transport *transpor | |
| | | t); | |
| | | | |
| PJ_END_DECL | | PJ_END_DECL | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
| #endif /* PJ_HAS_TCP */ | | #endif /* PJ_HAS_TCP */ | |
| | | | |
| #endif /* __PJSIP_TRANSPORT_TCP_H__ */ | | #endif /* __PJSIP_TRANSPORT_TCP_H__ */ | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 23 lines changed or added | |
|
| sip_transport_tls.h | | sip_transport_tls.h | |
|
| /* $Id: sip_transport_tls.h 4506 2013-04-26 06:01:43Z bennylp $ */ | | /* $Id: sip_transport_tls.h 4860 2014-06-19 05:07:12Z riza $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 204 | | skipping to change at line 204 | |
| pj_qos_params qos_params; | | pj_qos_params qos_params; | |
| | | | |
| /** | | /** | |
| * Specify if the transport should ignore any errors when setting the Q
oS | | * Specify if the transport should ignore any errors when setting the Q
oS | |
| * traffic type/parameters. | | * traffic type/parameters. | |
| * | | * | |
| * Default: PJ_TRUE | | * Default: PJ_TRUE | |
| */ | | */ | |
| pj_bool_t qos_ignore_error; | | pj_bool_t qos_ignore_error; | |
| | | | |
|
| | | /** | |
| | | * Specify options to be set on the transport. | |
| | | * | |
| | | * By default there is no options. | |
| | | * | |
| | | */ | |
| | | pj_sockopt_params sockopt_params; | |
| | | | |
| | | /** | |
| | | * Specify if the transport should ignore any errors when setting the | |
| | | * sockopt parameters. | |
| | | * | |
| | | * Default: PJ_TRUE | |
| | | * | |
| | | */ | |
| | | pj_bool_t sockopt_ignore_error; | |
| | | | |
| } pjsip_tls_setting; | | } pjsip_tls_setting; | |
| | | | |
| /** | | /** | |
| * This structure defines TLS transport extended info in <tt>ext_info</tt> | | * This structure defines TLS transport extended info in <tt>ext_info</tt> | |
| * field of #pjsip_transport_state_info for the transport state notificatio
n | | * field of #pjsip_transport_state_info for the transport state notificatio
n | |
| * callback #pjsip_tp_state_callback. | | * callback #pjsip_tp_state_callback. | |
| */ | | */ | |
| typedef struct pjsip_tls_state_info | | typedef struct pjsip_tls_state_info | |
| { | | { | |
| /** | | /** | |
| | | | |
| skipping to change at line 231 | | skipping to change at line 248 | |
| * Initialize TLS setting with default values. | | * Initialize TLS setting with default values. | |
| * | | * | |
| * @param tls_opt The TLS setting to be initialized. | | * @param tls_opt The TLS setting to be initialized. | |
| */ | | */ | |
| PJ_INLINE(void) pjsip_tls_setting_default(pjsip_tls_setting *tls_opt) | | PJ_INLINE(void) pjsip_tls_setting_default(pjsip_tls_setting *tls_opt) | |
| { | | { | |
| pj_memset(tls_opt, 0, sizeof(*tls_opt)); | | pj_memset(tls_opt, 0, sizeof(*tls_opt)); | |
| tls_opt->reuse_addr = PJSIP_TLS_TRANSPORT_REUSEADDR; | | tls_opt->reuse_addr = PJSIP_TLS_TRANSPORT_REUSEADDR; | |
| tls_opt->qos_type = PJ_QOS_TYPE_BEST_EFFORT; | | tls_opt->qos_type = PJ_QOS_TYPE_BEST_EFFORT; | |
| tls_opt->qos_ignore_error = PJ_TRUE; | | tls_opt->qos_ignore_error = PJ_TRUE; | |
|
| | | tls_opt->sockopt_ignore_error = PJ_TRUE; | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Copy TLS setting. | | * Copy TLS setting. | |
| * | | * | |
| * @param pool The pool to duplicate strings etc. | | * @param pool The pool to duplicate strings etc. | |
| * @param dst Destination structure. | | * @param dst Destination structure. | |
| * @param src Source structure. | | * @param src Source structure. | |
| */ | | */ | |
| PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool, | | PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool, | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 19 lines changed or added | |
|
| sip_util.h | | sip_util.h | |
|
| /* $Id: sip_util.h 4347 2013-02-13 10:19:25Z nanang $ */ | | /* $Id: sip_util.h 4888 2014-08-18 08:54:43Z bennylp $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 368 | | skipping to change at line 368 | |
| * @param tdata The transmit buffer for the request being cancel
led. | | * @param tdata The transmit buffer for the request being cancel
led. | |
| * @param p_tdata Pointer to receive the transmit data. | | * @param p_tdata Pointer to receive the transmit data. | |
| * | | * | |
| * @return PJ_SUCCESS, or the appropriate error code. | | * @return PJ_SUCCESS, or the appropriate error code. | |
| */ | | */ | |
| PJ_DECL(pj_status_t) pjsip_endpt_create_cancel( pjsip_endpoint *endpt, | | PJ_DECL(pj_status_t) pjsip_endpt_create_cancel( pjsip_endpoint *endpt, | |
| const pjsip_tx_data *tdata, | | const pjsip_tx_data *tdata, | |
| pjsip_tx_data **p_tdata); | | pjsip_tx_data **p_tdata); | |
| | | | |
| /** | | /** | |
|
| | | * Get destination address and port and transport type information for the | |
| | | * specified URI. | |
| | | * | |
| | | * @param target_uri The destination URI. | |
| | | * @param request_uri Optional request URI to be considered. May be NULL. | |
| | | * @param pool Pool to allocate memory from. | |
| | | * @param dest_info To be filled with destination info. | |
| | | * | |
| | | * @return PJ_SUCCESS or the appropriate error code. | |
| | | */ | |
| | | PJ_DECL(pj_status_t) pjsip_get_dest_info(const pjsip_uri *target_uri, | |
| | | const pjsip_uri *request_uri, | |
| | | pj_pool_t *pool, | |
| | | pjsip_host_info *dest_info); | |
| | | | |
| | | /** | |
| * Find which destination to be used to send the request message, based | | * Find which destination to be used to send the request message, based | |
| * on the request URI and Route headers in the message. The procedure | | * on the request URI and Route headers in the message. The procedure | |
| * used here follows the guidelines on sending the request in RFC 3261 | | * used here follows the guidelines on sending the request in RFC 3261 | |
| * chapter 8.1.2. | | * chapter 8.1.2. | |
| * | | * | |
| * Note there was a change in the behavior of this function since version | | * Note there was a change in the behavior of this function since version | |
| * 0.5.10.2. Previously this function may modify the request when strict | | * 0.5.10.2. Previously this function may modify the request when strict | |
| * route is present (to update request URI and route-set). This is no | | * route is present (to update request URI and route-set). This is no | |
| * longer the case now, and this process is done in separate function | | * longer the case now, and this process is done in separate function | |
| * (see #pjsip_process_route_set()). | | * (see #pjsip_process_route_set()). | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 17 lines changed or added | |
|
| sock.h | | sock.h | |
|
| /* $Id: sock.h 4538 2013-06-19 09:06:55Z nanang $ */ | | /* $Id: sock.h 4860 2014-06-19 05:07:12Z riza $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 597 | | skipping to change at line 597 | |
| } pj_sockaddr; | | } pj_sockaddr; | |
| | | | |
| /** | | /** | |
| * This structure provides multicast group information for IPv4 addresses. | | * This structure provides multicast group information for IPv4 addresses. | |
| */ | | */ | |
| typedef struct pj_ip_mreq { | | typedef struct pj_ip_mreq { | |
| pj_in_addr imr_multiaddr; /**< IP multicast address of group. */ | | pj_in_addr imr_multiaddr; /**< IP multicast address of group. */ | |
| pj_in_addr imr_interface; /**< local IP address of interface. */ | | pj_in_addr imr_interface; /**< local IP address of interface. */ | |
| } pj_ip_mreq; | | } pj_ip_mreq; | |
| | | | |
|
| | | /* Maximum number of socket options. */ | |
| | | #define PJ_MAX_SOCKOPT_PARAMS 4 | |
| | | | |
| | | /** | |
| | | * Options to be set for the socket. | |
| | | */ | |
| | | typedef struct pj_sockopt_params | |
| | | { | |
| | | /* The number of options to be applied. */ | |
| | | unsigned cnt; | |
| | | | |
| | | /* Array of options to be applied. */ | |
| | | struct { | |
| | | /* The level at which the option is defined. */ | |
| | | int level; | |
| | | | |
| | | /* Option name. */ | |
| | | int optname; | |
| | | | |
| | | /* Pointer to the buffer in which the option is specified. */ | |
| | | void *optval; | |
| | | | |
| | | /* Buffer size of the buffer pointed by optval. */ | |
| | | int optlen; | |
| | | } options[PJ_MAX_SOCKOPT_PARAMS]; | |
| | | } pj_sockopt_params; | |
| | | | |
| /**************************************************************************
*** | | /**************************************************************************
*** | |
| * | | * | |
| * SOCKET ADDRESS MANIPULATION. | | * SOCKET ADDRESS MANIPULATION. | |
| * | | * | |
| **************************************************************************
*** | | **************************************************************************
*** | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * Convert 16-bit value from network byte order to host byte order. | | * Convert 16-bit value from network byte order to host byte order. | |
| * | | * | |
| | | | |
| skipping to change at line 1284 | | skipping to change at line 1311 | |
| * | | * | |
| * @return PJ_SUCCESS or the status code. | | * @return PJ_SUCCESS or the status code. | |
| */ | | */ | |
| PJ_DECL(pj_status_t) pj_sock_setsockopt( pj_sock_t sockfd, | | PJ_DECL(pj_status_t) pj_sock_setsockopt( pj_sock_t sockfd, | |
| pj_uint16_t level, | | pj_uint16_t level, | |
| pj_uint16_t optname, | | pj_uint16_t optname, | |
| const void *optval, | | const void *optval, | |
| int optlen); | | int optlen); | |
| | | | |
| /** | | /** | |
|
| | | * Set socket options associated with a socket. This method will apply all | |
| | | the | |
| | | * options specified, and ignore any errors that might be raised. | |
| | | * | |
| | | * @param sockfd The socket descriptor. | |
| | | * @param params The socket options. | |
| | | * | |
| | | * @return PJ_SUCCESS or the last error code. | |
| | | */ | |
| | | PJ_DECL(pj_status_t) pj_sock_setsockopt_params( pj_sock_t sockfd, | |
| | | const pj_sockopt_params *para | |
| | | ms); | |
| | | | |
| | | /** | |
| * Helper function to set socket buffer size using #pj_sock_setsockopt() | | * Helper function to set socket buffer size using #pj_sock_setsockopt() | |
| * with capability to auto retry with lower buffer setting value until | | * with capability to auto retry with lower buffer setting value until | |
| * the highest possible value is successfully set. | | * the highest possible value is successfully set. | |
| * | | * | |
| * @param sockfd The socket descriptor. | | * @param sockfd The socket descriptor. | |
| * @param optname The option name, valid values are pj_SO_RCVBUF() | | * @param optname The option name, valid values are pj_SO_RCVBUF() | |
| * and pj_SO_SNDBUF(). | | * and pj_SO_SNDBUF(). | |
| * @param auto_retry Option whether auto retry with lower value is | | * @param auto_retry Option whether auto retry with lower value is | |
| * enabled. | | * enabled. | |
| * @param buf_size On input, specify the prefered buffer size setting, | | * @param buf_size On input, specify the prefered buffer size setting, | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 42 lines changed or added | |
|
| ssl_sock.h | | ssl_sock.h | |
|
| /* $Id: ssl_sock.h 4506 2013-04-26 06:01:43Z bennylp $ */ | | /* $Id: ssl_sock.h 4862 2014-06-19 09:42:02Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2009-2011 Teluu Inc. (http://www.teluu.com) | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | | |
| skipping to change at line 237 | | skipping to change at line 237 | |
| PJ_DECL(pj_status_t) pj_ssl_cert_get_verify_status_strings( | | PJ_DECL(pj_status_t) pj_ssl_cert_get_verify_status_strings( | |
| pj_uint32_t verify_status, | | pj_uint32_t verify_status, | |
| const char *error_strings[]
, | | const char *error_strings[]
, | |
| unsigned *count); | | unsigned *count); | |
| | | | |
| /** | | /** | |
| * Cipher suites enumeration. | | * Cipher suites enumeration. | |
| */ | | */ | |
| typedef enum pj_ssl_cipher { | | typedef enum pj_ssl_cipher { | |
| | | | |
|
| | | /* Unsupported cipher */ | |
| | | PJ_TLS_UNKNOWN_CIPHER = -1, | |
| | | | |
| /* NULL */ | | /* NULL */ | |
| PJ_TLS_NULL_WITH_NULL_NULL = 0x00000000, | | PJ_TLS_NULL_WITH_NULL_NULL = 0x00000000, | |
| | | | |
| /* TLS/SSLv3 */ | | /* TLS/SSLv3 */ | |
| PJ_TLS_RSA_WITH_NULL_MD5 = 0x00000001, | | PJ_TLS_RSA_WITH_NULL_MD5 = 0x00000001, | |
| PJ_TLS_RSA_WITH_NULL_SHA = 0x00000002, | | PJ_TLS_RSA_WITH_NULL_SHA = 0x00000002, | |
| PJ_TLS_RSA_WITH_NULL_SHA256 = 0x0000003B, | | PJ_TLS_RSA_WITH_NULL_SHA256 = 0x0000003B, | |
| PJ_TLS_RSA_WITH_RC4_128_MD5 = 0x00000004, | | PJ_TLS_RSA_WITH_RC4_128_MD5 = 0x00000004, | |
| PJ_TLS_RSA_WITH_RC4_128_SHA = 0x00000005, | | PJ_TLS_RSA_WITH_RC4_128_SHA = 0x00000005, | |
| PJ_TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x0000000A, | | PJ_TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x0000000A, | |
| | | | |
| skipping to change at line 343 | | skipping to change at line 346 | |
| * Get cipher name string. | | * Get cipher name string. | |
| * | | * | |
| * @param cipher The cipher. | | * @param cipher The cipher. | |
| * | | * | |
| * @return The cipher name or NULL if cipher is not recognized/ | | * @return The cipher name or NULL if cipher is not recognized/ | |
| * supported. | | * supported. | |
| */ | | */ | |
| PJ_DECL(const char*) pj_ssl_cipher_name(pj_ssl_cipher cipher); | | PJ_DECL(const char*) pj_ssl_cipher_name(pj_ssl_cipher cipher); | |
| | | | |
| /** | | /** | |
|
| * Get cipher ID from cipher name string. | | * Get cipher ID from cipher name string. Note that on different backends | |
| | | * (e.g. OpenSSL or Symbian implementation), cipher names may not be | |
| | | * equivalent for the same cipher ID. | |
| * | | * | |
| * @param cipher_name The cipher name string. | | * @param cipher_name The cipher name string. | |
| * | | * | |
| * @return The cipher ID or PJ_TLS_UNKNOWN_CIPHER if the cipher | | * @return The cipher ID or PJ_TLS_UNKNOWN_CIPHER if the cipher | |
| * name string is not recognized/supported. | | * name string is not recognized/supported. | |
| */ | | */ | |
| PJ_DECL(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name); | | PJ_DECL(pj_ssl_cipher) pj_ssl_cipher_id(const char *cipher_name); | |
| | | | |
| /** | | /** | |
| * This structure contains the callbacks to be called by the secure socket. | | * This structure contains the callbacks to be called by the secure socket. | |
| | | | |
| skipping to change at line 534 | | skipping to change at line 539 | |
| /** | | /** | |
| * Status of peer certificate verification. | | * Status of peer certificate verification. | |
| */ | | */ | |
| pj_uint32_t verify_status; | | pj_uint32_t verify_status; | |
| | | | |
| /** | | /** | |
| * Last native error returned by the backend. | | * Last native error returned by the backend. | |
| */ | | */ | |
| unsigned long last_native_err; | | unsigned long last_native_err; | |
| | | | |
|
| | | /** | |
| | | * Group lock assigned to the ioqueue key. | |
| | | */ | |
| | | pj_grp_lock_t *grp_lock; | |
| | | | |
| } pj_ssl_sock_info; | | } pj_ssl_sock_info; | |
| | | | |
| /** | | /** | |
| * Definition of secure socket creation parameters. | | * Definition of secure socket creation parameters. | |
| */ | | */ | |
| typedef struct pj_ssl_sock_param | | typedef struct pj_ssl_sock_param | |
| { | | { | |
| /** | | /** | |
|
| | | * Optional group lock to be assigned to the ioqueue key. | |
| | | * | |
| | | * Note that when a secure socket listener is configured with a group | |
| | | * lock, any new secure socket of an accepted incoming connection | |
| | | * will have its own group lock created automatically by the library, | |
| | | * this group lock can be queried via pj_ssl_sock_get_info() in the inf | |
| | | o | |
| | | * field pj_ssl_sock_info::grp_lock. | |
| | | */ | |
| | | pj_grp_lock_t *grp_lock; | |
| | | | |
| | | /** | |
| * Specifies socket address family, either pj_AF_INET() and pj_AF_INET6
(). | | * Specifies socket address family, either pj_AF_INET() and pj_AF_INET6
(). | |
| * | | * | |
| * Default is pj_AF_INET(). | | * Default is pj_AF_INET(). | |
| */ | | */ | |
| int sock_af; | | int sock_af; | |
| | | | |
| /** | | /** | |
| * Specify socket type, either pj_SOCK_DGRAM() or pj_SOCK_STREAM(). | | * Specify socket type, either pj_SOCK_DGRAM() or pj_SOCK_STREAM(). | |
| * | | * | |
| * Default is pj_SOCK_STREAM(). | | * Default is pj_SOCK_STREAM(). | |
| | | | |
| skipping to change at line 730 | | skipping to change at line 751 | |
| pj_qos_params qos_params; | | pj_qos_params qos_params; | |
| | | | |
| /** | | /** | |
| * Specify if the transport should ignore any errors when setting the Q
oS | | * Specify if the transport should ignore any errors when setting the Q
oS | |
| * traffic type/parameters. | | * traffic type/parameters. | |
| * | | * | |
| * Default: PJ_TRUE | | * Default: PJ_TRUE | |
| */ | | */ | |
| pj_bool_t qos_ignore_error; | | pj_bool_t qos_ignore_error; | |
| | | | |
|
| | | /** | |
| | | * Specify options to be set on the transport. | |
| | | * | |
| | | * By default there is no options. | |
| | | * | |
| | | */ | |
| | | pj_sockopt_params sockopt_params; | |
| | | | |
| | | /** | |
| | | * Specify if the transport should ignore any errors when setting the | |
| | | * sockopt parameters. | |
| | | * | |
| | | * Default: PJ_TRUE | |
| | | * | |
| | | */ | |
| | | pj_bool_t sockopt_ignore_error; | |
| | | | |
| } pj_ssl_sock_param; | | } pj_ssl_sock_param; | |
| | | | |
| /** | | /** | |
| * Initialize the secure socket parameters for its creation with | | * Initialize the secure socket parameters for its creation with | |
| * the default values. | | * the default values. | |
| * | | * | |
| * @param param The parameter to be initialized. | | * @param param The parameter to be initialized. | |
| */ | | */ | |
| PJ_DECL(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param); | | PJ_DECL(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param); | |
| | | | |
| | | | |
End of changes. 6 change blocks. |
| 2 lines changed or deleted | | 41 lines changed or added | |
|
| transport.h | | transport.h | |
|
| /* $Id: transport.h 4345 2013-02-13 07:43:32Z nanang $ */ | | /* $Id: transport.h 4811 2014-04-08 07:25:20Z riza $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 545 | | skipping to change at line 545 | |
| | | | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Initialize transport info. | | * Initialize transport info. | |
| * | | * | |
| * @param info Transport info to be initialized. | | * @param info Transport info to be initialized. | |
| */ | | */ | |
| PJ_INLINE(void) pjmedia_transport_info_init(pjmedia_transport_info *info) | | PJ_INLINE(void) pjmedia_transport_info_init(pjmedia_transport_info *info) | |
| { | | { | |
|
| pj_bzero(&info->sock_info, sizeof(pjmedia_sock_info)); | | pj_bzero(info, sizeof(pjmedia_transport_info)); | |
| info->sock_info.rtp_sock = info->sock_info.rtcp_sock = PJ_INVALID_SOCKE
T; | | info->sock_info.rtp_sock = info->sock_info.rtcp_sock = PJ_INVALID_SOCKE
T; | |
|
| info->specific_info_cnt = 0; | | | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Get media transport info from the specified transport and all underlying | | * Get media transport info from the specified transport and all underlying | |
| * transports if any. The transport also contains information about socket
info | | * transports if any. The transport also contains information about socket
info | |
| * which describes the local address of the transport, and would be needed | | * which describes the local address of the transport, and would be needed | |
| * for example to fill in the "c=" and "m=" line of local SDP. | | * for example to fill in the "c=" and "m=" line of local SDP. | |
| * | | * | |
| * @param tp The transport. | | * @param tp The transport. | |
| * @param info Media transport info to be initialized. | | * @param info Media transport info to be initialized. | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 2 lines changed or added | |
|