Handles various types of data transfer operations with the Citadel service.
[Talk to the citadel server]


Functions

void get_serv_info (char *browser_host, char *user_agent)
 get info about the server we've connected to
void fmout (char *align)
 Read Citadel variformat text and spit it out as HTML.
void pullquote_fmout (void)
 Read Citadel variformat text and spit it out as HTML in a form suitable for embedding in another message (forward/quote). (NO LINEBREAKS ALLOWED HERE!).
void text_to_server (char *ptr)
 Transmit message text (in memory) to the server.
void text_to_server_qp (char *ptr)
 Transmit message text (in memory) to the server, converting to Quoted-Printable encoding as we go.
void server_to_text ()
 translate server message output to text (used for editing room info files and such)
void read_server_binary (char *buffer, size_t total_len)
char * read_server_text (void)
 Read text from server, appending to a string buffer until the usual 000 terminator is found. Caller is responsible for freeing the returned pointer.

Variables

serv_info serv_info

Function Documentation

void get_serv_info ( char *  browser_host,
char *  user_agent 
)

get info about the server we've connected to

Parameters:
browser_host the citadell we want to connect to
user_agent which browser uses our client?

Tell the server what kind of client is connecting

Tell the server what kind of richtext we prefer

Tell the server that when we save a calendar event, we want invitations to be generated by the Citadel server instead of by the client.

Now ask the server to tell us a little bit about itself...

Definition at line 20 of file serv_func.c.

References safestrncpy(), serv_info::serv_bbs_city, serv_info::serv_default_cal_zone, serv_info::serv_fqdn, serv_getln(), serv_info::serv_humannode, serv_info, serv_info::serv_moreprompt, serv_info::serv_newuser_disabled, serv_info::serv_nodename, serv_info::serv_pid, serv_printf(), serv_puts(), serv_info::serv_rev_level, serv_info::serv_software, serv_info::serv_supports_ldap, and serv_info::serv_sysadm.

Referenced by session_loop().

void fmout ( char *  align  ) 

Read Citadel variformat text and spit it out as HTML.

Parameters:
align html align string

Quoted text should be displayed in italics and in a different colour. This code understands Citadel-style " >" quotes and will convert to <BLOCKQUOTE> tags.

Activate embedded URL's

Definition at line 106 of file serv_func.c.

References escputs(), serv_getln(), url(), and wprintf().

Referenced by display_changepw(), display_entroom(), do_logout(), pvo_do_cmd(), read_message(), and showuser().

void pullquote_fmout ( void   ) 

Read Citadel variformat text and spit it out as HTML in a form suitable for embedding in another message (forward/quote). (NO LINEBREAKS ALLOWED HERE!).

Quoted text should be displayed in italics and in a different colour. This code understands Citadel-style " >" quotes and will convert to <BLOCKQUOTE> tags.

Definition at line 155 of file serv_func.c.

References msgescputs(), serv_getln(), and wprintf().

Referenced by pullquote_message().

void text_to_server ( char *  ptr  ) 

Transmit message text (in memory) to the server.

Parameters:
ptr Pointer to the message being transmitted

Definition at line 198 of file serv_func.c.

References serv_puts().

Referenced by ajax_servcmd(), do_generic(), page_user(), save_edit(), and updatenote().

void text_to_server_qp ( char *  ptr  ) 

Transmit message text (in memory) to the server, converting to Quoted-Printable encoding as we go.

Parameters:
ptr Pointer to the message being transmitted

Definition at line 240 of file serv_func.c.

References serv_puts().

Referenced by post_mime_to_server().

void read_server_binary ( char *  buffer,
size_t  total_len 
)

Read binary data from server into memory using a series of server READ commands.

Parameters:
buffer the output buffer
total_len the maximal length of buffer

Definition at line 337 of file serv_func.c.

References lprintf(), serv_getln(), serv_printf(), and serv_read().

Referenced by mimepart(), and output_image().


Variable Documentation

struct serv_info serv_info

our connection data to the server

Definition at line 13 of file serv_func.c.

Referenced by get_serv_info().


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