liberipc/include/eripcarinc.h File Reference

#include "eripcclient.h"

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  eCcArinc {
  ccArincJumpToPage = 0, ccArincBookmarkPage, ccArincInvokeFindDialog, ccArincZoomIn,
  ccArincZoomOut, ccArincStore, ccArincSignal, ccArincUndefined
}

Functions

int arincParseCommand (char *szCommand, erIpcCmd_t *pCmd)
int arincSignal (erClientChannel_t channel, int uaID, int signal)
int arincJumpToPage (erClientChannel_t channel, int uaID, int page)
int arincBookmarkPage (erClientChannel_t channel, int uaID)
int arincInvokeFindDialog (erClientChannel_t channel, int uaID)
int arincZoomIn (erClientChannel_t channel, int uaID)
int arincZoomOut (erClientChannel_t channel, int uaID)
int arincStore (erClientChannel_t channel, int uaID, int category, char *itemID)


Enumeration Type Documentation

enum eCcArinc

Enumerator:
ccArincJumpToPage 
ccArincBookmarkPage 
ccArincInvokeFindDialog 
ccArincZoomIn 
ccArincZoomOut 
ccArincStore 
ccArincSignal 
ccArincUndefined 

Definition at line 41 of file eripcarinc.h.


Function Documentation

int arincBookmarkPage ( erClientChannel_t  channel,
int  uaID 
)

Bookmark the currently displayed page in the viewer 'uaID'

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
Returns:
A value of 0 signals success

Definition at line 65 of file eripcarinc.c.

00066 {
00067     erIpcCmd_t cmd;
00068 
00069     strcpy(cmd.name, "arincBookmarkPage");
00070     cmd.cc = (int) ccArincBookmarkPage;
00071     cmd.nArg = 1;
00072     sprintf(cmd.arg[0], "%d", uaID);
00073 
00074     return erIpcSndCommand(channel, &cmd);
00075 }

Here is the call graph for this function:

int arincInvokeFindDialog ( erClientChannel_t  channel,
int  uaID 
)

Invoke the find dialog on viewer 'uaID'

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
Returns:
A value of 0 signals success

Definition at line 77 of file eripcarinc.c.

00078 {
00079     erIpcCmd_t cmd;
00080 
00081     strcpy(cmd.name, "arincInvokeFindDialog");
00082     cmd.cc = (int) ccArincInvokeFindDialog;
00083     cmd.nArg = 1;
00084     sprintf(cmd.arg[0], "%d", uaID);
00085 
00086     return erIpcSndCommand(channel, &cmd);
00087 }

Here is the call graph for this function:

int arincJumpToPage ( erClientChannel_t  channel,
int  uaID,
int  page 
)

Jump to page 'page' of the current document displayed in the viewer 'uaID'

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
page page number
Returns:
A value of 0 signals success

Definition at line 52 of file eripcarinc.c.

00053 {
00054     erIpcCmd_t cmd;
00055 
00056     strcpy(cmd.name, "arincJumpToPage");
00057     cmd.cc = (int) ccArincJumpToPage;
00058     cmd.nArg = 2;
00059     sprintf(cmd.arg[0], "%d", uaID);
00060     sprintf(cmd.arg[1], "%d", page);
00061 
00062     return erIpcSndCommand(channel, &cmd);
00063 }

Here is the call graph for this function:

int arincParseCommand ( char *  szCommand,
erIpcCmd_t pCmd 
)

Definition at line 116 of file eripcarinc.c.

00117 {
00118     int     i;
00119     char   *pChar;
00120     int     cmdcode;
00121     char    szToken[TB_MAXCHARONLINE];
00122     int     nReqArgs = 0;
00123 
00124     pCmd->cc = (int) ccArincUndefined;
00125     for (i = 0; i < TB_N_ARG; i++)
00126     {
00127         strcpy(pCmd->arg[i], "");
00128     }
00129 
00130     // Parse Command
00131     pChar = szCommand;
00132     i = 0;
00133     while (*pChar != '\0')
00134     {
00135         szToken[i] = '\0';
00136         if (*pChar == ',')
00137         {
00138             pChar++;
00139             break;
00140         }
00141         szToken[i] = *pChar++;
00142         i++;
00143         szToken[i] = '\0';
00144     }
00145 
00146     // We have found the command Token. Figure out what the command is.
00147     // TODO: stop doing this hardcoded, rely on a smart datastructure instead.
00148 
00149     if (isdigit(szToken[0]))
00150     {
00151         cmdcode = atoi(szToken);
00152     }
00153     else
00154     {
00155         cmdcode = -1;
00156     }
00157     if (strcmp(szToken, "arincJumpToPage") == 0  ||  cmdcode == ccArincJumpToPage)
00158     {
00159         strcpy(pCmd->name, szToken);
00160         pCmd->cc = (int) ccArincJumpToPage;
00161         nReqArgs = 2;
00162         pCmd->nArg = 2;
00163     }
00164     else if (strcmp(szToken, "arincBookmarkPage") == 0  ||  cmdcode == ccArincBookmarkPage)
00165     {
00166         strcpy(pCmd->name, szToken);
00167         pCmd->cc = (int) ccArincBookmarkPage;
00168         nReqArgs = 1;
00169         pCmd->nArg = 1;
00170     }
00171     else if (strcmp(szToken, "arincInvokeFindDialog") == 0  ||  cmdcode == ccArincInvokeFindDialog)
00172     {
00173         strcpy(pCmd->name, szToken);
00174         pCmd->cc = (int) ccArincInvokeFindDialog;
00175         nReqArgs = 1;
00176         pCmd->nArg = 1;
00177     }
00178     else if (strcmp(szToken, "arincZoomIn") == 0  ||  cmdcode == ccArincZoomIn)
00179     {
00180         strcpy(pCmd->name, szToken);
00181         pCmd->cc = (int) ccArincZoomIn;
00182         nReqArgs = 1;
00183         pCmd->nArg = 1;
00184     }
00185     else if (strcmp(szToken, "arincZoomOut") == 0  ||  cmdcode == ccArincZoomOut)
00186     {
00187         strcpy(pCmd->name, szToken);
00188         pCmd->cc = (int) ccArincZoomOut;
00189         nReqArgs = 1;
00190         pCmd->nArg = 1;
00191     }
00192     else if (strcmp(szToken, "arincStore") == 0  ||  cmdcode == ccArincStore)
00193     {
00194         strcpy(pCmd->name, szToken);
00195         pCmd->cc = (int) ccArincStore;
00196         nReqArgs = 3;
00197         pCmd->nArg = 3;
00198     }
00199     else if (strcmp(szToken, "arincSignal") == 0  ||  cmdcode == ccArincSignal)
00200     {
00201         strcpy(pCmd->name, szToken);
00202         pCmd->cc = (int) ccArincSignal;
00203         nReqArgs = 2;
00204         pCmd->nArg = 2;
00205     }
00206     else
00207     {
00208         strcpy(pCmd->name, "Undefined");
00209         pCmd->cc = (int) ccArincUndefined;
00210         fprintf(stderr, "%s: Command %s \n", __FUNCTION__, szToken);
00211         fprintf(stderr, "Error parsing (%s). Command undefined\n", szCommand);
00212         pCmd->nArg = -1;
00213         return -1;
00214     }
00215 
00216     if (nReqArgs > 0)
00217     {
00218         erIpcGetArgs(pChar, pCmd, nReqArgs);
00219     }
00220     return 0;
00221 }

Here is the call graph for this function:

int arincSignal ( erClientChannel_t  channel,
int  uaID,
int  signal 
)

Sends a signal to a viewer

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
signal signal
Returns:
A value of 0 signals success
Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.

Definition at line 40 of file eripcarinc.c.

00040                                                                  {
00041     erIpcCmd_t cmd;
00042 
00043     strcpy(cmd.name, "arincSignal");
00044     cmd.cc = (int) ccArincSignal;
00045     cmd.nArg = 2;
00046     sprintf(cmd.arg[0], "%d", uaID);
00047     sprintf(cmd.arg[1], "%d", signal);
00048 
00049     return erIpcSndCommand(channel, &cmd);
00050 }

Here is the call graph for this function:

int arincStore ( erClientChannel_t  channel,
int  uaID,
int  category,
char *  itemID 
)

Store the currently displayed page of viewer 'uaID'

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
category identifier
itemID - null terminated string - unique item ID of the currently displayed content
Returns:
A value of 0 signals success

Definition at line 224 of file eripcarinc.c.

00225 {
00226     erIpcCmd_t cmd;
00227 
00228     strcpy(cmd.name, "arincStore");
00229     cmd.cc = (int) ccArincStore;
00230     cmd.nArg = 3;
00231     sprintf(cmd.arg[0], "%d", uaID);
00232     sprintf(cmd.arg[1], "%d", category);
00233         
00234         if ((itemID) && (strlen(itemID) < TB_ARGLENGTH))
00235         {
00236                 strncpy(cmd.arg[2], itemID, TB_ARGLENGTH);
00237         }
00238         else
00239         {
00240             sprintf(cmd.arg[2],"%s", "");
00241             fprintf(stderr, "Command %s \n", cmd.name);
00242                 fprintf(stderr, "invalid itemID (%s)\n", itemID);
00243         }
00244 
00245     return erIpcSndCommand(channel, &cmd);      
00246 }

Here is the call graph for this function:

int arincZoomIn ( erClientChannel_t  channel,
int  uaID 
)

Zoom in on the currently displayed page of viewer 'uaID'

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
Returns:
A value of 0 signals success

Definition at line 89 of file eripcarinc.c.

00090 {
00091     erIpcCmd_t cmd;
00092 
00093     strcpy(cmd.name, "arincZoomIn");
00094     cmd.cc = (int) ccArincZoomIn;
00095     cmd.nArg = 1;
00096     sprintf(cmd.arg[0], "%d", uaID);
00097 
00098     return erIpcSndCommand(channel, &cmd);
00099 }

Here is the call graph for this function:

int arincZoomOut ( erClientChannel_t  channel,
int  uaID 
)

Zoom out on the currently displayed page of viewer 'uaID'

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
Returns:
A value of 0 signals success

Definition at line 101 of file eripcarinc.c.

00102 {
00103     erIpcCmd_t cmd;
00104 
00105     strcpy(cmd.name, "arincZoomOut");
00106     cmd.cc = (int) ccArincZoomOut;
00107     cmd.nArg = 1;
00108     sprintf(cmd.arg[0], "%d", uaID);
00109 
00110     return erIpcSndCommand(channel, &cmd);
00111 }

Here is the call graph for this function:


Generated on Sun Dec 14 17:11:31 2008 by  doxygen 1.5.6