[mythtv] multi-user subsystem

Anastasiya Soboleva agsoboleva at yahoo.com
Sat Jun 3 13:28:04 UTC 2006


Hello, all.

I designed new concept of MythTV multi-user system.
Now I'm going to implement user accounts, and later
add group accounts.
So I propose next data model for user account. Each
user has his own collection of information, which
includes folder, resource counter, resource limit,
current theme, priority and other specific info.
Beside this user has list of channels,  plug-ins, 
scheduled records and already made records.

 Priority (byte)– this field specify privilege for
each user. For super user priority equals 0 and so he
can perform any privileged operations such as:
1) delete scheduled records
2) delete records
3) add new user
4) attach plug-in
5) change settings

More powerful between 2 users is one, whose Priority
value is lower. It means that someone, who has
priority value lower than others, can change any their
settings. 
We will distinguish administrators (users with
priority value from 0 to 30) and all other users whose
priority value is higher than 30. Administrators can
change global settings, for example, add new users and
correct their priority.

The describing model is represented on the figure
below.

Table ACCOUNTS is main for our multi-user system and
represents list of all users accounts. So with this  
different users  can use different user specific info
(theme, skip behaviour, channel change behaviour etc).

Table PLUGINS contains list of available plug-ins.
Field ID_plugin is a primary key.
Field Type can take value PLUGIN_MUSIC, PLUGIN_WEATHER
and so on. Field Info contains additional info about
correct plug-in work.
I haven't found this table in mythtv database
mythconverg, but I think it should be added.

Table CHANNELS contains list of all available
channels. In mythconverg similar table already exist.
For this we can use table 'channel' in mythconverg
with primary key chanid. 

Table CHANNEL SETTINGS specify connection between
account and concrete channel, that is available for
watching and recording. Fields Date and Time specifies
when user is allowed to watch\recording channel.  For
example, Monday 14.00 -16.00. 
If these fields are empty, than channel is available
all the time.
I haven't found this table in mythconverg, but I think
it should be added.

Also we can use table 'program' for account specific
list program and scheduling

Table RECORDS contains list of all made records. For
this we can use table 'recorded' in mythconverg with
insignificant modifications. 
One needs to do is add field ID_account (concerned
with table ACCOUNTS). So with it help we can find out
who is owner of made record. 
And also we will need to add field ID_schedul
(concerned with table SCHEDUL SETTINGS) that represent
identifier of scheduled record. 
If field ID_schedul is empty than record was made
without scheduling. 

Table SCHEDUL SETTINGS contains list of scheduled
records. Here user specifies begin and end time of
recording and channel.  For this we can use table
'record' in mythconverg. 

Table RECORDS SHAREDS indicates made records that are
available for user (user's recording lists). Users can
say that record they have watched (using field State).
So Field State shows the state of the record for every
user. Follow states can be set:
RS_VIEW - record have been watched
RS_NOT_VIEW  - record have not been watched
RS_CAN_DELETE - record can be deleted 
and so on.
Using this information we can delete the recording
when everyone in the household has watched it and set
flag RS_CAN_DELETE for it. Also, we can re-record it
later, if the recording is autoexpired, for the user
who haven't watched the recordings.
I haven't found similar table in mythconverg, but I
think it should be added.

This model is quite good and simple for organizing
multi-user system. The only one disadvantage is
absence of evident groups support. 
But here already there are 3 implicit groups (Super
user, Admins and Users). 
Groups of users can be added later.

I have attached Data scheme to this letter.

Anastasiya


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fig1_concept2.gif
Type: image/gif
Size: 11988 bytes
Desc: 10956021-Fig1_concept2.gif
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060603/77d8a77a/attachment.gif 


More information about the mythtv-dev mailing list