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 pvtcpsendstring (PARAM *p, const char *buf)
 
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

◆ pvClearMessageQueue()

int pvClearMessageQueue ( PARAM p)
read all pending messages from tcp

◆ pvCloseFile()

int pvCloseFile ( PARAM p)
close the open file

◆ pvCopyToClipboard()

int pvCopyToClipboard ( PARAM p,
int  id 
)
Copy the widget to the clipboard.
Allowed widgets: all widgets

◆ pvDownloadFile()

int pvDownloadFile ( PARAM p,
const char *  filename 
)
download file to temp directory of the browser

◆ pvDownloadFileAs()

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

◆ pvGetAdrTableItem()

const pvAddressTableItem* pvGetAdrTableItem ( )
Get the table of connected clients.
It is an array of MAX_CLIENT elements.

◆ pvGetText()

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.

◆ pvGetTextParam()

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

◆ pvHtmlOrSvgDump()

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

◆ pvMaxClients()

int pvMaxClients ( )
Set the total limit of clients the pvserver accepts 
0 < max_clients <= MAX_CLIENTS

◆ pvMaxClientsPerIpAdr()

int pvMaxClientsPerIpAdr ( )
Get the limit of clients the pvserver accepts from 1 ip address 

◆ pvParseEvent()

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'.

◆ pvParseEventStruct()

PARSE_EVENT_STRUCT* pvParseEventStruct ( PARAM p,
const char *  event 
)
This fuction will parse the event. It is a stub for script languages.

◆ pvPrint()

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

◆ pvRenderTreeDump()

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

◆ pvSave() [1/2]

int pvSave ( PARAM p,
int  id 
)
Save the widget to file on local node. The user will see a SaveAs dialog.
Allowed widgets: QTable

◆ pvSave() [2/2]

int pvSave ( PARAM p,
int  id,
const char *  filename 
)
Save the widget to a file on the client computer. (vector form)
Allowed widgets: QDraw

◆ pvSaveAsBmp()

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

◆ pvSendFile()

int pvSendFile ( PARAM p,
const char *  filename 
)
send file to browser

◆ pvSendUserEvent()

int pvSendUserEvent ( PARAM p,
int  id,
const char *  text 
)
Send a USER_EVENT to ourself

◆ pvSetMaxClients()

int pvSetMaxClients ( int  max_clients)
Set the total limit of clients the pvserver accepts 
0 < max_clients <= MAX_CLIENTS

◆ pvSetMaxClientsPerIpAdr()

int pvSetMaxClientsPerIpAdr ( int  max_clients)
Set the limit of clients the pvserver accepts from 1 ip address 

◆ pvtcpreceive()

int pvtcpreceive ( PARAM p,
char *  buf,
int  maxlen 
)

◆ pvtcpreceive_binary()

int pvtcpreceive_binary ( PARAM p,
char *  buf,
int  maxlen 
)

◆ pvtcpsend()

int pvtcpsend ( PARAM p,
const char *  buf,
int  len 
)

◆ pvtcpsend_binary()

int pvtcpsend_binary ( PARAM p,
const char *  buf,
int  len 
)

◆ pvtcpsendstring()

int pvtcpsendstring ( PARAM p,
const char *  buf 
)

◆ pvWriteFile()

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