#include <liberipc/eripc.h>
#include <liberipc/eripcviewer.h>
#include <liberipc/eripcbusyd.h>
#include <liberipc/eripccontentlister.h>
#include "browserTypes.h"
#include "contentLister.h"
#include "browserLog.h"
#include "mozilla_api.h"
Go to the source code of this file.
Functions | |
| static void | contentlister_store_item_location (int category, char *item, char *location) |
| void | contentlister_init () |
| void | contentlister_request (erIpcCmd_t command, Ereader *browser) |
Variables | |
| static erClientChannel_t | contentListerChannel |
<File description>="">
Definition in file contentLister.cpp.
| void contentlister_init | ( | ) |
Open communication channel with Contentlister counts on the fact that contentlister is running
Definition at line 44 of file contentLister.cpp.
00045 { 00046 BR_IPCPRINTF("entry"); 00047 erIpcStartClient(ER_CONTENTLISTER_CHANNEL, &contentListerChannel); 00048 }

| void contentlister_request | ( | erIpcCmd_t | command, | |
| Ereader * | browser | |||
| ) |
request from contentlister
| command | the command | |
| Ereader | datastructure containing the "mozembed" reference |
Definition at line 51 of file contentLister.cpp.
00052 { 00053 char *item = NULL; 00054 int category; 00055 char *location = NULL; 00056 int index; 00057 00058 BR_IPCPRINTF("command %d", command.cc); 00059 00060 switch (command.cc) 00061 { 00062 case ccVwrStore: 00063 BR_IPCPRINTF("STORE - nArg %d", command.nArg); 00064 //check the argument just to besure 00065 if (command.nArg == 3) 00066 { 00067 for (index = 0; index < command.nArg; index++) 00068 { 00069 BR_IPCPRINTF("command.arg[%d]=%s", index, command.arg[index]); 00070 } 00071 00072 category = atoi(command.arg[1]); 00073 item = command.arg[2]; 00074 00075 if ((browser) && (browser->mozEmbed)) 00076 { 00077 BR_IPCPRINTF("gtk_moz_embed_get_location"); 00078 location = gtk_moz_embed_get_location(GTK_MOZ_EMBED(browser->mozEmbed)); 00079 00080 if (location) 00081 { 00082 BR_IPCPRINTF("category=%d item=%s location=%s", category, item, location); 00083 contentlister_store_item_location(category, item, location); 00084 // gtk_moz_embed_get_location used g_strdup 00085 g_free(location); 00086 } 00087 } 00088 } 00089 else 00090 { 00091 BR_WARNPRINTF("ccVwrStore invalid argument count %d", command.nArg); 00092 } 00093 break; 00094 default: 00095 BR_IPCPRINTF("UNHANDLED COMMAND %d", command.cc); 00096 break; 00097 } 00098 return; 00099 }

| void contentlister_store_item_location | ( | int | category, | |
| char * | item, | |||
| char * | location | |||
| ) | [static] |
Send location of the specified category to the contentlister
| category | unique id | |
| item | - unique id | |
| location |
Definition at line 110 of file contentLister.cpp.
00111 { 00112 BR_IPCPRINTF("clStore"); 00113 clStore(contentListerChannel, ER_XHTML_VIEWER_UA_ID, category, item, location); 00114 }

erClientChannel_t contentListerChannel [static] |
Definition at line 40 of file contentLister.cpp.
1.5.6