contentLister/inc/viewer.h File Reference

content lister - contentLister viewer IPC communication More...

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

Go to the source code of this file.

Defines

#define SERVER_BUFFER_SIZE   1024

Functions

gboolean viewerInit (char *viewer)
gboolean viewerStore (char *viewer, st_ContentType_e contentType)
gboolean viewerInstallIpcServer ()


Detailed Description

content lister - contentLister viewer IPC communication

<File description>="">

Definition in file viewer.h.


Define Documentation

#define SERVER_BUFFER_SIZE   1024

Definition at line 31 of file viewer.h.


Function Documentation

gboolean viewerInit ( char *  viewer  ) 

Init the communication channel with the viewer

Parameters:
viewer unique identifier
Returns:
-

Definition at line 71 of file viewer.c.

00072 {
00073     int     channel;
00074 
00075     channel = viewerGetChannel(viewer);
00076 
00077     if (channel > 0)
00078     {
00079         // create/init the channel to communicate with the userApplication
00080         if (erIpcStartClient(channel, &theBrowserChannel) == 0)
00081         {
00082             CL_IPCPRINTF("channel %d opened", channel);
00083             return TRUE;
00084         }
00085     }
00086     return FALSE;
00087 }

Here is the call graph for this function:

gboolean viewerInstallIpcServer (  ) 

Start listening to viewer IPC requests

Returns:
-

Definition at line 111 of file viewer.c.

00112 {
00113     int     returnValue;
00114     int     fd = -1;
00115 
00116     CL_IPCPRINTF("entry");
00117 
00118     returnValue = erIpcOpenServerChannel(ER_CONTENTLISTER_CHANNEL, &theServerChannel);
00119 
00120     if (returnValue != (-1))
00121     {
00122         fd = erIpcGetServerFd(theServerChannel);
00123 
00124         CL_IPCPRINTF("erIpcGetServerFd returned %d\n", fd);
00125 
00126         // gtk specific mechanism to monitor input file descriptor.
00127         returnValue = gdk_input_add(fd, GDK_INPUT_READ, viewerMessageReceived, (gpointer) theServerChannel);
00128 
00129         CL_IPCPRINTF("gdk_input_add returned %d", returnValue);
00130         return TRUE;
00131     }
00132     else
00133     {
00134         CL_ERRORPRINTF("Could not open server channel");
00135         return FALSE;
00136     }
00137 }

Here is the call graph for this function:

gboolean viewerStore ( char *  viewer,
st_ContentType_e  contentType 
)

Send IPC request to the viewer to store the filename of the currently displayed data

Parameters:
viewer unique identifier
contentType unique identifier
Returns:
-

Definition at line 89 of file viewer.c.

00090 {
00091     int     channel;
00092 
00093     CL_IPCPRINTF("entry - %s - %d", viewer, contentType);
00094 
00095     channel = viewerGetChannel(viewer);
00096 
00097     if (channel > 0)
00098     {
00099         // request to store the location of the currently diplayed data
00100         // NULL where itemID used to be since in the past the last location 
00101         // of every item neede to be stored. Now only hte last accessed item
00102         // location needs to be stored so no item id is needed any more
00103 
00104         vwrStore(theBrowserChannel, ER_CONTENT_LISTER_UA_ID, contentType, NULL);
00105     }
00106 
00107     return TRUE;
00108 
00109 }

Here is the call graph for this function:


Generated on Sun Dec 14 17:13:03 2008 by  doxygen 1.5.6