Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

Client.c File Reference

#include <string.h>
#include <zlib.h>
#include "Client.h"
#include "Memory.h"
#include "App.h"
#include "Window.h"
#include "NetCommon.h"
#include "Common.h"
#include "debug.h"
#include "xml_Gui.h"

Include dependency graph for Client.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  client_File_s
struct  client_Timer_s
struct  client_Window_s

Typedefs

typedef client_Window_s client_Window_t
typedef client_File_s client_File_t
typedef client_Timer_s client_Timer_t

Functions

u32 client_CliSRq_CallGadgetTL (gui_App_t *app, Window_t *window, u32 gadget_id, u32 method, tag *taglist)
u32 client_CliARq_CallGadgetTL (gui_App_t *app, Window_t *window, u32 gadget_id, u32 method, tag *taglist)
void client_CliARq_CloseWindow (gui_App_t *app, Window_t *win)
Window_tclient_CliSRq_OpenWindowTL (gui_App_t *app, Rect_t *rect, char *window_name, int(*event_handler)(gui_App_t *, Window_t *, u32, int, u32), u32 flags, tag *taglist)
client_Window_tclient_FindWindow (List_t *winlist, Window_t *win)
char * client_LoadFile (char *name, int *len)
u32 client_GetClientId (void)
void client_ClientCleanup (gui_App_t *app)
int client_ClientInit (gui_App_t *app, int *byteorder)
void client_SendCloseApp (u32 conn, gui_App_t *app)
int client_IsCompressableType (char *filename, u8 *file, int len)
u8client_LoadAFile (char *filename, u32 *type, int *size, int *orig_len)
int client_LoadFiles (u32 conn, u8 **bd, u32 msgid)
int client_CliProcessMessage (u32 conn, u32 userdata, struct glw_SockMsg *messg)
int client_TaglistMsgLen (tag *taglist)
u32 client_CallSGadget (gui_App_t *app, Window_t *window, u32 gadget_id, u32 method, u32 firsttag,...)
u32 client_CallSGadgetTL (gui_App_t *app, Window_t *window, u32 gadget_id, u32 method, tag *taglist)
u32 client_CallAGadget (gui_App_t *app, Window_t *window, u32 gadget_id, u32 method, u32 firsttag,...)
u32 client_CallAGadgetTL (gui_App_t *app, Window_t *window, u32 gadget_id, u32 method, tag *taglist)
void client_CloseWindow (gui_App_t *app, Window_t *win)
Window_tclient_OpenWindow (gui_App_t *app, Rect_t *rect, char *window_name, int(*event_handler)(gui_App_t *, Window_t *, u32, int, u32), u32 flags, u32 firsttag,...)
Window_tclient_OpenWindowTL (gui_App_t *app, Rect_t *rect, char *window_name, int(*event_handler)(gui_App_t *, Window_t *, u32, int, u32), u32 flags, tag *taglist)
void client_TimerClearList (gui_App_t *app, Window_t *win)
void client_WinSleep (gui_App_t *app, Window_t *win)
void client_WinAwake (gui_App_t *app, Window_t *win)
int client_Init (u32 conn, int *byteorder)
u32 client_TimerStart (gui_App_t *app, Window_t *win, u32 millisec, int flags, u32 userdata, int(*callback)(Window_t *, u32))
void client_TimerHandler (u32 timer, u32 userdata)
int client_ChangeServer (gui_App_t *app, char *new_server)
int client_ChangeSkin (gui_App_t *app, Window_t *win, char *skinname)


Typedef Documentation

typedef struct client_File_s client_File_t
 

typedef struct client_Timer_s client_Timer_t
 

typedef struct client_Window_s client_Window_t
 


Function Documentation

u32 client_CallAGadget gui_App_t   app,
Window_t   window,
u32    gadget_id,
u32    method,
u32    firsttag,
...   
 

Definition at line 515 of file Client.c.

References client_CliARq_CallGadgetTL, and u32.

u32 client_CallAGadgetTL gui_App_t   app,
Window_t   window,
u32    gadget_id,
u32    method,
tag   taglist
 

Definition at line 519 of file Client.c.

References client_CliARq_CallGadgetTL, and u32.

u32 client_CallSGadget gui_App_t   app,
Window_t   window,
u32    gadget_id,
u32    method,
u32    firsttag,
...   
 

Definition at line 507 of file Client.c.

References client_CliSRq_CallGadgetTL, and u32.

u32 client_CallSGadgetTL gui_App_t   app,
Window_t   window,
u32    gadget_id,
u32    method,
tag   taglist
 

Definition at line 511 of file Client.c.

References client_CliSRq_CallGadgetTL, and u32.

int client_ChangeServer gui_App_t   app,
char *    new_server
 

Definition at line 850 of file Client.c.

References debug_Begin, debug_End, and net_GetPort.

int client_ChangeSkin gui_App_t   app,
Window_t   win,
char *    skinname
 

Definition at line 869 of file Client.c.

References client_GetClientId, gui_App_t::conn, debug_Begin, debug_End, glw_SendMsg, mem_free, mem_malloc, net_MarshalPutLong, net_MarshalPutString, net_StrMsgLen, NULL, REQ_CNEWSKIN, u32, and u8.

u32 client_CliARq_CallGadgetTL gui_App_t   app,
Window_t   window,
u32    gadget_id,
u32    method,
tag   taglist
[static]
 

Definition at line 559 of file Client.c.

References client_GetClientId, client_TaglistMsgLen, gui_App_t::conn, debug_Begin, debug_End, glw_SendMsg, mem_free, mem_malloc, net_MarshalPutLong, net_MarshalPutTaglist, NULL, REQ_CCALLGAD, u32, and u8.

Referenced by client_CallAGadget, client_CallAGadgetTL, and client_CliSRq_CallGadgetTL.

void client_CliARq_CloseWindow gui_App_t   app,
Window_t   win
[static]
 

Definition at line 613 of file Client.c.

References CBK_WINDOW_CLOSED, client_FindWindow, client_GetClientId, client_TimerClearList, gui_App_t::conn, debug_Begin, debug_End, client_Window_s::event_handler, glw_SendMsg, list_DeleteNode, list_RemoveNode, list_SetNodeData, mem_free, client_Window_s::name, net_MarshalPutLong, client_Window_s::node, NULL, REQ_CCLOSEWIN, u32, u8, client_Window_s::userdata, and gui_App_t::windowlist.

Referenced by client_CloseWindow.

void client_ClientCleanup gui_App_t   app [static]
 

Definition at line 146 of file Client.c.

References gui_App_t::conn, debug_Begin, debug_End, net_ClearMsgList, and NULL.

Referenced by client_ClientInit, and client_Init.

int client_ClientInit gui_App_t   app,
int *    byteorder
[static]
 

Definition at line 160 of file Client.c.

References client_ClientCleanup, debug_Begin, debug_End, debug_Error, debug_Message, glw_Recv, glw_Send, list_CreateList, mem_free, mem_malloc, NULL, u8, and glw_ConnUser::waitlist.

Referenced by client_Init.

int client_CliProcessMessage u32    conn,
u32    userdata,
struct glw_SockMsg   messg
 

Definition at line 313 of file Client.c.

References glw_ConnUser::app, glw_SockMsg::body, CLIENT_DISCARD_EVENT, client_FindWindow, client_LoadAFile, client_LoadFiles, debug_Begin, debug_End, debug_Error, client_Window_s::event_handler, FL_REPLY, FT_NORMAL, glw_SendMsg, glw_SockMsg::id, mem_free, mem_malloc, net_GetUserData, net_GetWaitfor, net_MarshalGetLong, net_MarshalGetString, net_MarshalPutBinary, net_MarshalPutLong, net_MsgFromWaitList, net_MsgToWaitList, NULL, REQ_CCALLGAD, REQ_CECHO, REQ_COPENWIN, REQ_NONE, REQ_SAPP, REQ_SECHO, REQ_SLOADFILE, REQ_SLOADFILES, REQ_SWINEVENT, glw_SockMsg::type, u32, u8, glw_ConnUser::userdata, glw_ConnUser::waitfor, and gui_App_t::windowlist.

u32 client_CliSRq_CallGadgetTL gui_App_t   app,
Window_t   window,
u32    gadget_id,
u32    method,
tag   taglist
[static]
 

Definition at line 540 of file Client.c.

References client_CliARq_CallGadgetTL, gui_App_t::conn, debug_Begin, debug_End, FL_REPLY, glw_MainLoopCli, net_GetUserData, net_SetState, REQ_CCALLGAD, and u32.

Referenced by client_CallSGadget, and client_CallSGadgetTL.

Window_t * client_CliSRq_OpenWindowTL gui_App_t   app,
Rect_t   rect,
char *    window_name,
int(*    event_handler)(gui_App_t *, Window_t *, u32, int, u32),
u32    flags,
tag   taglist
[static]
 

Definition at line 674 of file Client.c.

References glw_ConnUser::app, client_Window_s::app, client_GetClientId, client_TaglistMsgLen, common_strdup, tag::Data, debug_Begin, debug_End, client_Window_s::event_handler, FL_REPLY, gadget_Check_t::gadget_id, GADGET_ILLEGAL_ID, glw_MainLoopCli, glw_SendMsg, list_CreateList, list_CreateNode, list_DeleteNode, list_InsertNodeTail, list_SetNodeData, mem_calloc, mem_free, mem_malloc, client_Window_s::name, net_GetUserData, net_MarshalPutLong, net_MarshalPutString, net_MarshalPutTaglist, net_StrMsgLen, client_Window_s::node, NULL, REQ_COPENWIN, tag_FindTag, tag_GetTagData, TAG_WIN_CHECKLIST, TAG_WIN_USERDATA, client_Window_s::timerlist, u32, u8, glw_ConnUser::userdata, client_Window_s::userdata, glw_ConnUser::waitfor, and client_Window_s::window.

Referenced by client_OpenWindow, and client_OpenWindowTL.

void client_CloseWindow gui_App_t   app,
Window_t   win
 

Definition at line 523 of file Client.c.

References client_CliARq_CloseWindow.

client_Window_t* client_FindWindow List_t   winlist,
Window_t   win
[static]
 

Definition at line 76 of file Client.c.

References debug_Begin, debug_End, list_GetNodeData, list_GetNodeHead, list_GetNodeNext, NULL, and client_Window_s::window.

Referenced by client_CliARq_CloseWindow, client_CliProcessMessage, client_TimerClearList, and client_TimerStart.

u32 client_GetClientId void    [static]
 

Definition at line 139 of file Client.c.

References u32.

Referenced by client_ChangeSkin, client_CliARq_CallGadgetTL, client_CliARq_CloseWindow, client_CliSRq_OpenWindowTL, client_SendCloseApp, client_WinAwake, and client_WinSleep.

int client_Init u32    conn,
int *    byteorder
 

Definition at line 764 of file Client.c.

References app_CleanUp, app_Init, app_name, client_ClientCleanup, client_ClientInit, gui_App_t::conn, debug_Begin, debug_End, glw_MainLoopCli, list_CreateList, list_DeleteList, gui_App_t::locale, mem_free, mem_malloc, gui_App_t::name, net_SetState, NULL, gui_App_t::prefs, REQ_SAPP, u32, and gui_App_t::windowlist.

int client_IsCompressableType char *    filename,
u8   file,
int    len
[static]
 

Definition at line 210 of file Client.c.

References debug_Begin, debug_End, NULL, and u8.

Referenced by client_LoadAFile.

u8* client_LoadAFile char *    filename,
u32   type,
int *    size,
int *    orig_len
[static]
 

Definition at line 228 of file Client.c.

References client_IsCompressableType, client_LoadFile, debug_Begin, debug_End, FT_DEFLATED, FT_NORMAL, mem_free, mem_malloc, NULL, u32, and u8.

Referenced by client_CliProcessMessage, and client_LoadFiles.

char* client_LoadFile char *    name,
int *    len
[static]
 

Definition at line 96 of file Client.c.

References debug_Begin, debug_End, debug_Message, debug_Warning, mem_free, mem_malloc, and NULL.

Referenced by client_LoadAFile.

int client_LoadFiles u32    conn,
u8 **    bd,
u32    msgid
[static]
 

Definition at line 263 of file Client.c.

References client_LoadAFile, client_File_s::data, debug_Begin, debug_End, FL_REPLY, glw_SendMsg, mem_free, mem_malloc, net_MarshalGetLong, net_MarshalGetString, net_MarshalPutBinary, net_MarshalPutLong, NULL, REQ_SLOADFILES, client_File_s::size, u32, and u8.

Referenced by client_CliProcessMessage.

Window_t* client_OpenWindow gui_App_t   app,
Rect_t   rect,
char *    window_name,
int(*    event_handler)(gui_App_t *, Window_t *, u32, int, u32),
u32    flags,
u32    firsttag,
...   
 

Definition at line 527 of file Client.c.

References client_CliSRq_OpenWindowTL, and u32.

Window_t* client_OpenWindowTL gui_App_t   app,
Rect_t   rect,
char *    window_name,
int(*    event_handler)(gui_App_t *, Window_t *, u32, int, u32),
u32    flags,
tag   taglist
 

Definition at line 531 of file Client.c.

References client_CliSRq_OpenWindowTL, and u32.

void client_SendCloseApp u32    conn,
gui_App_t   app
 

Definition at line 196 of file Client.c.

References client_GetClientId, debug_Begin, debug_End, glw_CloseApp, glw_htonl, glw_SendMsg, REQ_CCLOSEAPP, u32, and u8.

int client_TaglistMsgLen tag   taglist [static]
 

Definition at line 488 of file Client.c.

References tag::Data, debug_Begin, debug_End, tag::Name, net_StrMsgLen, TAG_DONE, tag_GetNextTag, and TAGT_STRING.

Referenced by client_CliARq_CallGadgetTL, and client_CliSRq_OpenWindowTL.

void client_TimerClearList gui_App_t   app,
Window_t   win
[static]
 

Definition at line 585 of file Client.c.

References client_FindWindow, debug_Begin, debug_End, glw_TimerCancel, list_DeleteList, list_DeleteNode, list_GetNodeData, list_RemoveNodeHead, mem_free, NULL, client_Timer_s::timer, client_Window_s::timerlist, u32, and gui_App_t::windowlist.

Referenced by client_CliARq_CloseWindow.

void client_TimerHandler u32    timer,
u32    userdata
 

Definition at line 835 of file Client.c.

References client_Window_s::app, debug_Begin, debug_End, client_Window_s::event_handler, client_Timer_s::flags, client_Timer_s::nwin, u32, client_Timer_s::userdata, and client_Window_s::window.

u32 client_TimerStart gui_App_t   app,
Window_t   win,
u32    millisec,
int    flags,
u32    userdata,
int(*    callback)(Window_t *, u32)
 

Definition at line 805 of file Client.c.

References client_FindWindow, debug_Begin, debug_End, client_Timer_s::flags, glw_TimerStart, list_CreateNode, list_InsertNodeHead, list_SetNodeData, mem_malloc, NULL, client_Timer_s::nwin, client_Timer_s::timer, client_Window_s::timerlist, u32, client_Timer_s::userdata, and gui_App_t::windowlist.

void client_WinAwake gui_App_t   app,
Window_t   win
 

Definition at line 655 of file Client.c.

References client_GetClientId, gui_App_t::conn, debug_Begin, debug_End, glw_SendMsg, net_MarshalPutLong, NULL, REQ_CWINAWAKE, u32, and u8.

void client_WinSleep gui_App_t   app,
Window_t   win
 

Definition at line 637 of file Client.c.

References client_GetClientId, gui_App_t::conn, debug_Begin, debug_End, glw_SendMsg, net_MarshalPutLong, NULL, REQ_CWINSLEEP, u32, and u8.


Generated on Tue Jan 7 12:11:40 2003 for THEGUI by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002