Skip to content
Snippets Groups Projects
Commit d9344705 authored by Alexandre Lision's avatar Alexandre Lision Committed by gerrit2
Browse files

dialing call: add helper constructor

this constructor takes the peer ContactMethod in argument.

Issue: #68327
Change-Id: Iaaba99dba303657e07470d58d2a837e78f36c4b3
parent 6dacd135
No related branches found
No related tags found
No related merge requests found
...@@ -480,6 +480,14 @@ Call* CallModelPrivate::addCall2(Call* call, Call* parentCall) ...@@ -480,6 +480,14 @@ Call* CallModelPrivate::addCall2(Call* call, Call* parentCall)
return call; return call;
} //addCall } //addCall
///Return the current or create a new dialing call from peer ContactMethod
Call* CallModel::dialingCall(ContactMethod* cm)
{
auto call = dialingCall();
call->setPeerContactMethod(cm);
return call;
}
///Return the current or create a new dialing call from peer name and the account ///Return the current or create a new dialing call from peer name and the account
Call* CallModel::dialingCall(const QString& peerName, Account* account) Call* CallModel::dialingCall(const QString& peerName, Account* account)
{ {
......
...@@ -80,6 +80,7 @@ public: ...@@ -80,6 +80,7 @@ public:
//Call related //Call related
Q_INVOKABLE Call* dialingCall ( const QString& peerName=QString(), Account* account=nullptr ); Q_INVOKABLE Call* dialingCall ( const QString& peerName=QString(), Account* account=nullptr );
Q_INVOKABLE Call* dialingCall ( ContactMethod* cm );
Q_INVOKABLE void attendedTransfer ( Call* toTransfer , Call* target ); Q_INVOKABLE void attendedTransfer ( Call* toTransfer , Call* target );
Q_INVOKABLE void transfer ( Call* toTransfer , const ContactMethod* target ); Q_INVOKABLE void transfer ( Call* toTransfer , const ContactMethod* target );
Q_INVOKABLE QByteArray getMime ( const Call* call ) const; Q_INVOKABLE QByteArray getMime ( const Call* call ) const;
...@@ -163,4 +164,3 @@ Q_SIGNALS: ...@@ -163,4 +164,3 @@ Q_SIGNALS:
void mediaStateChanged( Call* call, Media::Media* media, const Media::Media::State s, const Media::Media::State m); void mediaStateChanged( Call* call, Media::Media* media, const Media::Media::State s, const Media::Media::State m);
}; };
Q_DECLARE_METATYPE(CallModel*) Q_DECLARE_METATYPE(CallModel*)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment