pianod2
multisource multiuser scriptable networked music player
Public Types | Public Member Functions | List of all members
Ownership Class Referenceabstract

Privilege management for media sources. More...

#include <fundamentals.h>

Inheritance diagram for Ownership:
Inheritance graph
[legend]

Public Types

enum class  Type {
  DISOWNED , PRIVATE , SHARED , PUBLISHED ,
  PUBLIC
}
 Access levels for an object. More...
 
enum class  Action { SEE , USE , READ , ALTER }
 Access actions for an object. More...
 

Public Member Functions

virtual bool isOwnedBy (const User *user) const =0
 
virtual bool hasPermission (const User *user, Action action) const =0
 
bool isVisibleBy (const User *user) const
 
bool isUsableBy (const User *user) const
 
bool isDecendableBy (const User *user) const
 
bool isReadableBy (const User *user) const
 
bool isEditableBy (const User *user) const
 

Detailed Description

Privilege management for media sources.

Member Enumeration Documentation

◆ Action

enum Ownership::Action
strong

Access actions for an object.

Warning
Enumeration values and order matter (code compares access & actions).
Enumerator
SEE 

View existence of item.

USE 

Use the item to do something.

READ 

Read the item's contents/configuration.

ALTER 

Change the item.

◆ Type

enum Ownership::Type
strong

Access levels for an object.

Warning
Enumeration values and order matter (code compares access & actions).
Enumerator
DISOWNED 

Object has no owner.

PRIVATE 

Visible by owner only.

SHARED 

Others can use this, but not derive from it.

PUBLISHED 

Use and derive by anyone but only owner can manipulate.

PUBLIC 

Anyone can manipulate this.

Member Function Documentation

◆ hasPermission()

virtual bool Ownership::hasPermission ( const User user,
Action  action 
) const
pure virtual

Implemented in SubordinateOwnership, and PrimaryOwnership.

Here is the caller graph for this function:

◆ isDecendableBy()

bool Ownership::isDecendableBy ( const User user) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEditableBy()

bool Ownership::isEditableBy ( const User user) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isOwnedBy()

virtual bool Ownership::isOwnedBy ( const User user) const
pure virtual

Implemented in SubordinateOwnership, and PrimaryOwnership.

Here is the caller graph for this function:

◆ isReadableBy()

bool Ownership::isReadableBy ( const User user) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isUsableBy()

bool Ownership::isUsableBy ( const User user) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isVisibleBy()

bool Ownership::isVisibleBy ( const User user) const
inline
Here is the call graph for this function:

The documentation for this class was generated from the following file: