ProcessViewBrowser-ServerProgramming
Functions
Misc

Functions

int pvSendUserEvent (PARAM *p, int id, const char *text)
int pvWriteFile (PARAM *p, const char *filename, int width, int height)
int pvCloseFile (PARAM *p)
char * pvGetTextParam (PARAM *p, const char *command)
int pvGetText (const char *command, char *text)
PARSE_EVENT_STRUCTpvParseEventStruct (PARAM *p, const char *event)
int pvParseEvent (const char *event, int *id, char *text)
int pvCopyToClipboard (PARAM *p, int id)
int pvPrint (PARAM *p, int id)
int pvSave (PARAM *p, int id)
int pvSave (PARAM *p, int id, const char *filename)
int pvSaveAsBmp (PARAM *p, int id, const char *filename)
int pvHtmlOrSvgDump (PARAM *p, int id, const char *filename)
int pvRenderTreeDump (PARAM *p, int id, const char *filename)
int pvSendFile (PARAM *p, const char *filename)
int pvDownloadFileAs (PARAM *p, const char *filename, const char *newname)
int pvDownloadFile (PARAM *p, const char *filename)
int pvSetMaxClientsPerIpAdr (int max_clients)
int pvMaxClientsPerIpAdr ()
int pvSetMaxClients (int max_clients)
int pvMaxClients ()
const pvAddressTableItempvGetAdrTableItem ()
int pvClearMessageQueue (PARAM *p)
int pvtcpsend (PARAM *p, const char *buf, int len)
int pvtcpsend_binary (PARAM *p, const char *buf, int len)
int pvtcpreceive (PARAM *p, char *buf, int maxlen)
int pvtcpreceive_binary (PARAM *p, char *buf, int maxlen)

Detailed Description

These are the misc routines


Function Documentation

int pvClearMessageQueue ( PARAM p)
read all pending messages from tcp
int pvCloseFile ( PARAM p)
close the open file
int pvCopyToClipboard ( PARAM p,
int  id 
)
Copy the widget to the clipboard.
Allowed widgets: all widgets
int pvDownloadFile ( PARAM p,
const char *  filename 
)
download file to temp directory of the browser
int pvDownloadFileAs ( PARAM p,
const char *  filename,
const char *  newname 
)
download file to temp directory of the browser
The file in the temp directory is called newname
const pvAddressTableItem* pvGetAdrTableItem ( )
Get the table of connected clients.
It is an array of MAX_CLIENT elements.
int pvGetText ( const char *  command,
char *  text 
)
The function will get the "" surrounded text out of command.
This is useful to retrieve the text from an event.
char* pvGetTextParam ( PARAM p,
const char *  command 
)
The function will get the "" surrounded text out of command.
This is useful to retrieve the text from an event.
Used in Script languages
int pvHtmlOrSvgDump ( PARAM p,
int  id,
const char *  filename 
)
Dump the HTML or SVG code on the client.
Allowed widgets: QTextBrowser/WebKit widget for HTML and QDraw/SVG widget for SVG
int pvMaxClients ( )
Set the total limit of clients the pvserver accepts 
0 < max_clients <= MAX_CLIENTS
int pvMaxClientsPerIpAdr ( )
Get the limit of clients the pvserver accepts from 1 ip address 
int pvParseEvent ( const char *  event,
int *  id,
char *  text 
)
This fuction will parse the event. It returns the event. If there is a text in the event
it will be returned. Otherwise *text will be '\0'.
PARSE_EVENT_STRUCT* pvParseEventStruct ( PARAM p,
const char *  event 
)
This fuction will parse the event. It is a stub for script languages.
int pvPrint ( PARAM p,
int  id 
)
Print the contents of the widget on a printer. The user will see the print dialog.
Allowed widgets: all widgets
int pvRenderTreeDump ( PARAM p,
int  id,
const char *  filename 
)
Dump the SVG rendering data to a SVG file on the client.
Allowed widgets: QDraw/SVG widget
int pvSave ( PARAM p,
int  id 
)
Save the widget to file on local node. The user will see a SaveAs dialog.
Allowed widgets: QTable
int pvSave ( PARAM p,
int  id,
const char *  filename 
)
Save the widget to a file on the client computer. (vector form)
Allowed widgets: QDraw
int pvSaveAsBmp ( PARAM p,
int  id,
const char *  filename 
)
Save the widget to a file on the client computer. (bitmap file)
Allowed widgets: all widgets
int pvSendFile ( PARAM p,
const char *  filename 
)
send file to browser
int pvSendUserEvent ( PARAM p,
int  id,
const char *  text 
)
Send a USER_EVENT to ourself
int pvSetMaxClients ( int  max_clients)
Set the total limit of clients the pvserver accepts 
0 < max_clients <= MAX_CLIENTS
int pvSetMaxClientsPerIpAdr ( int  max_clients)
Set the limit of clients the pvserver accepts from 1 ip address 
int pvtcpreceive ( PARAM p,
char *  buf,
int  maxlen 
)
int pvtcpreceive_binary ( PARAM p,
char *  buf,
int  maxlen 
)
int pvtcpsend ( PARAM p,
const char *  buf,
int  len 
)
int pvtcpsend_binary ( PARAM p,
const char *  buf,
int  len 
)
int pvWriteFile ( PARAM p,
const char *  filename,
int  width,
int  height 
)
write the following to file
during the file is open nothing will be send to tcp
return=0 failure
return=1 success
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines