summaryrefslogtreecommitdiff
path: root/src/lib/evas/cserve2/evas_cs2_private.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-07-31 20:29:41 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:13 +0900
commitf5d0f0aec37fae9e974ce1b5b2e518863297ba3f (patch)
tree98a6bdbd8c1cf296ebac3a400f8f661e324651e7 /src/lib/evas/cserve2/evas_cs2_private.h
parent08648ab2a5033da4f6c835c049238074802fb232 (diff)
evas/cserve2: Scan shared indexes in client side
Read Image descriptors from the shared arrays But, accessing the shared index can be a bit expensive, so try to read from the socket before scanning the index, without blocking.
Diffstat (limited to 'src/lib/evas/cserve2/evas_cs2_private.h')
-rw-r--r--src/lib/evas/cserve2/evas_cs2_private.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/lib/evas/cserve2/evas_cs2_private.h b/src/lib/evas/cserve2/evas_cs2_private.h
index 289119f34d..d1c53660b1 100644
--- a/src/lib/evas/cserve2/evas_cs2_private.h
+++ b/src/lib/evas/cserve2/evas_cs2_private.h
@@ -4,12 +4,15 @@
4#include "evas_common_private.h" 4#include "evas_common_private.h"
5#include "evas_cs2.h" 5#include "evas_cs2.h"
6 6
7#define SHARED_BUFFER_PATH_MAX 64
7typedef struct _Data_Entry Data_Entry; 8typedef struct _Data_Entry Data_Entry;
8typedef struct _Font_Entry Font_Entry; 9typedef struct _Font_Entry Font_Entry;
9typedef struct _Index_Table Index_Table; 10typedef struct _Index_Table Index_Table;
10typedef struct _Shared_Index Shared_Index; 11typedef struct _Shared_Index Shared_Index;
12typedef struct _Shared_Buffer Shared_Buffer;
11 13
12struct _Data_Entry { 14struct _Data_Entry
15{
13 unsigned int image_id; 16 unsigned int image_id;
14 void (*preloaded_cb)(void *, Eina_Bool); 17 void (*preloaded_cb)(void *, Eina_Bool);
15 struct { 18 struct {
@@ -23,14 +26,15 @@ struct _Data_Entry {
23 } shm; 26 } shm;
24}; 27};
25 28
26struct _Shared_Index { 29struct _Shared_Index
27 char path[64]; 30{
31 char path[SHARED_BUFFER_PATH_MAX];
28 int generation_id; 32 int generation_id;
29 Eina_File *f; 33 Eina_File *f;
30 union 34 union
31 { 35 {
32 const Shared_Array_Header *header; 36 const Shared_Array_Header *header;
33 void *data; 37 char *data;
34 }; 38 };
35 union 39 union
36 { 40 {
@@ -45,19 +49,19 @@ struct _Shared_Index {
45 int last_entry_in_hash; 49 int last_entry_in_hash;
46}; 50};
47 51
48struct _Index_Table { 52struct _Shared_Buffer
53{
54 char path[SHARED_BUFFER_PATH_MAX];
55 Eina_File *f;
56 char *data;
57 int size;
58};
59
60struct _Index_Table
61{
49 int generation_id; 62 int generation_id;
50 // TODO: use Shared_Index 63 Shared_Buffer strings_entries;
51 struct { 64 Shared_Index strings_index;
52 char index_path[64];
53 char entries_path[64];
54 Eina_File *index_file;
55 Eina_File *entries_file;
56 const Shared_Array_Header *index_header;
57 const Index_Entry *indexes;
58 const char *data;
59 size_t entries_size;
60 } strings;
61 Shared_Index files; 65 Shared_Index files;
62 Shared_Index images; 66 Shared_Index images;
63 Shared_Index fonts; // TODO 67 Shared_Index fonts; // TODO