pianod2
multisource multiuser scriptable networked music player
Classes | Namespaces | Enumerations | Functions
user.h File Reference

User data, privileges, details and preferences implementation. More...

#include <config.h>
#include <string>
#include <unordered_map>
#include <parsnip/parsnip.h>
#include "logging.h"
#include "fundamentals.h"
#include "enumeratedarray.h"
#include "datastore.h"
Include dependency graph for user.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  User
 Data about each user. More...
 

Namespaces

 Football
 Football C++ connections, services and parsers.
 

Enumerations

enum class  Rank { None , Listener , Standard , Administrator }
 User types in ascending ranks/level of authority. More...
 
enum class  Privilege {
  Service , Queue , Influence , Tuner ,
  Shadow , Present , Count
}
 User privilege flags, corresponding to an array position. More...
 

Functions

static Privilege operator++ (Privilege &p, int)
 Postfix increment operator to allow Privilege iteration. More...
 
void register_user_commands (Football::ServiceBase *service)
 

Detailed Description

User data, privileges, details and preferences implementation.

Enumeration Type Documentation

◆ Privilege

enum Privilege
strong

User privilege flags, corresponding to an array position.

Enumerator
Service 

User may add or remove sources. (Automatic for admin rank.)

Queue 

User may queue or cancel songs. (Automatic for standard rank.)

Influence 

User's playlist preferences influence autotuning selections.

Tuner 

User may set other users' presence, for autotuning.

Shadow 

Attribute: User was created automatically, shadowing a user account.

Present 

Attribute: Consider user present, even if not logged in.

Count 

◆ Rank

enum Rank
strong

User types in ascending ranks/level of authority.

Enumerator
None 

User is unauthorized to do anything except log in.

Listener 

User can query and view song-related data, but not change selections.

Standard 

User can query, choose playlist, request music, change volume.

Administrator 

User has full authorization, except for accessing others' private data.

Function Documentation

◆ operator++()

static Privilege operator++ ( Privilege p,
int   
)
inlinestatic

Postfix increment operator to allow Privilege iteration.

◆ register_user_commands()

void register_user_commands ( Football::ServiceBase service)