Commit 4726b940 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI

clang-format all the things

parent 2fcd7348
---
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: true
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Always
...
This diff is collapsed.
This diff is collapsed.
/*
Flexisip, a flexible SIP proxy server with media capabilities.
Copyright (C) 2010-2015 Belledonne Communications SARL, All rights reserved.
Flexisip, a flexible SIP proxy server with media capabilities.
Copyright (C) 2010-2015 Belledonne Communications SARL, All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define SU_MSG_ARG_T struct auth_splugin_t
......@@ -34,10 +34,9 @@ FileAuthDb::FileAuthDb() {
sync();
}
void FileAuthDb::getPasswordFromBackend(su_root_t *root, const std::string &id, const std::string &domain, const std::string &authid, AuthDbListener *listener)
{
AuthDbResult res=AuthDbResult::PASSWORD_NOT_FOUND;
void FileAuthDb::getPasswordFromBackend(su_root_t *root, const std::string &id, const std::string &domain,
const std::string &authid, AuthDbListener *listener) {
AuthDbResult res = AuthDbResult::PASSWORD_NOT_FOUND;
time_t now = getCurrentTime();
if (difftime(now, mLastSync) >= mCacheExpire) {
......@@ -46,10 +45,10 @@ void FileAuthDb::getPasswordFromBackend(su_root_t *root, const std::string &id,
string key(createPasswordKey(id, domain, authid));
if ( getCachedPassword(key, domain, listener->mPassword) == VALID_PASS_FOUND ) {
if (getCachedPassword(key, domain, listener->mPassword) == VALID_PASS_FOUND) {
res = AuthDbResult::PASSWORD_FOUND;
}
listener->mResult=res;
listener->mResult = res;
listener->onResult();
}
......
This diff is collapsed.
/*
Flexisip, a flexible SIP proxy server with media capabilities.
Copyright (C) 2010-2015 Belledonne Communications SARL, All rights reserved.
Flexisip, a flexible SIP proxy server with media capabilities.
Copyright (C) 2010-2015 Belledonne Communications SARL, All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "authdb.hh"
using namespace ::std;
AuthDbBackend *AuthDbBackend::sUnique = NULL;
AuthDbListener::~AuthDbListener(){
AuthDbListener::~AuthDbListener() {
}
class FixedAuthDb : public AuthDbBackend {
public:
FixedAuthDb(){}
public:
FixedAuthDb() {
}
virtual void getPasswordFromBackend(su_root_t *root, const std::string& id, const std::string& domain, const std::string& authid, AuthDbListener *listener)
{
virtual void getPasswordFromBackend(su_root_t *root, const std::string &id, const std::string &domain,
const std::string &authid, AuthDbListener *listener) {
listener->mPassword.assign("fixed");
listener->mResult=PASSWORD_FOUND;
listener->mResult = PASSWORD_FOUND;
listener->onResult();
}
static void declareConfig(GenericStruct* mc){};
static void declareConfig(GenericStruct *mc){};
};
AuthDbBackend* AuthDbBackend::get() {
AuthDbBackend *AuthDbBackend::get() {
if (sUnique == NULL) {
GenericStruct *cr=GenericManager::get()->getRoot();
GenericStruct *ma=cr->get<GenericStruct>("module::Authentication");
const string &impl=ma->get<ConfigString>("db-implementation")->read();
GenericStruct *cr = GenericManager::get()->getRoot();
GenericStruct *ma = cr->get<GenericStruct>("module::Authentication");
const string &impl = ma->get<ConfigString>("db-implementation")->read();
if (impl == "fixed") {
sUnique = new FixedAuthDb();
} else if (impl == "file") {
......@@ -54,7 +53,7 @@ AuthDbBackend* AuthDbBackend::get() {
sUnique = new OdbcAuthDb();
#endif
#if ENABLE_SOCI
} else if( impl == "soci") {
} else if (impl == "soci") {
sUnique = new SociAuthDB();
#endif
}
......@@ -63,11 +62,10 @@ AuthDbBackend* AuthDbBackend::get() {
return sUnique;
}
AuthDbBackend::AuthDbBackend() {
GenericStruct *cr=GenericManager::get()->getRoot();
GenericStruct *ma=cr->get<GenericStruct>("module::Authentication");
list<string> domains=ma->get<ConfigStringList>("auth-domains")->read();
GenericStruct *cr = GenericManager::get()->getRoot();
GenericStruct *ma = cr->get<GenericStruct>("module::Authentication");
list<string> domains = ma->get<ConfigStringList>("auth-domains")->read();
mCacheExpire = ma->get<ConfigInt>("cache-expire")->read();
}
......@@ -87,15 +85,15 @@ void AuthDbBackend::declareConfig(GenericStruct *mc) {
string AuthDbBackend::createPasswordKey(const string &user, const string &host, const string &auth_username) {
ostringstream key;
key<<user<<"#"<<auth_username;
key << user << "#" << auth_username;
return key.str();
}
AuthDbBackend::CacheResult AuthDbBackend::getCachedPassword(const string &key, const string &domain, string &pass) {
time_t now = getCurrentTime();
auto & passwords=mCachedPasswords[domain];
auto &passwords = mCachedPasswords[domain];
unique_lock<mutex> lck(mCachedPasswordMutex);
auto it=passwords.find(key);
auto it = passwords.find(key);
if (it != passwords.end()) {
pass.assign((*it).second.pass);
if (now < (*it).second.expire_date) {
......@@ -108,41 +106,43 @@ AuthDbBackend::CacheResult AuthDbBackend::getCachedPassword(const string &key, c
return NO_PASS_FOUND;
}
void AuthDbBackend::clearCache(){
void AuthDbBackend::clearCache() {
mCachedPasswords.clear();
}
bool AuthDbBackend::cachePassword(const string &key, const string &domain, const string &pass, int expires){
bool AuthDbBackend::cachePassword(const string &key, const string &domain, const string &pass, int expires) {
time_t now = getCurrentTime();
map<string, CachedPassword> &passwords=mCachedPasswords[domain];
map<string, CachedPassword> &passwords = mCachedPasswords[domain];
unique_lock<mutex> lck(mCachedPasswordMutex);
map<string, CachedPassword>::iterator it=passwords.find(key);
if (expires==-1) expires=mCacheExpire;
map<string, CachedPassword>::iterator it = passwords.find(key);
if (expires == -1)
expires = mCacheExpire;
if (it != passwords.end()) {
(*it).second.pass=pass;
(*it).second.expire_date=now+expires;
(*it).second.pass = pass;
(*it).second.expire_date = now + expires;
} else {
passwords.insert(make_pair(key,CachedPassword(pass,now+expires)));
passwords.insert(make_pair(key, CachedPassword(pass, now + expires)));
}
return true;
}
void AuthDbBackend::getPassword(su_root_t *root, const url_t *from, const char *auth_username, AuthDbListener *listener){
void AuthDbBackend::getPassword(su_root_t *root, const url_t *from, const char *auth_username,
AuthDbListener *listener) {
// Check for usable cached password
string id(from->url_user);
string domain(from->url_host);
string auth(auth_username);
string key(createPasswordKey(id, domain, auth));
switch(getCachedPassword(key, domain, listener->mPassword)) {
switch (getCachedPassword(key, domain, listener->mPassword)) {
case VALID_PASS_FOUND:
listener->mResult=AuthDbResult::PASSWORD_FOUND;
listener->mResult = AuthDbResult::PASSWORD_FOUND;
listener->onResult();
return;
case EXPIRED_PASS_FOUND:
// Might check here if connection is failing
// If it is the case use fallback password and
//return AuthDbResult::PASSWORD_FOUND;
// return AuthDbResult::PASSWORD_FOUND;
break;
case NO_PASS_FOUND:
break;
......@@ -152,21 +152,18 @@ void AuthDbBackend::getPassword(su_root_t *root, const url_t *from, const char *
getPasswordFromBackend(root, id, domain, auth, listener);
}
static void main_thread_async_response_cb(su_root_magic_t *rm, su_msg_r msg,
void *u) {
AuthDbListener **listenerStorage = (AuthDbListener**)su_msg_data(msg);
AuthDbListener *listener=*listenerStorage;
static void main_thread_async_response_cb(su_root_magic_t *rm, su_msg_r msg, void *u) {
AuthDbListener **listenerStorage = (AuthDbListener **)su_msg_data(msg);
AuthDbListener *listener = *listenerStorage;
listener->onResult();
}
void AuthDbBackend::notifyPasswordRetrieved(su_root_t *root, AuthDbListener *listener, AuthDbResult result, const std::string &password) {
void AuthDbBackend::notifyPasswordRetrieved(su_root_t *root, AuthDbListener *listener, AuthDbResult result,
const std::string &password) {
if (listener) {
su_msg_r mamc = SU_MSG_R_INIT;
if (-1 == su_msg_create(mamc,
su_root_task(root),
su_root_task(root),
main_thread_async_response_cb,
sizeof(AuthDbListener*))) {
if (-1 == su_msg_create(mamc, su_root_task(root), su_root_task(root), main_thread_async_response_cb,
sizeof(AuthDbListener *))) {
LOGF("Couldn't create auth async message");
}
......@@ -175,12 +172,12 @@ void AuthDbBackend::notifyPasswordRetrieved(su_root_t *root, AuthDbListener *lis
switch (result) {
case PASSWORD_FOUND:
listener->mResult=result;
listener->mPassword=password;
listener->mResult = result;
listener->mPassword = password;
break;
case PASSWORD_NOT_FOUND:
listener->mResult=AuthDbResult::PASSWORD_NOT_FOUND;
listener->mPassword="";
listener->mResult = AuthDbResult::PASSWORD_NOT_FOUND;
listener->mPassword = "";
break;
case AUTH_ERROR:
/*in that case we can fallback to the cached password previously set*/
......@@ -195,14 +192,14 @@ void AuthDbBackend::notifyPasswordRetrieved(su_root_t *root, AuthDbListener *lis
}
}
void AuthDbBackend::createCachedAccount(const url_t *from, const char *auth_username, const char *password, int expires){
if (from->url_host && from->url_user){
string key=createPasswordKey(from->url_user, from->url_host, auth_username ? auth_username : "");
cachePassword(key,from->url_host,password,expires);
void AuthDbBackend::createCachedAccount(const url_t *from, const char *auth_username, const char *password,
int expires) {
if (from->url_host && from->url_user) {
string key = createPasswordKey(from->url_user, from->url_host, auth_username ? auth_username : "");
cachePassword(key, from->url_host, password, expires);
}
}
void AuthDbBackend::createAccount(const url_t *from, const char *auth_username, const char *password, int expires){
void AuthDbBackend::createAccount(const url_t *from, const char *auth_username, const char *password, int expires) {
createCachedAccount(from, auth_username, password, expires);
}
This diff is collapsed.
/*
Flexisip, a flexible SIP proxy server with media capabilities.
Copyright (C) 2010-2015 Belledonne Communications SARL, All rights reserved.
Flexisip, a flexible SIP proxy server with media capabilities.
Copyright (C) 2010-2015 Belledonne Communications SARL, All rights reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef callcontext_mediarelay_hh
......@@ -26,28 +26,28 @@
#include "sdp-modifier.hh"
#include <map>
class TranscodedCall;
class RelayedCall: public CallContextBase {
public:
class RelayedCall : public CallContextBase {
public:
static const int sMaxSessions = 4;
RelayedCall(const shared_ptr<MediaRelayServer> &server, sip_t *sip);
/* Create a channel for each sdp media using defined relay ip for front and back. The transaction
* allow use to identify the callee (we don't have a tag yet).
*/
void initChannels(SdpModifier *m, const std::string &tag, const std::string &trid, const std::pair<std::string,std::string> &frontRelayIps, const std::pair<std::string,std::string> &backRelayIps);
void initChannels(SdpModifier *m, const std::string &tag, const std::string &trid,
const std::pair<std::string, std::string> &frontRelayIps,
const std::pair<std::string, std::string> &backRelayIps);
/* Obtain the local address and port used for relaying */
std::pair<std::string,int> getChannelSources(int mline, const std::string & partyTag, const std::string &trId);
std::pair<std::string, int> getChannelSources(int mline, const std::string &partyTag, const std::string &trId);
/* Obtain destination (previously set by setChannelDestinations()*/
std::pair<std::string,int> getChannelDestinations(int mline, const std::string & partyTag, const std::string &trId);
std::pair<std::string, int> getChannelDestinations(int mline, const std::string &partyTag, const std::string &trId);
void setChannelDestinations(SdpModifier *m, int mline, const std::string &ip, int port, const std::string & partyTag, const std::string &trId,
bool isEarlyMedia);
void setChannelDestinations(SdpModifier *m, int mline, const std::string &ip, int port, const std::string &partyTag,
const std::string &trId, bool isEarlyMedia);
void removeBranch(const std::string &trId);
void setEstablished(const std::string &trId);
......@@ -58,18 +58,19 @@ public:
virtual ~RelayedCall();
void configureRelayChannel(std::shared_ptr<RelayChannel> chan,sip_t *sip, sdp_session_t *session, int mline_nr);
void configureRelayChannel(std::shared_ptr<RelayChannel> chan, sip_t *sip, sdp_session_t *session, int mline_nr);
/*Enable filtering of H264 Iframes for low bandwidth.*/
void enableH264IFrameFiltering(int bandwidth_threshold, int decim, bool onlyIfLastProxy);
/*Enable telephone-event dropping for tls clients*/
void enableTelephoneEventDrooping(bool value);
const shared_ptr<MediaRelayServer> & getServer()const{
const shared_ptr<MediaRelayServer> &getServer() const {
return mServer;
}
private:
private:
std::shared_ptr<RelaySession> mSessions[sMaxSessions];
const shared_ptr<MediaRelayServer> & mServer;
const shared_ptr<MediaRelayServer> &mServer;
int mBandwidthThres;
int mDecim;
bool mH264DecimOnlyIfLastProxy;
......@@ -78,7 +79,4 @@ private:
bool mIsEstablished;
};
#endif
This diff is collapsed.
/*
Flexisip, a flexible SIP proxy server with media capabilities.
Copyright (C) 2010 Belledonne Communications SARL.
Copyright (C) 2010 Belledonne Communications SARL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef callcontext_hh
......@@ -22,97 +22,93 @@
#include "callstore.hh"
#include <list>
#include <mediastreamer2/msfilter.h>
#include <mediastreamer2/msticker.h>
#include <mediastreamer2/msrtp.h>
#include <mediastreamer2/bitratecontrol.h>
class TranscodedCall;
class CallContextParams{
public:
int mJbNomSize;
class CallContextParams {
public:
int mJbNomSize;
};
class CallSide{
public:
CallSide(TranscodedCall *ctx, const CallContextParams & params);
~CallSide();
MSConnectionPoint getRecvPoint();
PayloadType *getRecvFormat();
void enableRc(bool enabled);
void connect(CallSide *recvSide, MSTicker *t=NULL);
void disconnect(CallSide *recvSide);
const std::string &getLocalAddress();
int getAudioPort();
void setRemoteAddr(const char *addr, int port);
void assignPayloads(std::list<PayloadType *> &payloads);
void setPtime(int ptime);
void dump();
void playTone(char tone_name);
bool isActive(time_t cur);
void doBgTasks();
private:
static void payloadTypeChanged(RtpSession *s, unsigned long data);
static void onTelephoneEvent(RtpSession *s, int dtmf, void * user_data);
TranscodedCall *mCallCtx;
RtpSession *mSession;
RtpProfile *mProfile;
PayloadType *getSendFormat();
MSFilter *mReceiver;
MSFilter *mSender;
MSFilter *mDecoder;
MSFilter *mEncoder;
MSBitrateController *mRc;
MSFilter *mToneGen;
time_t mLastCheck;
uint64_t mLastRecvCount;
OrtpEvQueue *mRtpEvq;
int mPtime;
bool mRcEnabled;
bool mUsePlc;
std::string mLocalAddress;
class CallSide {
public:
CallSide(TranscodedCall *ctx, const CallContextParams &params);
~CallSide();
MSConnectionPoint getRecvPoint();
PayloadType *getRecvFormat();
void enableRc(bool enabled);
void connect(CallSide *recvSide, MSTicker *t = NULL);
void disconnect(CallSide *recvSide);
const std::string &getLocalAddress();
int getAudioPort();
void setRemoteAddr(const char *addr, int port);
void assignPayloads(std::list<PayloadType *> &payloads);
void setPtime(int ptime);
void dump();
void playTone(char tone_name);
bool isActive(time_t cur);
void doBgTasks();
private:
static void payloadTypeChanged(RtpSession *s, unsigned long data);
static void onTelephoneEvent(RtpSession *s, int dtmf, void *user_data);
TranscodedCall *mCallCtx;
RtpSession *mSession;
RtpProfile *mProfile;
PayloadType *getSendFormat();
MSFilter *mReceiver;
MSFilter *mSender;
MSFilter *mDecoder;
MSFilter *mEncoder;
MSBitrateController *mRc;
MSFilter *mToneGen;
time_t mLastCheck;
uint64_t mLastRecvCount;
OrtpEvQueue *mRtpEvq;
int mPtime;
bool mRcEnabled;
bool mUsePlc;
std::string mLocalAddress;
};
class TranscodedCall : public CallContextBase{
public:
TranscodedCall(sip_t *invite, const std::string &bind_address);
void prepare(const CallContextParams & params);
void join(MSTicker *ticker);
void unjoin();
bool isJoined()const;
void redraw(CallSide *receiver);
void setInitialOffer(std::list<PayloadType *> &payloads);
const std::list<PayloadType *> &getInitialOffer()const;
CallSide *getFrontSide(){
return mFrontSide;
}
CallSide *getBackSide() {
return mBackSide;
}
void playTone(sip_t *info);
void playTone(CallSide *origin, char dtmf);
~TranscodedCall();
void dump();
void doBgTasks();
virtual bool isInactive(time_t);
const std::string &getBindAddress()const{
return mBindAddress;
}
private:
CallSide *getOther(CallSide *cs);
MSTicker *mTicker;
CallSide *mFrontSide;
CallSide *mBackSide;
std::list<PayloadType *> mInitialOffer;
int mInfoCSeq;
std::string mBindAddress;
time_t mCreateTime;
class TranscodedCall : public CallContextBase {
public:
TranscodedCall(sip_t *invite, const std::string &bind_address);
void prepare(const CallContextParams &params);
void join(MSTicker *ticker);
void unjoin();
bool isJoined() const;
void redraw(CallSide *receiver);
void setInitialOffer(std::list<PayloadType *> &payloads);
const std::list<PayloadType *> &getInitialOffer() const;
CallSide *getFrontSide() {
return mFrontSide;
}
CallSide *getBackSide() {
return mBackSide;
}
void playTone(sip_t *info);
void playTone(CallSide *origin, char dtmf);
~TranscodedCall();
void dump();
void doBgTasks();
virtual bool isInactive(time_t);
const std::string &getBindAddress() const {
return mBindAddress;
}
private:
CallSide *getOther(CallSide *cs);
MSTicker *mTicker;
CallSide *mFrontSide;
CallSide *mBackSide;