Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-lrc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
20
Issues
20
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-lrc
Commits
1f3f9c13
Unverified
Commit
1f3f9c13
authored
Mar 04, 2020
by
Sébastien Blin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sip: follow API changes (incomingAccountMessage)
Change-Id: I55f58a36bb4b5840cba2942eff3922359d1845b6
parent
225f8db9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
12 deletions
+31
-12
src/api/contactmodel.h
src/api/contactmodel.h
+5
-1
src/callbackshandler.cpp
src/callbackshandler.cpp
+3
-1
src/callbackshandler.h
src/callbackshandler.h
+5
-1
src/contactmodel.cpp
src/contactmodel.cpp
+4
-1
src/conversationmodel.cpp
src/conversationmodel.cpp
+11
-5
src/qtwrapper/configurationmanager_wrap.h
src/qtwrapper/configurationmanager_wrap.h
+3
-3
No files found.
src/api/contactmodel.h
View file @
1f3f9c13
...
...
@@ -139,10 +139,14 @@ Q_SIGNALS:
/**
* Connect this signal to know when a text message arrives for this account
* @param accountId
* @param msgId Interaction's id
* @param from peer uri
* @param payloads content of the message
*/
void
newAccountMessage
(
std
::
string
&
accountId
,
std
::
string
&
from
,
std
::
map
<
std
::
string
,
std
::
string
>
payloads
)
const
;
void
newAccountMessage
(
std
::
string
&
accountId
,
std
::
string
&
msgId
,
std
::
string
&
from
,
std
::
map
<
std
::
string
,
std
::
string
>
payloads
)
const
;
/**
* Connect this signal to know when a file transfer interaction is incoming
* @param dringId Daemon's ID for incoming transfer
...
...
src/callbackshandler.cpp
View file @
1f3f9c13
...
...
@@ -246,6 +246,7 @@ CallbacksHandler::subscribeToDebugReceived()
void
CallbacksHandler
::
slotNewAccountMessage
(
const
QString
&
accountId
,
const
QString
&
msgId
,
const
QString
&
from
,
const
QMap
<
QString
,
QString
>&
payloads
)
{
...
...
@@ -257,8 +258,9 @@ CallbacksHandler::slotNewAccountMessage(const QString& accountId,
auto
accountId2
=
accountId
.
toStdString
();
auto
from2
=
QString
(
from
).
replace
(
"@ring.dht"
,
""
).
toStdString
();
auto
msgId2
=
QString
(
msgId
).
toStdString
();
emit
newAccountMessage
(
accountId2
,
from2
,
stdPayloads
);
emit
newAccountMessage
(
accountId2
,
msgId2
,
from2
,
stdPayloads
);
}
void
...
...
src/callbackshandler.h
View file @
1f3f9c13
...
...
@@ -59,10 +59,12 @@ Q_SIGNALS:
/**
* Connect this signal to get incoming text interaction from the DHT.
* @param accountId interaction receiver.
* @param from interaction sender.
* @param msgId interaction's id.
* @param from interaction sender.
* @param payloads.
*/
void
newAccountMessage
(
std
::
string
&
accountId
,
std
::
string
&
msgId
,
std
::
string
&
from
,
std
::
map
<
std
::
string
,
std
::
string
>
payloads
);
/**
...
...
@@ -296,10 +298,12 @@ private Q_SLOTS:
/**
* Emit newAccountMessage
* @param accountId
* @param msgId
* @param from
* @param payloads of the interaction
*/
void
slotNewAccountMessage
(
const
QString
&
accountId
,
const
QString
&
msgId
,
const
QString
&
from
,
const
QMap
<
QString
,
QString
>&
payloads
);
/**
...
...
src/contactmodel.cpp
View file @
1f3f9c13
...
...
@@ -166,10 +166,12 @@ public Q_SLOTS:
/**
* Listen from callbacksHandler for new account interaction and add pending contact if not present
* @param accountId
* @param msgId
* @param from
* @param payloads
*/
void
slotNewAccountMessage
(
std
::
string
&
accountId
,
std
::
string
&
msgId
,
std
::
string
&
from
,
std
::
map
<
std
::
string
,
std
::
string
>
payloads
);
...
...
@@ -847,6 +849,7 @@ ContactModelPimpl::slotIncomingCall(const std::string& fromId, const std::string
void
ContactModelPimpl
::
slotNewAccountMessage
(
std
::
string
&
accountId
,
std
::
string
&
msgId
,
std
::
string
&
from
,
std
::
map
<
std
::
string
,
std
::
string
>
payloads
)
{
...
...
@@ -876,7 +879,7 @@ ContactModelPimpl::slotNewAccountMessage(std::string& accountId,
if
(
emitNewTrust
)
{
emit
behaviorController
.
newTrustRequest
(
linked
.
owner
.
id
,
from
);
}
emit
linked
.
newAccountMessage
(
accountId
,
from
,
payloads
);
emit
linked
.
newAccountMessage
(
accountId
,
msgId
,
from
,
payloads
);
}
std
::
string
...
...
src/conversationmodel.cpp
View file @
1f3f9c13
...
...
@@ -115,10 +115,11 @@ public:
* @param from the author uri
* @param body the content of the message
* @param timestamp the timestamp of the message
* @return msgId generated (in db)
*/
void
addIncomingMessage
(
const
std
::
string
&
from
,
const
std
::
string
&
body
,
const
uint64_t
&
timestamp
=
0
);
int
addIncomingMessage
(
const
std
::
string
&
from
,
const
std
::
string
&
body
,
const
uint64_t
&
timestamp
=
0
);
/**
* Change the status of an interaction. Listen from callbacksHandler
* @param accountId, account linked
...
...
@@ -218,10 +219,12 @@ public Q_SLOTS:
/**
* Listen from CallbacksHandler for new incoming interactions;
* @param accountId
* @param msgId
* @param from uri
* @param payloads body
*/
void
slotNewAccountMessage
(
std
::
string
&
accountId
,
std
::
string
&
msgId
,
std
::
string
&
from
,
std
::
map
<
std
::
string
,
std
::
string
>
payloads
);
/**
...
...
@@ -1765,6 +1768,7 @@ ConversationModelPimpl::addOrUpdateCallMessage(const std::string& callId,
void
ConversationModelPimpl
::
slotNewAccountMessage
(
std
::
string
&
accountId
,
std
::
string
&
msgId
,
std
::
string
&
from
,
std
::
map
<
std
::
string
,
std
::
string
>
payloads
)
{
...
...
@@ -1773,7 +1777,8 @@ ConversationModelPimpl::slotNewAccountMessage(std::string& accountId,
for
(
const
auto
&
payload
:
payloads
)
{
if
(
payload
.
first
.
find
(
"text/plain"
)
!=
std
::
string
::
npos
)
{
addIncomingMessage
(
from
,
payload
.
second
);
auto
dbId
=
addIncomingMessage
(
from
,
payload
.
second
);
storage
::
addDaemonMsgId
(
db
,
std
::
to_string
(
dbId
),
msgId
);
}
}
}
...
...
@@ -1801,7 +1806,7 @@ ConversationModelPimpl::slotIncomingCallMessage(const std::string& callId, const
}
void
int
ConversationModelPimpl
::
addIncomingMessage
(
const
std
::
string
&
from
,
const
std
::
string
&
body
,
const
uint64_t
&
timestamp
)
...
...
@@ -1832,6 +1837,7 @@ ConversationModelPimpl::addIncomingMessage(const std::string& from,
emit
linked
.
newInteraction
(
convIds
[
0
],
msgId
,
msg
);
sortConversations
();
emit
linked
.
modelSorted
();
return
msgId
;
}
void
...
...
src/qtwrapper/configurationmanager_wrap.h
View file @
1f3f9c13
...
...
@@ -141,8 +141,8 @@ public:
Q_EMIT
this
->
registeredNameFound
(
QString
(
accountId
.
c_str
()),
status
,
QString
(
address
.
c_str
()),
QString
(
name
.
c_str
()));
}),
exportable_callback
<
ConfigurationSignal
::
IncomingAccountMessage
>
(
[
this
]
(
const
std
::
string
&
account_id
,
const
std
::
string
&
from
,
const
std
::
map
<
std
::
string
,
std
::
string
>&
payloads
)
{
Q_EMIT
this
->
incomingAccountMessage
(
QString
(
account_id
.
c_str
()),
QString
(
from
.
c_str
()),
convertMap
(
payloads
));
[
this
]
(
const
std
::
string
&
account_id
,
const
std
::
string
&
msgId
,
const
std
::
string
&
from
,
const
std
::
map
<
std
::
string
,
std
::
string
>&
payloads
)
{
Q_EMIT
this
->
incomingAccountMessage
(
QString
(
account_id
.
c_str
()),
QString
(
msgId
.
c_str
()),
QString
(
from
.
c_str
()),
convertMap
(
payloads
));
}),
exportable_callback
<
ConfigurationSignal
::
MediaParametersChanged
>
(
[
this
]
(
const
std
::
string
&
account_id
)
{
...
...
@@ -722,7 +722,7 @@ Q_SIGNALS: // SIGNALS
void
incomingTrustRequest
(
const
QString
&
accountId
,
const
QString
&
from
,
const
QByteArray
&
payload
,
qulonglong
timeStamp
);
void
knownDevicesChanged
(
const
QString
&
accountId
,
const
MapStringString
&
devices
);
void
exportOnRingEnded
(
const
QString
&
accountId
,
int
status
,
const
QString
&
pin
);
void
incomingAccountMessage
(
const
QString
&
accountId
,
const
QString
&
from
,
const
MapStringString
&
payloads
);
void
incomingAccountMessage
(
const
QString
&
accountId
,
const
QString
msgId
,
const
QString
&
from
,
const
MapStringString
&
payloads
);
void
mediaParametersChanged
(
const
QString
&
accountId
);
void
audioDeviceEvent
();
void
audioMeter
(
const
QString
&
id
,
float
level
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment