Add enums to hacking too.
[citadel.git] / citadel / techdoc / views.txt
1 How "views" work in Citadel
2 ---------------------------
3  
4  There's no need to be rigid and stupid about how different rooms are presented
5 in a Citadel client.  And we don't enforce things either.  But there's a need
6 to make things look the way the user wants to see them.  For example, we might
7 always choose to see a room full of private mail as a summary (one line per
8 message) rather than always dumping out the entire contents like we do on a
9 typical message room.  An address book room might look better as a tabbed view
10 or something, rather than as a bunch of messages with vCards attached to them.
11
12  This is why we define "views" for a room.  It gives the client software a
13 hint as to how to display the contents of a room.  This is kept on a per-user
14 basis by storing it in the 'visit' record for a particular room/user
15 combination.  It is visit.v_view and is an integer.  Naturally, there also
16 needs to be a default, for users who have never visited the room before.  This
17 is in the room record as room.QRdefaultview (and is also an integer).
18  
19  In recent versions of Citadel, the view for a room also defines when and how
20 it is indexed.  For example, mailboxes and bulletin boards don't need to have
21 an euid index, but address books and calendars do.
22  
23  The values currently defined are:
24
25 #define VIEW_BBS                0       /* Bulletin board view */
26 #define VIEW_MAILBOX            1       /* Mailbox summary */
27 #define VIEW_ADDRESSBOOK        2       /* Address book view */
28 #define VIEW_CALENDAR           3       /* Calendar view */
29 #define VIEW_TASKS              4       /* Tasks view */
30 #define VIEW_NOTES              5       /* Notes view */
31 #define VIEW_WIKI               6       /* Wiki view */
32