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
49f5f63e
Unverified
Commit
49f5f63e
authored
Aug 03, 2020
by
Sébastien Blin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api: follow daemon changes on accountAvatarReceived (breaking change)
Change-Id: I78a515e6135eb68e85fe14a52c9f64795511e5c9
parent
c51772f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
17 deletions
+29
-17
src/callbackshandler.cpp
src/callbackshandler.cpp
+6
-5
src/callbackshandler.h
src/callbackshandler.h
+5
-3
src/newaccountmodel.cpp
src/newaccountmodel.cpp
+14
-5
src/qtwrapper/configurationmanager_wrap.h
src/qtwrapper/configurationmanager_wrap.h
+4
-4
No files found.
src/callbackshandler.cpp
View file @
49f5f63e
...
...
@@ -182,9 +182,9 @@ CallbacksHandler::CallbacksHandler(const Lrc& parent)
Qt
::
QueuedConnection
);
connect
(
&
ConfigurationManager
::
instance
(),
&
ConfigurationManagerInterface
::
account
Avatar
Received
,
&
ConfigurationManagerInterface
::
account
Profile
Received
,
this
,
&
CallbacksHandler
::
slotAccount
Avatar
Received
,
&
CallbacksHandler
::
slotAccount
Profile
Received
,
Qt
::
QueuedConnection
);
connect
(
&
ConfigurationManager
::
instance
(),
...
...
@@ -498,10 +498,11 @@ CallbacksHandler::slotDeviceRevokationEnded(const QString& accountId,
}
void
CallbacksHandler
::
slotAccountAvatarReceived
(
const
QString
&
accountId
,
const
QString
&
userPhoto
)
CallbacksHandler
::
slotAccountProfileReceived
(
const
QString
&
accountId
,
const
QString
&
displayName
,
const
QString
&
userPhoto
)
{
emit
account
AvatarReceived
(
accountId
,
userPhoto
);
emit
account
ProfileReceived
(
accountId
,
displayName
,
userPhoto
);
}
void
...
...
src/callbackshandler.h
View file @
49f5f63e
...
...
@@ -209,11 +209,12 @@ Q_SIGNALS:
const
int
status
);
/**
* Account
avatar
has been received
* Account
profile
has been received
* @param accountId
* @param displayName
* @param userPhoto
*/
void
account
AvatarReceived
(
const
QString
&
accountId
,
const
QString
&
userPhoto
);
void
account
ProfileReceived
(
const
QString
&
accountId
,
const
QString
&
displayName
,
const
QString
&
userPhoto
);
/**
* Emit exportOnRingEnded
...
...
@@ -446,9 +447,10 @@ private Q_SLOTS:
/**
* Emit account avatar has been received
* @param accountId
* @param displayName
* @param userPhoto
*/
void
slotAccount
AvatarReceived
(
const
QString
&
accountId
,
const
QString
&
userPhoto
);
void
slotAccount
ProfileReceived
(
const
QString
&
accountId
,
const
QString
&
displayName
,
const
QString
&
userPhoto
);
/**
* Emit exportOnRingEnded
...
...
src/newaccountmodel.cpp
View file @
49f5f63e
...
...
@@ -163,11 +163,12 @@ public Q_SLOTS:
void
slotMigrationEnded
(
const
QString
&
accountId
,
bool
ok
);
/**
* Emit account
Avatar
Received
* Emit account
Profile
Received
* @param accountId
* @param displayName
* @param userPhoto
*/
void
slotAccount
AvatarReceived
(
const
QString
&
accountId
,
const
QString
&
userPhoto
);
void
slotAccount
ProfileReceived
(
const
QString
&
accountId
,
const
QString
&
displayName
,
const
QString
&
userPhoto
);
};
NewAccountModel
::
NewAccountModel
(
Lrc
&
lrc
,
...
...
@@ -393,7 +394,7 @@ NewAccountModelPimpl::NewAccountModelPimpl(NewAccountModel& linked,
connect
(
&
callbacksHandler
,
&
CallbacksHandler
::
nameRegistrationEnded
,
this
,
&
NewAccountModelPimpl
::
slotNameRegistrationEnded
);
connect
(
&
callbacksHandler
,
&
CallbacksHandler
::
registeredNameFound
,
this
,
&
NewAccountModelPimpl
::
slotRegisteredNameFound
);
connect
(
&
callbacksHandler
,
&
CallbacksHandler
::
migrationEnded
,
this
,
&
NewAccountModelPimpl
::
slotMigrationEnded
);
connect
(
&
callbacksHandler
,
&
CallbacksHandler
::
account
AvatarReceived
,
this
,
&
NewAccountModelPimpl
::
slotAccountAvatar
Received
);
connect
(
&
callbacksHandler
,
&
CallbacksHandler
::
account
ProfileReceived
,
this
,
&
NewAccountModelPimpl
::
slotAccountProfile
Received
);
}
NewAccountModelPimpl
::~
NewAccountModelPimpl
()
...
...
@@ -638,9 +639,17 @@ NewAccountModelPimpl::slotMigrationEnded(const QString& accountId, bool ok)
}
void
NewAccountModelPimpl
::
slotAccount
AvatarReceived
(
const
QString
&
accountId
,
const
QString
&
userPhoto
)
NewAccountModelPimpl
::
slotAccount
ProfileReceived
(
const
QString
&
accountId
,
const
QString
&
displayName
,
const
QString
&
userPhoto
)
{
linked
.
setAvatar
(
accountId
,
userPhoto
);
auto
account
=
accounts
.
find
(
accountId
);
if
(
account
==
accounts
.
end
())
return
;
auto
&
accountInfo
=
account
->
second
.
first
;
accountInfo
.
profileInfo
.
avatar
=
userPhoto
;
accountInfo
.
profileInfo
.
alias
=
displayName
;
authority
::
storage
::
createOrUpdateProfile
(
accountInfo
.
id
,
accountInfo
.
profileInfo
);
emit
linked
.
profileUpdated
(
accountId
);
}
void
...
...
src/qtwrapper/configurationmanager_wrap.h
View file @
49f5f63e
...
...
@@ -127,9 +127,9 @@ public:
[
this
]
(
const
std
::
string
&
accountId
,
const
std
::
string
&
device
,
int
status
)
{
Q_EMIT
this
->
deviceRevocationEnded
(
QString
(
accountId
.
c_str
()),
QString
(
device
.
c_str
()),
status
);
}),
exportable_callback
<
ConfigurationSignal
::
Account
Avatar
Received
>
(
[
this
](
const
std
::
string
&
accountId
,
const
std
::
string
&
userPhoto
)
{
Q_EMIT
this
->
account
AvatarReceived
(
QString
(
accountId
.
c_str
()),
QString
(
userPhoto
.
c_str
()));
exportable_callback
<
ConfigurationSignal
::
Account
Profile
Received
>
(
[
this
](
const
std
::
string
&
accountId
,
const
std
::
string
&
displayName
,
const
std
::
string
&
userPhoto
)
{
Q_EMIT
this
->
account
ProfileReceived
(
QString
(
accountId
.
c_str
()),
QString
(
displayName
.
c_str
()),
QString
(
userPhoto
.
c_str
()));
}),
exportable_callback
<
ConfigurationSignal
::
ExportOnRingEnded
>
(
[
this
]
(
const
std
::
string
&
accountId
,
int
status
,
const
std
::
string
&
pin
)
{
...
...
@@ -755,7 +755,7 @@ Q_SIGNALS: // SIGNALS
void
profileReceived
(
const
QString
&
accountID
,
const
QString
&
peer
,
const
QString
&
vCard
);
void
dataTransferEvent
(
qulonglong
transfer_id
,
uint
code
);
void
deviceRevocationEnded
(
const
QString
&
accountId
,
const
QString
&
deviceId
,
int
status
);
void
account
AvatarReceived
(
const
QString
&
accountId
,
const
QString
&
userPhoto
);
void
account
ProfileReceived
(
const
QString
&
accountId
,
const
QString
&
displayName
,
const
QString
&
userPhoto
);
void
debugMessageReceived
(
const
QString
&
message
);
void
composingStatusChanged
(
const
QString
&
accountId
,
const
QString
&
contactId
,
bool
isComposing
);
};
...
...
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