liberipc/include/eripctoolbar.h File Reference

liberipc - specifics to IPC with toolbar More...

#include "eripcclient.h"

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

Go to the source code of this file.

Defines

#define ICON_ID_NOTUSED   (-1)

Enumerations

enum  eCcTb {
  ccTbAppendPlatformIcon = 0, ccTbRemovePlatformIcon, ccTbSetStatePlatformIcon, ccTbDisableUpdate,
  ccTbEnableUpdate, ccTbSelectIconSet, ccTbClearIconSet, ccTbSynchronise,
  ccUndefined
}
enum  e_iconID_t {
  iconID_battery = 0, iconID_bookmark, iconID_collapse, iconID_connectivity,
  iconID_copy, iconID_cut, iconID_empty, iconID_erase,
  iconID_error, iconID_expand, iconID_filemanager, iconID_fontlarger,
  iconID_fontsmaller, iconID_keyboard, iconID_orientation, iconID_paste,
  iconID_pen, iconID_pen1pixel, iconID_pen3pixel, iconID_pen5pixel,
  iconID_pen7pixel, iconID_penheavier, iconID_penlighter, iconID_penpressure,
  iconID_selecttext, iconID_share, iconID_summarize, iconID_trashcan,
  iconID_zoomin, iconID_zoomout, iconID_eraseline, iconID_npage,
  iconID_penblack, iconID_pendarkgrey, iconID_penlightgrey, iconID_penwhite,
  iconID_pan, iconID_index, iconID_pen1pixelLow, iconID_pen3pixelLow,
  iconID_pen5pixelLow, iconID_pen7pixelLow, iconID_penblackLow, iconID_pendarkgreyLow,
  iconID_penlightgreyLow, iconID_penwhiteLow, iconID_locked, iconID_tagging,
  iconID_search, iconID_zoomfit, iconID_landscape_portrait, iconID_portrait_landscape,
  iconID_zoomwidth, iconID_zoomback, iconID_find, iconID_lock_screen,
  iconID_not_used01, iconID_not_user02, iconID_continuous_mode, iconID_page_mode,
  iconID_sort, iconID_connect, iconID_start_reading, iconID_back,
  iconID_lookup, iconID_dictionary_search, iconID_forward
}
enum  e_iconState_t { iconState_normal = 0, iconState_grey, iconState_selected, iconState_undefined }
enum  e_iconState_connect_t { iconState_IDconnect_time = iconState_undefined, iconState_IDconnect_newcontent, iconState_IDconnect_newcontent_selected }

Functions

int tbGetIconNumber (void)
const char * tbGetIconName (int iconID)
int tbParseCommand (char *szCommand, erIpcCmd_t *pCmd)
int tbReportIconClicked (erClientChannel_t channel, int signal, int iconID, int iconState)
int tbReportSynchronised (erClientChannel_t channel, int signal)
int tbAppendPlatformIcon (erClientChannel_t channel, int uaID, int iconID, int signal)
int tbRemovePlatformIcon (erClientChannel_t channel, int uaID, int iconID)
int tbSetStatePlatformIcon (erClientChannel_t channel, int uaID, int iconID, int iconState)
int tbDisableUpdate (erClientChannel_t channel, int uaID)
int tbEnableUpdate (erClientChannel_t channel, int uaID)
int tbSelectIconSet (erClientChannel_t channel, int uaID)
int tbClearIconSet (erClientChannel_t channel, int uaID)
int tbSynchronise (erClientChannel_t channel, int uaID, int signal)


Detailed Description

liberipc - specifics to IPC with toolbar

<File description>="">

Definition in file eripctoolbar.h.


Define Documentation

#define ICON_ID_NOTUSED   (-1)

Definition at line 56 of file eripctoolbar.h.


Enumeration Type Documentation

enum e_iconID_t

Enumerator:
iconID_battery 
iconID_bookmark 
iconID_collapse 
iconID_connectivity 
iconID_copy 
iconID_cut 
iconID_empty 
iconID_erase 
iconID_error 
iconID_expand 
iconID_filemanager 
iconID_fontlarger 
iconID_fontsmaller 
iconID_keyboard 
iconID_orientation 
iconID_paste 
iconID_pen 
iconID_pen1pixel 
iconID_pen3pixel 
iconID_pen5pixel 
iconID_pen7pixel 
iconID_penheavier 
iconID_penlighter 
iconID_penpressure 
iconID_selecttext 
iconID_share 
iconID_summarize 
iconID_trashcan 
iconID_zoomin 
iconID_zoomout 
iconID_eraseline 
iconID_npage 
iconID_penblack 
iconID_pendarkgrey 
iconID_penlightgrey 
iconID_penwhite 
iconID_pan 
iconID_index 
iconID_pen1pixelLow 
iconID_pen3pixelLow 
iconID_pen5pixelLow 
iconID_pen7pixelLow 
iconID_penblackLow 
iconID_pendarkgreyLow 
iconID_penlightgreyLow 
iconID_penwhiteLow 
iconID_locked 
iconID_tagging 
iconID_search 
iconID_zoomfit 
iconID_landscape_portrait 
iconID_portrait_landscape 
iconID_zoomwidth 
iconID_zoomback 
iconID_find 
iconID_lock_screen 
iconID_not_used01 
iconID_not_user02 
iconID_continuous_mode 
iconID_page_mode 
iconID_sort 
iconID_connect 
iconID_start_reading 
iconID_back 
iconID_lookup 
iconID_dictionary_search 
iconID_forward 

Definition at line 57 of file eripctoolbar.h.

00058 {
00059     iconID_battery = 0,
00060     iconID_bookmark,
00061     iconID_collapse,
00062     iconID_connectivity,
00063     iconID_copy,
00064     iconID_cut,
00065     iconID_empty,
00066     iconID_erase,
00067     iconID_error,
00068     iconID_expand,
00069     iconID_filemanager,
00070     iconID_fontlarger,
00071     iconID_fontsmaller,
00072     iconID_keyboard,
00073     iconID_orientation,
00074     iconID_paste,
00075     iconID_pen,
00076     iconID_pen1pixel,
00077     iconID_pen3pixel,
00078     iconID_pen5pixel,
00079     iconID_pen7pixel,
00080     iconID_penheavier,
00081     iconID_penlighter,
00082     iconID_penpressure,
00083     iconID_selecttext,
00084     iconID_share,
00085     iconID_summarize,
00086     iconID_trashcan,
00087     iconID_zoomin,
00088     iconID_zoomout,
00089     iconID_eraseline,
00090     iconID_npage,
00091     iconID_penblack,
00092     iconID_pendarkgrey,
00093     iconID_penlightgrey,
00094     iconID_penwhite,
00095     iconID_pan,
00096     iconID_index,
00097     iconID_pen1pixelLow,
00098     iconID_pen3pixelLow,
00099     iconID_pen5pixelLow,
00100     iconID_pen7pixelLow,
00101     iconID_penblackLow,
00102     iconID_pendarkgreyLow,
00103     iconID_penlightgreyLow,
00104     iconID_penwhiteLow,
00105     iconID_locked,
00106     iconID_tagging,
00107     iconID_search,
00108     iconID_zoomfit,
00109     iconID_landscape_portrait,
00110     iconID_portrait_landscape,
00111     iconID_zoomwidth,
00112     iconID_zoomback,
00113     iconID_find,
00114     iconID_lock_screen,
00115     iconID_not_used01,      // previously called: iconID_doc_approve,
00116     iconID_not_user02,      // previously called: iconID_doc_reject,
00117     iconID_continuous_mode,
00118     iconID_page_mode,
00119     iconID_sort,
00120     iconID_connect,
00121     iconID_start_reading,
00122     iconID_back,
00123     iconID_lookup,
00124     iconID_dictionary_search,
00125     iconID_forward,
00126 } e_iconID_t;

Enumerator:
iconState_IDconnect_time 
iconState_IDconnect_newcontent 
iconState_IDconnect_newcontent_selected 

Definition at line 139 of file eripctoolbar.h.

Enumerator:
iconState_normal 
iconState_grey 
iconState_selected 
iconState_undefined 

Definition at line 130 of file eripctoolbar.h.

00131 {
00132     iconState_normal = 0,       // normal:   black border, white background, black details
00133     iconState_grey,             // grey:     grey  border, white background, grey  details
00134     iconState_selected,         // selected: black border, black background, white details
00135     iconState_undefined
00136 } e_iconState_t;

enum eCcTb

Enumerator:
ccTbAppendPlatformIcon 
ccTbRemovePlatformIcon 
ccTbSetStatePlatformIcon 
ccTbDisableUpdate 
ccTbEnableUpdate 
ccTbSelectIconSet 
ccTbClearIconSet 
ccTbSynchronise 
ccUndefined 

Definition at line 43 of file eripctoolbar.h.


Function Documentation

int tbAppendPlatformIcon ( erClientChannel_t  channel,
int  uaID,
int  iconID,
int  signal 
)

Append icon with identifier iconID in icon set of application uaID

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
iconID icon identifier
signal Signal that will be sent to the application when this icon is clicked
Returns:
A value of 0 signals success

Definition at line 143 of file eripctoolbar.c.

00144 {
00145     erIpcCmd_t cmd;
00146 
00147     strcpy(cmd.name, "tbAppendPlatformIcon");
00148     cmd.cc = (int) ccTbAppendPlatformIcon;
00149     cmd.nArg = 3;
00150     sprintf(cmd.arg[0], "%d", uaID);
00151     sprintf(cmd.arg[1], "%d", iconID);
00152     sprintf(cmd.arg[2], "%d", signal);
00153 
00154     return erIpcSndCommand(channel, &cmd);
00155 }

Here is the call graph for this function:

int tbClearIconSet ( erClientChannel_t  channel,
int  uaID 
)

Remove all Icons from an Icon set

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

Definition at line 234 of file eripctoolbar.c.

00235 {
00236     erIpcCmd_t cmd;
00237 
00238     strcpy(cmd.name, "tbClearIconSet");
00239     cmd.cc = (int) ccTbClearIconSet;
00240     cmd.nArg = 1;
00241     sprintf(cmd.arg[0], "%d", uaID);
00242 
00243     return erIpcSndCommand(channel, &cmd);
00244 }

Here is the call graph for this function:

int tbDisableUpdate ( erClientChannel_t  channel,
int  uaID 
)

All effective changes to the Icon state are postponed until a call to tbEnableUpdate

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

Definition at line 198 of file eripctoolbar.c.

00199 {
00200     erIpcCmd_t cmd;
00201 
00202     strcpy(cmd.name, "tbDisableUpdate");
00203     cmd.cc = (int) ccTbDisableUpdate;
00204     cmd.nArg = 1;
00205     sprintf(cmd.arg[0], "%d", uaID);
00206 
00207     return erIpcSndCommand(channel, &cmd);
00208 }

Here is the call graph for this function:

int tbEnableUpdate ( erClientChannel_t  channel,
int  uaID 
)

Make all postponed changes to the Icon state effective

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

Definition at line 210 of file eripctoolbar.c.

00211 {
00212     erIpcCmd_t cmd;
00213 
00214     strcpy(cmd.name, "tbEnableUpdate");
00215     cmd.cc = (int) ccTbEnableUpdate;
00216     cmd.nArg = 1;
00217     sprintf(cmd.arg[0], "%d", uaID);
00218 
00219     return erIpcSndCommand(channel, &cmd);
00220 }

Here is the call graph for this function:

const char* tbGetIconName ( int  iconID  ) 

Definition at line 122 of file eripctoolbar.c.

00123 {
00124     int         i, nIcons;
00125     const char* iconName = NULL;
00126     
00127     nIcons = tbGetIconNumber();
00128     if ((iconID >= 0) && (iconID <= nIcons))
00129     {
00130         for (i = 0; i < nIcons; i++)
00131         {
00132             if (g_icon_map_table[i].iconID == iconID)
00133             {
00134                 iconName = g_icon_map_table[i].iconName;
00135                 break;
00136             }
00137         }
00138     }
00139 
00140     return iconName;
00141 }

Here is the call graph for this function:

int tbGetIconNumber ( void   ) 

Definition at line 115 of file eripctoolbar.c.

00116 {
00117     int nIcons;
00118     nIcons = sizeof(g_icon_map_table) / sizeof(g_icon_map_table[0]);
00119     return nIcons;
00120 }

int tbParseCommand ( char *  szCommand,
erIpcCmd_t pCmd 
)

Definition at line 252 of file eripctoolbar.c.

00253 {
00254     int     i;
00255     char   *pChar;
00256     int     cmdcode;
00257     char    szToken[TB_MAXCHARONLINE];
00258     int     nReqArgs = 0;
00259 
00260     pCmd->cc = (int) ccUndefined;
00261     for (i = 0; i < TB_N_ARG; i++)
00262     {
00263         strcpy(pCmd->arg[i], "");
00264     }
00265 
00266     // Parse Command
00267     pChar = szCommand;
00268     i = 0;
00269     while (*pChar != '\0')
00270     {
00271         szToken[i] = '\0';
00272         if (*pChar == ',')
00273         {
00274             pChar++;
00275             break;
00276         }
00277         szToken[i] = *pChar++;
00278         i++;
00279         szToken[i] = '\0';
00280     }
00281 
00282     // We have found the command Token. Figure out what the command is.
00283     // TODO: stop doing this hardcoded, rely on a smart datastructure instead.
00284 
00285     if (isdigit(szToken[0]))
00286     {
00287         cmdcode = atoi(szToken);
00288     }
00289     else
00290     {
00291         cmdcode = -1;
00292     }
00293     if (strcmp(szToken, "tbAppendPlatformIcon") == 0 || cmdcode == ccTbAppendPlatformIcon)
00294     {
00295         strcpy(pCmd->name, szToken);
00296         pCmd->cc = (int) ccTbAppendPlatformIcon;
00297         nReqArgs = 3;
00298         pCmd->nArg = 3;
00299     }
00300     else if (strcmp(szToken, "tbRemovePlatformIcon") == 0 || cmdcode == ccTbRemovePlatformIcon)
00301     {
00302         strcpy(pCmd->name, szToken);
00303         pCmd->cc = (int) ccTbRemovePlatformIcon;
00304         nReqArgs = 2;
00305         pCmd->nArg = 2;
00306     }
00307     else if (strcmp(szToken, "tbSetStatePlatformIcon") == 0 || cmdcode == ccTbSetStatePlatformIcon)
00308     {
00309         strcpy(pCmd->name, szToken);
00310         pCmd->cc = (int) ccTbSetStatePlatformIcon;
00311         nReqArgs = 3;
00312         pCmd->nArg = 3;
00313     }
00314     else if (strcmp(szToken, "tbDisableUpdate") == 0 || cmdcode == ccTbDisableUpdate)
00315     {
00316         strcpy(pCmd->name, szToken);
00317         pCmd->cc = (int) ccTbDisableUpdate;
00318         nReqArgs = 1;
00319         pCmd->nArg = 1;
00320     }
00321     else if (strcmp(szToken, "tbEnableUpdate") == 0 || cmdcode == ccTbEnableUpdate)
00322     {
00323         strcpy(pCmd->name, szToken);
00324         pCmd->cc = (int) ccTbEnableUpdate;
00325         nReqArgs = 1;
00326         pCmd->nArg = 1;
00327     }
00328     else if (strcmp(szToken, "tbSelectIconSet") == 0 || cmdcode == ccTbSelectIconSet)
00329     {
00330         strcpy(pCmd->name, szToken);
00331         pCmd->cc = (int) ccTbSelectIconSet;
00332         nReqArgs = 1;
00333         pCmd->nArg = 1;
00334     }
00335     else if (strcmp(szToken, "tbClearIconSet") == 0 || cmdcode == ccTbClearIconSet)
00336     {
00337         strcpy(pCmd->name, szToken);
00338         pCmd->cc = (int) ccTbClearIconSet;
00339         nReqArgs = 1;
00340         pCmd->nArg = 1;
00341     }
00342     else if (strcmp(szToken, "tbSynchronise") == 0 || cmdcode == ccTbSynchronise)
00343     {
00344         strcpy(pCmd->name, szToken);
00345         pCmd->cc = (int) ccTbSynchronise;
00346         nReqArgs = 2;
00347         pCmd->nArg = 2;
00348     }
00349     else
00350     {
00351         strcpy(pCmd->name, "Undefined");
00352         pCmd->cc = (int) ccUndefined;
00353         fprintf(stderr, "%s: Command %s \n", __FUNCTION__, szToken);
00354         fprintf(stderr, "Error parsing (%s). Command undefined\n", szCommand);
00355         pCmd->nArg = -1;
00356         return -1;
00357     }
00358 
00359     if (nReqArgs > 0)
00360     {
00361         erIpcGetArgs(pChar, pCmd, nReqArgs);
00362     }
00363     return 0;
00364 }

Here is the call graph for this function:

int tbRemovePlatformIcon ( erClientChannel_t  channel,
int  uaID,
int  iconID 
)

Remove icon with identifier iconID in icon set of application uaID

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

Definition at line 170 of file eripctoolbar.c.

00171 {
00172     erIpcCmd_t cmd;
00173 
00174     strcpy(cmd.name, "tbRemovePlatformIcon");
00175     cmd.cc = (int) ccTbRemovePlatformIcon;
00176     cmd.nArg = 2;
00177     sprintf(cmd.arg[0], "%d", uaID);
00178     sprintf(cmd.arg[1], "%d", iconID);
00179 
00180     return erIpcSndCommand(channel, &cmd);
00181 }

Here is the call graph for this function:

int tbReportIconClicked ( erClientChannel_t  channel,
int  signal,
int  iconID,
int  iconState 
)

Definition at line 368 of file eripctoolbar.c.

00369 {
00370     erIpcCmd_t cmd;
00371 
00372     strcpy(cmd.name, "tbIconClicked");
00373     cmd.cc = signal;
00374     cmd.nArg = 2;
00375     sprintf(cmd.arg[0], "%d", iconID);
00376     sprintf(cmd.arg[1], "%d", iconState);
00377 
00378     return erIpcSndCommand(channel, &cmd);
00379 }

Here is the call graph for this function:

int tbReportSynchronised ( erClientChannel_t  channel,
int  signal 
)

Definition at line 382 of file eripctoolbar.c.

00383 {
00384     erIpcCmd_t cmd;
00385 
00386     strcpy(cmd.name, "tbSynchronise");
00387     cmd.cc = signal;
00388     cmd.nArg = 0;
00389 
00390     return erIpcSndCommand(channel, &cmd);
00391 }

Here is the call graph for this function:

int tbSelectIconSet ( erClientChannel_t  channel,
int  uaID 
)

Select and display an Icon set

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

Definition at line 222 of file eripctoolbar.c.

00223 {
00224     erIpcCmd_t cmd;
00225 
00226     strcpy(cmd.name, "tbSelectIconSet");
00227     cmd.cc = (int) ccTbSelectIconSet;
00228     cmd.nArg = 1;
00229     sprintf(cmd.arg[0], "%d", uaID);
00230 
00231     return erIpcSndCommand(channel, &cmd);
00232 }

Here is the call graph for this function:

int tbSetStatePlatformIcon ( erClientChannel_t  channel,
int  uaID,
int  iconID,
int  iconState 
)

Set state (i.e. bitmap image) for icon with identifier iconID in icon set of application uaID

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
iconID icon identifier
iconState icon state, i.e. index in bitmap images
Returns:
A value of 0 signals success

Definition at line 184 of file eripctoolbar.c.

00185 {
00186     erIpcCmd_t cmd;
00187 
00188     strcpy(cmd.name, "tbSetStatePlatformIcon");
00189     cmd.cc = (int) ccTbSetStatePlatformIcon;
00190     cmd.nArg = 3;
00191     sprintf(cmd.arg[0], "%d", uaID);
00192     sprintf(cmd.arg[1], "%d", iconID);
00193     sprintf(cmd.arg[2], "%d", iconState);
00194 
00195     return erIpcSndCommand(channel, &cmd);
00196 }

Here is the call graph for this function:

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

Acknowledge "synchronise" message

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
signal Signal that will be sent to the application
Returns:
A value of 0 signals success

Definition at line 157 of file eripctoolbar.c.

00158 {
00159     erIpcCmd_t cmd;
00160 
00161     strcpy(cmd.name, "tbSynchronise");
00162     cmd.cc = (int) ccTbSynchronise;
00163     cmd.nArg = 2;
00164     sprintf(cmd.arg[0], "%d", uaID);
00165     sprintf(cmd.arg[1], "%d", signal);
00166 
00167     return erIpcSndCommand(channel, &cmd);
00168 }

Here is the call graph for this function:


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