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
6ec4b3e8
Commit
6ec4b3e8
authored
Aug 14, 2018
by
Andreas Traczyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug: connect to debug signal and forward to client
Change-Id: I0601aa7b323e2213000571481061d0eb707580de
parent
f74d0201
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
2 deletions
+57
-2
src/api/behaviorcontroller.h
src/api/behaviorcontroller.h
+4
-0
src/api/lrc.h
src/api/lrc.h
+1
-1
src/callbackshandler.cpp
src/callbackshandler.cpp
+27
-0
src/callbackshandler.h
src/callbackshandler.h
+16
-0
src/lrc.cpp
src/lrc.cpp
+1
-1
src/qtwrapper/configurationmanager_wrap.h
src/qtwrapper/configurationmanager_wrap.h
+6
-0
src/qtwrapper/instancemanager.cpp
src/qtwrapper/instancemanager.cpp
+1
-0
test/mocks/configurationmanager_mock.h
test/mocks/configurationmanager_mock.h
+1
-0
No files found.
src/api/behaviorcontroller.h
View file @
6ec4b3e8
...
...
@@ -87,6 +87,10 @@ Q_SIGNALS:
* Emitted when the unread interaction is now read
*/
void
newReadInteraction
(
const
std
::
string
&
accountId
,
const
std
::
string
&
conversation
,
uint64_t
interactionId
)
const
;
/**
* Emitted debugMessageReceived
*/
void
debugMessageReceived
(
const
std
::
string
&
message
);
};
...
...
src/api/lrc.h
View file @
6ec4b3e8
...
...
@@ -49,7 +49,7 @@ public:
* get a reference on the behavior controller.
* @return a BehaviorController&.
*/
const
BehaviorController
&
getBehaviorController
()
const
;
BehaviorController
&
getBehaviorController
()
const
;
/**
* get a reference on the DataTransfer controller.
* @return a DataTransferModel&.
...
...
src/callbackshandler.cpp
View file @
6ec4b3e8
...
...
@@ -23,6 +23,7 @@
#include "api/lrc.h"
#include "api/newaccountmodel.h"
#include "api/datatransfermodel.h"
#include "api/behaviorcontroller.h"
// Lrc
#include "account.h"
...
...
@@ -34,6 +35,12 @@
// DRing
#include <datatransfer_interface.h>
#ifdef ENABLE_LIBWRAP
// For the debugMessageReceived connection that queues const std::string refs
// when not using dbus
Q_DECLARE_METATYPE
(
std
::
string
);
#endif
namespace
lrc
{
...
...
@@ -169,6 +176,12 @@ CallbacksHandler::CallbacksHandler(const Lrc& parent)
this
,
&
CallbacksHandler
::
slotMigrationEnded
,
Qt
::
QueuedConnection
);
connect
(
&
ConfigurationManager
::
instance
(),
&
ConfigurationManagerInterface
::
debugMessageReceived
,
this
,
&
CallbacksHandler
::
slotDebugMessageReceived
,
Qt
::
QueuedConnection
);
}
CallbacksHandler
::~
CallbacksHandler
()
...
...
@@ -418,4 +431,18 @@ CallbacksHandler::slotMigrationEnded(const QString& accountId, const QString& st
emit
migrationEnded
(
accountId
.
toStdString
(),
status
==
"SUCCESS"
);
}
#ifdef ENABLE_LIBWRAP
void
CallbacksHandler
::
slotDebugMessageReceived
(
const
std
::
string
&
message
)
{
emit
parent
.
getBehaviorController
().
debugMessageReceived
(
message
);
}
#else
void
CallbacksHandler
::
slotDebugMessageReceived
(
const
QString
&
message
)
{
emit
parent
.
getBehaviorController
().
debugMessageReceived
(
message
.
toStdString
());
}
#endif
}
// namespace lrc
src/callbackshandler.h
View file @
6ec4b3e8
...
...
@@ -222,6 +222,12 @@ Q_SIGNALS:
*/
void
migrationEnded
(
const
std
::
string
&
accountId
,
bool
ok
);
/**
* Debug message received
* @param message
*/
void
debugMessageReceived
(
const
std
::
string
&
message
);
private
Q_SLOTS
:
/**
* Emit newAccountMessage
...
...
@@ -387,6 +393,16 @@ private Q_SLOTS:
*/
void
slotMigrationEnded
(
const
QString
&
accountId
,
const
QString
&
status
);
/**
* emit debugMessageReceived
* @param message
*/
#ifdef ENABLE_LIBWRAP
void
slotDebugMessageReceived
(
const
std
::
string
&
message
);
#else
void
slotDebugMessageReceived
(
const
QString
&
message
);
#endif
private:
const
api
::
Lrc
&
parent
;
};
...
...
src/lrc.cpp
View file @
6ec4b3e8
...
...
@@ -64,7 +64,7 @@ Lrc::getAccountModel() const
return
*
lrcPimpl_
->
accountModel
;
}
const
BehaviorController
&
BehaviorController
&
Lrc
::
getBehaviorController
()
const
{
return
*
lrcPimpl_
->
behaviorController
;
...
...
src/qtwrapper/configurationmanager_wrap.h
View file @
6ec4b3e8
...
...
@@ -53,6 +53,7 @@ public:
using
DRing
::
ConfigurationSignal
;
using
DRing
::
AudioSignal
;
using
DRing
::
DataTransferSignal
;
using
DRing
::
DebugSignal
;
setObjectName
(
"ConfigurationManagerInterface"
);
confHandlers
=
{
...
...
@@ -163,6 +164,10 @@ public:
[
this
]
(
const
std
::
string
&
account_id
,
const
std
::
string
&
uri
,
const
bool
&
banned
)
{
Q_EMIT
this
->
contactRemoved
(
QString
(
account_id
.
c_str
()),
QString
(
uri
.
c_str
()),
banned
);
}),
exportable_callback
<
DebugSignal
::
MessageSend
>
(
[
this
](
const
std
::
string
&
message
)
{
Q_EMIT
this
->
debugMessageReceived
(
message
);
}),
};
dataXferHandlers
=
{
...
...
@@ -700,6 +705,7 @@ Q_SIGNALS: // SIGNALS
void
contactRemoved
(
const
QString
&
accountID
,
const
QString
&
uri
,
bool
banned
);
void
dataTransferEvent
(
qulonglong
transfer_id
,
uint
code
);
void
deviceRevocationEnded
(
const
QString
&
accountId
,
const
QString
&
deviceId
,
int
status
);
void
debugMessageReceived
(
const
std
::
string
&
message
);
};
namespace
org
{
namespace
ring
{
namespace
Ring
{
...
...
src/qtwrapper/instancemanager.cpp
View file @
6ec4b3e8
...
...
@@ -39,6 +39,7 @@ InstanceManagerInterface::InstanceManagerInterface() : m_pTimer(nullptr)
using
DRing
::
ConfigurationSignal
;
using
DRing
::
PresenceSignal
;
using
DRing
::
DataTransferSignal
;
using
DRing
::
DebugSignal
;
#ifdef ENABLE_VIDEO
using
DRing
::
VideoSignal
;
...
...
test/mocks/configurationmanager_mock.h
View file @
6ec4b3e8
...
...
@@ -846,6 +846,7 @@ Q_SIGNALS: // SIGNALS
void
contactRemoved
(
const
QString
&
accountId
,
const
QString
&
uri
,
bool
banned
);
void
dataTransferEvent
(
uint64_t
transfer_id
,
uint32_t
code
);
void
deviceRevocationEnded
(
const
QString
&
accountId
,
const
QString
&
deviceId
,
int
status
);
void
debugMessageReceived
(
const
std
::
string
&
message
);
};
namespace
org
{
...
...
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