mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
Wanted to get this in there before 0.5 goes wild, as doing this in a
cleaner code fashion requires re-authing your peers. Adds a friendyname to Users, so that when there is more fine-grained ACL management you can set/show the friendly name along with the known screen names of a user.
This commit is contained in:
parent
cec2eb738f
commit
da17f467cf
@ -39,6 +39,7 @@ QDataStream& operator<<( QDataStream &out, const ACLRegistry::User &user )
|
||||
{
|
||||
out << ACLUSERVERSION;
|
||||
out << user.uuid;
|
||||
out << user.friendlyName;
|
||||
out << user.knownDbids.length();
|
||||
foreach( QString knownDbid, user.knownDbids )
|
||||
out << knownDbid;
|
||||
@ -56,6 +57,7 @@ QDataStream& operator>>( QDataStream &in, ACLRegistry::User &user )
|
||||
if ( ver == ACLUSERVERSION )
|
||||
{
|
||||
in >> user.uuid;
|
||||
in >> user.friendlyName;
|
||||
int dbidsLength;
|
||||
in >> dbidsLength;
|
||||
QString knownDbid;
|
||||
|
@ -54,12 +54,14 @@ public:
|
||||
|
||||
struct User {
|
||||
QString uuid;
|
||||
QString friendlyName;
|
||||
QStringList knownDbids;
|
||||
QStringList knownAccountIds;
|
||||
ACLRegistry::ACL acl;
|
||||
|
||||
User()
|
||||
: uuid( QUuid::createUuid().toString() )
|
||||
, friendlyName()
|
||||
, knownDbids()
|
||||
, knownAccountIds()
|
||||
, acl( ACLRegistry::NotFound )
|
||||
@ -68,8 +70,9 @@ public:
|
||||
~User()
|
||||
{}
|
||||
|
||||
User( QString p_uuid, QStringList p_knownDbids, QStringList p_knownAccountIds, ACLRegistry::ACL p_acl )
|
||||
User( QString p_uuid, QString p_friendlyName, QStringList p_knownDbids, QStringList p_knownAccountIds, ACLRegistry::ACL p_acl )
|
||||
: uuid( p_uuid )
|
||||
, friendlyName( p_friendlyName )
|
||||
, knownDbids( p_knownDbids )
|
||||
, knownAccountIds( p_knownAccountIds )
|
||||
, acl( p_acl )
|
||||
@ -77,6 +80,7 @@ public:
|
||||
|
||||
User( const User &other )
|
||||
: uuid( other.uuid )
|
||||
, friendlyName( other.friendlyName )
|
||||
, knownDbids( other.knownDbids )
|
||||
, knownAccountIds( other.knownAccountIds )
|
||||
, acl( other.acl )
|
||||
|
Loading…
x
Reference in New Issue
Block a user