Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
5f7d8447
Commit
5f7d8447
authored
4 years ago
by
Pierre Lespagnol
Committed by
Sébastien Blin
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
newaccountmodel: add default moderator functions
Change-Id: Iaa2074320b8a5c25107bc713597e75a4ca4d4445
parent
64adddc2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/api/newaccountmodel.h
+13
-0
13 additions, 0 deletions
src/api/newaccountmodel.h
src/newaccountmodel.cpp
+12
-0
12 additions, 0 deletions
src/newaccountmodel.cpp
src/qtwrapper/configurationmanager_wrap.h
+10
-0
10 additions, 0 deletions
src/qtwrapper/configurationmanager_wrap.h
with
35 additions
and
0 deletions
src/api/newaccountmodel.h
+
13
−
0
View file @
5f7d8447
...
...
@@ -200,6 +200,19 @@ public:
* @return best id of the account
*/
const
QString
bestIdForAccount
(
const
QString
&
accountID
);
/**
* Add/remove default moderator
* @param accountID
* @param peerURI
* @param state
*/
void
setDefaultModerator
(
const
QString
&
accountID
,
const
QString
&
peerURI
,
const
bool
&
state
);
/**
* Get default moderators for an account
* @param accountID
* @return default moderators for the account
*/
QStringList
getDefaultModerators
(
const
QString
&
accountID
);
Q_SIGNALS
:
/**
...
...
This diff is collapsed.
Click to expand it.
src/newaccountmodel.cpp
+
12
−
0
View file @
5f7d8447
...
...
@@ -1148,6 +1148,18 @@ NewAccountModel::bestIdForAccount(const QString& accountID)
return
QString
();
}
void
NewAccountModel
::
setDefaultModerator
(
const
QString
&
accountID
,
const
QString
&
peerURI
,
const
bool
&
state
)
{
ConfigurationManager
::
instance
().
setDefaultModerator
(
accountID
,
peerURI
,
state
);
}
QStringList
NewAccountModel
::
getDefaultModerators
(
const
QString
&
accountID
)
{
return
ConfigurationManager
::
instance
().
getDefaultModerators
(
accountID
);
}
}
// namespace lrc
#include
"api/moc_newaccountmodel.cpp"
...
...
This diff is collapsed.
Click to expand it.
src/qtwrapper/configurationmanager_wrap.h
+
10
−
0
View file @
5f7d8447
...
...
@@ -823,6 +823,16 @@ public Q_SLOTS: // METHODS
return
DRing
::
searchUser
(
accountId
.
toStdString
(),
query
.
toStdString
());
}
void
setDefaultModerator
(
const
QString
&
accountID
,
const
QString
&
peerURI
,
const
bool
&
state
)
{
DRing
::
setDefaultModerator
(
accountID
.
toStdString
(),
peerURI
.
toStdString
(),
state
);
}
QStringList
getDefaultModerators
(
const
QString
&
accountID
)
{
return
convertStringList
(
DRing
::
getDefaultModerators
(
accountID
.
toStdString
()));
}
Q_SIGNALS
:
// SIGNALS
void
volumeChanged
(
const
QString
&
device
,
double
value
);
void
accountsChanged
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment