Manage user preferences with a little help from the Citadel server.
[Configuration Mechanisms]


Functions

void load_preferences (void)
 display preferences dialog
int goto_config_room (void)
 Goto the user's configuration room, creating it if necessary.
void save_preferences (void)
 save the modifications
void get_preference (char *key, char *value, size_t value_len)
 query the actual setting of key in the citadel database
void set_preference (char *key, char *value, int save_to_server)
 Write a key into the webcit preferences database for this user.
void display_preferences (void)
 display form for changing your preferences and settings
void set_preferences (void)
 Commit new preferences and settings.

Function Documentation

void load_preferences ( void   ) 

display preferences dialog

Go back to the room we're supposed to be in

Definition at line 18 of file preferences.c.

References serv_getln(), serv_printf(), and serv_puts().

Referenced by become_logged_in().

int goto_config_room ( void   ) 

Goto the user's configuration room, creating it if necessary.

Returns:
0 on success or nonzero upon failure.

Definition at line 72 of file preferences.c.

References serv_getln(), and serv_printf().

Referenced by display_reg(), and save_preferences().

void save_preferences ( void   ) 

save the modifications

Go back to the room we're supposed to be in

Definition at line 90 of file preferences.c.

References goto_config_room(), serv_getln(), serv_printf(), and serv_puts().

Referenced by set_preference().

void get_preference ( char *  key,
char *  value,
size_t  value_len 
)

query the actual setting of key in the citadel database

Parameters:
key config key to query
value value to the key to get
value_len length of the value string

Definition at line 129 of file preferences.c.

References extract_token(), and num_tokens().

Referenced by become_logged_in(), calendar_day_view(), calendar_month_view_brief_events(), display_customize_iconbar(), display_enter(), display_icaltimetype_as_webform(), display_preferences(), do_iconbar(), do_iconbar_roomlist(), do_welcome(), fmt_date(), fmt_time(), knrooms(), readloop(), and utf8ify_rfc822_string().

void set_preference ( char *  key,
char *  value,
int  save_to_server 
)

Write a key into the webcit preferences database for this user.

key key whichs value is to be modified

Parameters:
value value to set
save_to_server 1 = flush all data to the server, 0 = cache it for now

Definition at line 154 of file preferences.c.

References extract_token(), num_tokens(), and save_preferences().

Referenced by change_start_page(), commit_iconbar(), do_welcome(), end_webcit_session(), knrooms(), readloop(), and set_preferences().

void display_preferences ( void   ) 

display form for changing your preferences and settings

begin form

Room list view

Calendar hour format

Calendar day view -- day start time

Calendar day view -- day end time

Signature

Character set to assume is in use for improperly encoded headers

submit buttons

end form

Definition at line 193 of file preferences.c.

References escputs(), get_preference(), hourname, offer_start_page(), output_headers(), wDumpContent(), and wprintf().

Referenced by session_loop().

void set_preferences ( void   ) 

Commit new preferences and settings.

Set the last argument to 1 only for the final setting, so we don't send the prefs file to the server repeatedly

Definition at line 401 of file preferences.c.

References bstr(), display_main_menu(), safestrncpy(), and set_preference().

Referenced by session_loop().


Generated on Wed Jun 20 23:13:13 2007 for webcit by  doxygen 1.5.2