
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//Compile\ with:}}
\DoxyCodeLine{00002\ \textcolor{comment}{//\ gcc\ -\/o\ eet-\/data-\/file\_descriptor\_01\ eet-\/data-\/file\_descriptor\_01.c\ `pkg-\/config\ -\/-\/cflags\ -\/-\/libs\ eet\ eina`}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Eet_8h}{Eet.h}}>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ <limits.h>}}
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#include\ <sys/types.h>}}
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <sys/stat.h>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <unistd.h>}}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ \textcolor{comment}{//\ complex\ real-\/world\ structures\ based\ on\ elmdentica\ database}}
\DoxyCodeLine{00013\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{00014\ \{}
\DoxyCodeLine{00015\ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ *screen\_name;}
\DoxyCodeLine{00016\ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ *name;}
\DoxyCodeLine{00017\ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ *message;}
\DoxyCodeLine{00018\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ id;}
\DoxyCodeLine{00019\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ status\_id;}
\DoxyCodeLine{00020\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ date;}
\DoxyCodeLine{00021\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ timeline;}
\DoxyCodeLine{00022\ \}\ My\_Message;}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{00025\ \{}
\DoxyCodeLine{00026\ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *dm\_to;}
\DoxyCodeLine{00027\ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *message;}
\DoxyCodeLine{00028\ \}\ My\_Post;}
\DoxyCodeLine{00029\ }
\DoxyCodeLine{00030\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{00031\ \{}
\DoxyCodeLine{00032\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ id;}
\DoxyCodeLine{00033\ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ *name;}
\DoxyCodeLine{00034\ \ \ \ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ \ \ *messages;}
\DoxyCodeLine{00035\ \ \ \ My\_Post\ \ \ \ \ *posts;}
\DoxyCodeLine{00036\ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ posts\_count;}
\DoxyCodeLine{00037\ \}\ My\_Account;}
\DoxyCodeLine{00038\ }
\DoxyCodeLine{00039\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{00040\ \{}
\DoxyCodeLine{00041\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ version;\ \textcolor{comment}{//\ it\ is\ recommended\ to\ use\ versioned\ configuration!}}
\DoxyCodeLine{00042\ \ \ \ \mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\_Hash}}\ \ \ *accounts;}
\DoxyCodeLine{00043\ \}\ My\_Cache;}
\DoxyCodeLine{00044\ }
\DoxyCodeLine{00045\ \textcolor{comment}{//\ string\ that\ represents\ the\ entry\ in\ eet\ file,\ you\ might\ like\ to\ have}}
\DoxyCodeLine{00046\ \textcolor{comment}{//\ different\ profiles\ or\ so\ in\ the\ same\ file,\ this\ is\ possible\ with}}
\DoxyCodeLine{00047\ \textcolor{comment}{//\ different\ strings}}
\DoxyCodeLine{00048\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ MY\_CACHE\_FILE\_ENTRY[]\ =\ \textcolor{stringliteral}{"{}cache"{}};}
\DoxyCodeLine{00049\ }
\DoxyCodeLine{00050\ \textcolor{comment}{//\ keep\ the\ descriptor\ static\ global,\ so\ it\ can\ be}}
\DoxyCodeLine{00051\ \textcolor{comment}{//\ shared\ by\ different\ functions\ (load/save)\ of\ this\ and\ only\ this}}
\DoxyCodeLine{00052\ \textcolor{comment}{//\ file.}}
\DoxyCodeLine{00053\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}}\ *\_my\_cache\_descriptor;}
\DoxyCodeLine{00054\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}}\ *\_my\_account\_descriptor;}
\DoxyCodeLine{00055\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}}\ *\_my\_message\_descriptor;}
\DoxyCodeLine{00056\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eet__Data__Group_ga4baec0e840012480a0958c5c3bca276d}{Eet\_Data\_Descriptor}}\ *\_my\_post\_descriptor;}
\DoxyCodeLine{00057\ }
\DoxyCodeLine{00058\ \textcolor{comment}{//\ keep\ file\ handle\ alive,\ so\ mmap()ed\ strings\ are\ all\ alive\ as\ well}}
\DoxyCodeLine{00059\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}}\ *\_my\_cache\_file\ =\ NULL;}
\DoxyCodeLine{00060\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eet__File__Group_gaf0984c8280699ca5a3c4966f5580324c}{Eet\_Dictionary}}\ *\_my\_cache\_dict\ =\ NULL;}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00063\ \_my\_cache\_descriptor\_init(\textcolor{keywordtype}{void})}
\DoxyCodeLine{00064\ \{}
\DoxyCodeLine{00065\ \ \ \ \mbox{\hyperlink{struct__Eet__Data__Descriptor__Class}{Eet\_Data\_Descriptor\_Class}}\ eddc;}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \ \ \ \textcolor{comment}{//\ The\ FILE\ variant\ is\ good\ for\ caches\ and\ things\ that\ are\ just}}
\DoxyCodeLine{00068\ \ \ \ \textcolor{comment}{//\ appended,\ but\ needs\ to\ take\ care\ when\ changing\ strings\ and\ files\ must}}
\DoxyCodeLine{00069\ \ \ \ \textcolor{comment}{//\ be\ kept\ open\ so\ mmap()ed\ strings\ will\ be\ kept\ alive.}}
\DoxyCodeLine{00070\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc,\ My\_Cache);}
\DoxyCodeLine{00071\ \ \ \ \_my\_cache\_descriptor\ =\ \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{00072\ }
\DoxyCodeLine{00073\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc,\ My\_Account);}
\DoxyCodeLine{00074\ \ \ \ \_my\_account\_descriptor\ =\ \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc,\ My\_Message);}
\DoxyCodeLine{00077\ \ \ \ \_my\_message\_descriptor\ =\ \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00079\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga0bf94c07d8e69cfaac8dd2d615d7542c}{EET\_EINA\_FILE\_DATA\_DESCRIPTOR\_CLASS\_SET}}(\&eddc,\ My\_Post);}
\DoxyCodeLine{00080\ \ \ \ \_my\_post\_descriptor\ =\ \mbox{\hyperlink{group__Eet__Data__Group_gaa613c638dfb72d3f9bd2bd1d4c1bf844}{eet\_data\_descriptor\_file\_new}}(\&eddc);}
\DoxyCodeLine{00081\ }
\DoxyCodeLine{00082\ \ \ \ \textcolor{comment}{//\ Describe\ the\ members\ to\ be\ saved:}}
\DoxyCodeLine{00083\ \ \ \ \textcolor{comment}{//\ Use\ a\ temporary\ macro\ so\ we\ don't\ type\ a\ lot,\ also\ avoid\ errors:}}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ \textcolor{preprocessor}{\#define\ ADD\_BASIC(member,\ eet\_type)\ \(\backslash\)}}
\DoxyCodeLine{00086\ \textcolor{preprocessor}{\ \ EET\_DATA\_DESCRIPTOR\_ADD\_BASIC\ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00087\ \textcolor{preprocessor}{\ \ \ \ (\_my\_message\_descriptor,\ My\_Message,\ \#\ member,\ member,\ eet\_type)}}
\DoxyCodeLine{00088\ \ \ \ ADD\_BASIC(screen\_name,\ \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{00089\ \ \ \ ADD\_BASIC(name,\ \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{00090\ \ \ \ ADD\_BASIC(message,\ \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{00091\ \ \ \ ADD\_BASIC(\textcolor{keywordtype}{id},\ \mbox{\hyperlink{group__Eet__Data__Group_gacf6a3c9f06e10e20be5b02cd8c6a220b}{EET\_T\_UINT}});}
\DoxyCodeLine{00092\ \ \ \ ADD\_BASIC(status\_id,\ \mbox{\hyperlink{group__Eet__Data__Group_gacf6a3c9f06e10e20be5b02cd8c6a220b}{EET\_T\_UINT}});}
\DoxyCodeLine{00093\ \ \ \ ADD\_BASIC(date,\ \mbox{\hyperlink{group__Eet__Data__Group_gacf6a3c9f06e10e20be5b02cd8c6a220b}{EET\_T\_UINT}});}
\DoxyCodeLine{00094\ \ \ \ ADD\_BASIC(timeline,\ \mbox{\hyperlink{group__Eet__Data__Group_gacf6a3c9f06e10e20be5b02cd8c6a220b}{EET\_T\_UINT}});}
\DoxyCodeLine{00095\ \textcolor{preprocessor}{\#undef\ ADD\_BASIC}}
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00097\ \textcolor{preprocessor}{\#define\ ADD\_BASIC(member,\ eet\_type)\ \(\backslash\)}}
\DoxyCodeLine{00098\ \textcolor{preprocessor}{\ \ EET\_DATA\_DESCRIPTOR\_ADD\_BASIC\ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00099\ \textcolor{preprocessor}{\ \ \ \ (\_my\_post\_descriptor,\ My\_Post,\ \#\ member,\ member,\ eet\_type)}}
\DoxyCodeLine{00100\ \ \ \ ADD\_BASIC(dm\_to,\ \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{00101\ \ \ \ ADD\_BASIC(message,\ \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{00102\ \textcolor{preprocessor}{\#undef\ ADD\_BASIC}}
\DoxyCodeLine{00103\ }
\DoxyCodeLine{00104\ \textcolor{preprocessor}{\#define\ ADD\_BASIC(member,\ eet\_type)\ \(\backslash\)}}
\DoxyCodeLine{00105\ \textcolor{preprocessor}{\ \ EET\_DATA\_DESCRIPTOR\_ADD\_BASIC\ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00106\ \textcolor{preprocessor}{\ \ \ \ (\_my\_account\_descriptor,\ My\_Account,\ \#\ member,\ member,\ eet\_type)}}
\DoxyCodeLine{00107\ \ \ \ ADD\_BASIC(name,\ \mbox{\hyperlink{group__Eet__Data__Group_ga0d2cf409bf3f151156d74d18ac59e3d1}{EET\_T\_STRING}});}
\DoxyCodeLine{00108\ \ \ \ ADD\_BASIC(\textcolor{keywordtype}{id},\ \mbox{\hyperlink{group__Eet__Data__Group_gacf6a3c9f06e10e20be5b02cd8c6a220b}{EET\_T\_UINT}});}
\DoxyCodeLine{00109\ \textcolor{preprocessor}{\#undef\ ADD\_BASIC}}
\DoxyCodeLine{00110\ }
\DoxyCodeLine{00111\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_gabb4c7833ba053f2322e6b667a9ec7f04}{EET\_DATA\_DESCRIPTOR\_ADD\_LIST}}}
\DoxyCodeLine{00112\ \ \ \ \ \ (\_my\_account\_descriptor,\ My\_Account,\ \textcolor{stringliteral}{"{}messages"{}},\ messages,}
\DoxyCodeLine{00113\ \ \ \ \ \ \_my\_message\_descriptor);}
\DoxyCodeLine{00114\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga7adad32d2eba76566533353632f00ae4}{EET\_DATA\_DESCRIPTOR\_ADD\_VAR\_ARRAY}}}
\DoxyCodeLine{00115\ \ \ \ \ \ (\_my\_account\_descriptor,\ My\_Account,\ \textcolor{stringliteral}{"{}posts"{}},\ posts,}
\DoxyCodeLine{00116\ \ \ \ \ \ \_my\_post\_descriptor);}
\DoxyCodeLine{00117\ }
\DoxyCodeLine{00118\ \textcolor{preprocessor}{\#define\ ADD\_BASIC(member,\ eet\_type)\ \(\backslash\)}}
\DoxyCodeLine{00119\ \textcolor{preprocessor}{\ \ EET\_DATA\_DESCRIPTOR\_ADD\_BASIC\ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00120\ \textcolor{preprocessor}{\ \ \ \ (\_my\_cache\_descriptor,\ My\_Cache,\ \#\ member,\ member,\ eet\_type)}}
\DoxyCodeLine{00121\ \ \ \ ADD\_BASIC(version,\ \mbox{\hyperlink{group__Eet__Data__Group_gacf6a3c9f06e10e20be5b02cd8c6a220b}{EET\_T\_UINT}});}
\DoxyCodeLine{00122\ \textcolor{preprocessor}{\#undef\ ADD\_BASIC}}
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00124\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_gad5e348ead4ba0b441c1e020f9bf23365}{EET\_DATA\_DESCRIPTOR\_ADD\_HASH}}}
\DoxyCodeLine{00125\ \ \ \ \ \ (\_my\_cache\_descriptor,\ My\_Cache,\ \textcolor{stringliteral}{"{}accounts"{}},\ accounts,}
\DoxyCodeLine{00126\ \ \ \ \ \ \_my\_account\_descriptor);}
\DoxyCodeLine{00127\ \}\ \textcolor{comment}{/*\ \_my\_cache\_descriptor\_init\ */}}
\DoxyCodeLine{00128\ }
\DoxyCodeLine{00129\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00130\ \_my\_cache\_descriptor\_shutdown(\textcolor{keywordtype}{void})}
\DoxyCodeLine{00131\ \{}
\DoxyCodeLine{00132\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_my\_cache\_descriptor);}
\DoxyCodeLine{00133\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_my\_account\_descriptor);}
\DoxyCodeLine{00134\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_my\_message\_descriptor);}
\DoxyCodeLine{00135\ \ \ \ \mbox{\hyperlink{group__Eet__Data__Group_ga3e2b601720973d0e1f4683768a593c4d}{eet\_data\_descriptor\_free}}(\_my\_post\_descriptor);}
\DoxyCodeLine{00136\ \}\ \textcolor{comment}{/*\ \_my\_cache\_descriptor\_shutdown\ */}}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00138\ \textcolor{comment}{//\ need\ to\ check\ if\ the\ pointer\ came\ from\ mmaped\ area\ in\ eet\_dictionary}}
\DoxyCodeLine{00139\ \textcolor{comment}{//\ or\ it\ was\ allocated\ with\ eina\_stringshare\_add()}}
\DoxyCodeLine{00140\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00141\ \_eet\_string\_free(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *str)}
\DoxyCodeLine{00142\ \{}
\DoxyCodeLine{00143\ \ \ \ \textcolor{keywordflow}{if}\ (!str)}
\DoxyCodeLine{00144\ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00146\ \ \ \ \textcolor{keywordflow}{if}\ ((\_my\_cache\_dict)\ \&\&\ (\mbox{\hyperlink{group__Eet__File__Group_ga53290da52edb929b85e51f25e79d27c8}{eet\_dictionary\_string\_check}}(\_my\_cache\_dict,\ str)))}
\DoxyCodeLine{00147\ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{00148\ }
\DoxyCodeLine{00149\ \ \ \ \mbox{\hyperlink{group__Eina__Stringshare__Group_ga5538b4a134987b8a01744fad1a845ba4}{eina\_stringshare\_del}}(str);}
\DoxyCodeLine{00150\ \}\ \textcolor{comment}{/*\ \_eet\_string\_free\ */}}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \textcolor{keyword}{static}\ My\_Message\ *}
\DoxyCodeLine{00153\ \_my\_message\_new(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *message)}
\DoxyCodeLine{00154\ \{}
\DoxyCodeLine{00155\ \ \ \ My\_Message\ *msg\ =\ calloc(1,\ \textcolor{keyword}{sizeof}(My\_Message));}
\DoxyCodeLine{00156\ \ \ \ \textcolor{keywordflow}{if}\ (!msg)}
\DoxyCodeLine{00157\ \ \ \ \ \ \{}
\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ calloc\ My\_Message\(\backslash\)n"{}});}
\DoxyCodeLine{00159\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{00160\ \ \ \ \ \ \}}
\DoxyCodeLine{00161\ }
\DoxyCodeLine{00162\ \ \ \ msg-\/>message\ =\ \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\_stringshare\_add}}(message);}
\DoxyCodeLine{00163\ \ \ \ \textcolor{keywordflow}{return}\ msg;}
\DoxyCodeLine{00164\ \}\ \textcolor{comment}{/*\ \_my\_message\_new\ */}}
\DoxyCodeLine{00165\ }
\DoxyCodeLine{00166\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00167\ \_my\_message\_free(My\_Message\ *msg)}
\DoxyCodeLine{00168\ \{}
\DoxyCodeLine{00169\ \ \ \ \_eet\_string\_free(msg-\/>screen\_name);}
\DoxyCodeLine{00170\ \ \ \ \_eet\_string\_free(msg-\/>name);}
\DoxyCodeLine{00171\ \ \ \ \_eet\_string\_free(msg-\/>message);}
\DoxyCodeLine{00172\ \ \ \ free(msg);}
\DoxyCodeLine{00173\ \}\ \textcolor{comment}{/*\ \_my\_message\_free\ */}}
\DoxyCodeLine{00174\ }
\DoxyCodeLine{00175\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{00176\ \_my\_post\_add(My\_Account\ *acc,}
\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *message)}
\DoxyCodeLine{00178\ \{}
\DoxyCodeLine{00179\ \ \ \ \textcolor{keywordtype}{int}\ new\_count\ =\ acc-\/>posts\_count\ +\ 1;}
\DoxyCodeLine{00180\ \ \ \ My\_Post\ *post\ =\ realloc(acc-\/>posts,\ new\_count\ *\ \textcolor{keyword}{sizeof}(My\_Post));}
\DoxyCodeLine{00181\ \ \ \ \textcolor{keywordflow}{if}\ (!post)}
\DoxyCodeLine{00182\ \ \ \ \ \ \{}
\DoxyCodeLine{00183\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ add\ My\_Post\(\backslash\)n"{}});}
\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{00185\ \ \ \ \ \ \}}
\DoxyCodeLine{00186\ }
\DoxyCodeLine{00187\ \ \ \ post[acc-\/>posts\_count].message\ =\ \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\_stringshare\_add}}(message);}
\DoxyCodeLine{00188\ \ \ \ post[acc-\/>posts\_count].dm\_to\ =\ NULL;}
\DoxyCodeLine{00189\ \ \ \ acc-\/>posts\_count\ =\ new\_count;}
\DoxyCodeLine{00190\ \ \ \ acc-\/>posts\ =\ post;}
\DoxyCodeLine{00191\ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{00192\ \}\ \textcolor{comment}{/*\ \_my\_post\_new\ */}}
\DoxyCodeLine{00193\ }
\DoxyCodeLine{00194\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00195\ \_my\_post\_free(My\_Post\ *post)}
\DoxyCodeLine{00196\ \{}
\DoxyCodeLine{00197\ \ \ \ \_eet\_string\_free(post-\/>dm\_to);}
\DoxyCodeLine{00198\ \ \ \ \_eet\_string\_free(post-\/>message);}
\DoxyCodeLine{00199\ \}\ \textcolor{comment}{/*\ \_my\_post\_free\ */}}
\DoxyCodeLine{00200\ }
\DoxyCodeLine{00201\ \textcolor{keyword}{static}\ My\_Account\ *}
\DoxyCodeLine{00202\ \_my\_account\_new(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name)}
\DoxyCodeLine{00203\ \{}
\DoxyCodeLine{00204\ \ \ \ My\_Account\ *acc\ =\ calloc(1,\ \textcolor{keyword}{sizeof}(My\_Account));}
\DoxyCodeLine{00205\ \ \ \ \textcolor{keywordflow}{if}\ (!acc)}
\DoxyCodeLine{00206\ \ \ \ \ \ \{}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ calloc\ My\_Account\(\backslash\)n"{}});}
\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{00209\ \ \ \ \ \ \}}
\DoxyCodeLine{00210\ }
\DoxyCodeLine{00211\ \ \ \ acc-\/>name\ =\ \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\_stringshare\_add}}(name);}
\DoxyCodeLine{00212\ \ \ \ \textcolor{keywordflow}{return}\ acc;}
\DoxyCodeLine{00213\ \}\ \textcolor{comment}{/*\ \_my\_account\_new\ */}}
\DoxyCodeLine{00214\ }
\DoxyCodeLine{00215\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00216\ \_my\_account\_free(My\_Account\ *acc)}
\DoxyCodeLine{00217\ \{}
\DoxyCodeLine{00218\ \ \ \ My\_Message\ *m;}
\DoxyCodeLine{00219\ \ \ \ \textcolor{keywordtype}{int}\ i;}
\DoxyCodeLine{00220\ }
\DoxyCodeLine{00221\ \ \ \ \_eet\_string\_free(acc-\/>name);}
\DoxyCodeLine{00222\ }
\DoxyCodeLine{00223\ \ \ \ \mbox{\hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{EINA\_LIST\_FREE}}(acc-\/>messages,\ m)}
\DoxyCodeLine{00224\ \ \ \ \ \ \_my\_message\_free(m);}
\DoxyCodeLine{00225\ }
\DoxyCodeLine{00226\ \ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ acc-\/>posts\_count;\ i++)}
\DoxyCodeLine{00227\ \ \ \ \ \ \_my\_post\_free(\&acc-\/>posts[i]);}
\DoxyCodeLine{00228\ \ \ \ free(acc-\/>posts);}
\DoxyCodeLine{00229\ }
\DoxyCodeLine{00230\ \ \ \ free(acc);}
\DoxyCodeLine{00231\ \}\ \textcolor{comment}{/*\ \_my\_account\_free\ */}}
\DoxyCodeLine{00232\ }
\DoxyCodeLine{00233\ \textcolor{keyword}{static}\ My\_Cache\ *}
\DoxyCodeLine{00234\ \_my\_cache\_new(\textcolor{keywordtype}{void})}
\DoxyCodeLine{00235\ \{}
\DoxyCodeLine{00236\ \ \ \ My\_Cache\ *my\_cache\ =\ calloc(1,\ \textcolor{keyword}{sizeof}(My\_Cache));}
\DoxyCodeLine{00237\ \ \ \ \textcolor{keywordflow}{if}\ (!my\_cache)}
\DoxyCodeLine{00238\ \ \ \ \ \ \{}
\DoxyCodeLine{00239\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ calloc\ My\_Cache\(\backslash\)n"{}});}
\DoxyCodeLine{00240\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{00241\ \ \ \ \ \ \}}
\DoxyCodeLine{00242\ }
\DoxyCodeLine{00243\ \ \ \ my\_cache-\/>accounts\ =\ \mbox{\hyperlink{group__Eina__Hash__Group_ga96bbbf394fb34d7e1f57d261de638e69}{eina\_hash\_string\_small\_new}}(NULL);}
\DoxyCodeLine{00244\ }
\DoxyCodeLine{00245\ \ \ \ my\_cache-\/>version\ =\ 1;}
\DoxyCodeLine{00246\ \ \ \ \textcolor{keywordflow}{return}\ my\_cache;}
\DoxyCodeLine{00247\ \}\ \textcolor{comment}{/*\ \_my\_cache\_new\ */}}
\DoxyCodeLine{00248\ }
\DoxyCodeLine{00249\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{00250\ \_my\_cache\_account\_free\_cb(\textcolor{keyword}{const}\ \mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\_Hash}}\ *hash\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{00251\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{void}\ \ \ \ \ \ *key\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{00252\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ \ \ \ \ *data,}
\DoxyCodeLine{00253\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ \ \ \ \ *fdata\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{00254\ \{}
\DoxyCodeLine{00255\ \ \ \ \_my\_account\_free(data);}
\DoxyCodeLine{00256\ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{00257\ \}}
\DoxyCodeLine{00258\ }
\DoxyCodeLine{00259\ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{00260\ \_my\_cache\_free(My\_Cache\ *my\_cache)}
\DoxyCodeLine{00261\ \{}
\DoxyCodeLine{00262\ \ \ \ \mbox{\hyperlink{group__Eina__Hash__Group_ga9237dbade8e59ac827992c7a5146cb20}{eina\_hash\_foreach}}(my\_cache-\/>accounts,\ \_my\_cache\_account\_free\_cb,\ NULL);}
\DoxyCodeLine{00263\ \ \ \ \mbox{\hyperlink{group__Eina__Hash__Group_ga76829f09c99852b1536efc813d99fc78}{eina\_hash\_free}}(my\_cache-\/>accounts);}
\DoxyCodeLine{00264\ \ \ \ free(my\_cache);}
\DoxyCodeLine{00265\ \}\ \textcolor{comment}{/*\ \_my\_cache\_free\ */}}
\DoxyCodeLine{00266\ }
\DoxyCodeLine{00267\ \textcolor{keyword}{static}\ My\_Account\ *}
\DoxyCodeLine{00268\ \_my\_cache\_account\_find(My\_Cache\ \ \ *my\_cache,}
\DoxyCodeLine{00269\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *name)}
\DoxyCodeLine{00270\ \{}
\DoxyCodeLine{00271\ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Hash__Group_ga6e9dc02a249e1fcdb64e38e7dc47afb3}{eina\_hash\_find}}(my\_cache-\/>accounts,\ name);}
\DoxyCodeLine{00272\ \}\ \textcolor{comment}{/*\ \_my\_cache\_account\_find\ */}}
\DoxyCodeLine{00273\ }
\DoxyCodeLine{00274\ \textcolor{keyword}{static}\ My\_Cache\ *}
\DoxyCodeLine{00275\ \_my\_cache\_load(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *filename)}
\DoxyCodeLine{00276\ \{}
\DoxyCodeLine{00277\ \ \ \ My\_Cache\ *my\_cache;}
\DoxyCodeLine{00278\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}}\ *ef\ =\ \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(filename,\ \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81}{EET\_FILE\_MODE\_READ}});}
\DoxyCodeLine{00279\ \ \ \ \textcolor{keywordflow}{if}\ (!ef)}
\DoxyCodeLine{00280\ \ \ \ \ \ \{}
\DoxyCodeLine{00281\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ open\ '\%s'\ for\ read\(\backslash\)n"{}},\ filename);}
\DoxyCodeLine{00282\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{00283\ \ \ \ \ \ \}}
\DoxyCodeLine{00284\ }
\DoxyCodeLine{00285\ \ \ \ my\_cache\ =\ \mbox{\hyperlink{group__Eet__Data__Group_ga4c09f4dfb051baabc0c0551ea98b6830}{eet\_data\_read}}(ef,\ \_my\_cache\_descriptor,\ MY\_CACHE\_FILE\_ENTRY);}
\DoxyCodeLine{00286\ \ \ \ \textcolor{keywordflow}{if}\ (!my\_cache)}
\DoxyCodeLine{00287\ \ \ \ \ \ \{}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ NULL;}
\DoxyCodeLine{00290\ \ \ \ \ \ \}}
\DoxyCodeLine{00291\ }
\DoxyCodeLine{00292\ \ \ \ \textcolor{keywordflow}{if}\ (my\_cache-\/>version\ <\ 1)}
\DoxyCodeLine{00293\ \ \ \ \ \ \{}
\DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ fprintf(stderr,}
\DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}WARNING:\ version\ \%\#x\ was\ too\ old,\ upgrading\ it\ to\ \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{00296\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ my\_cache-\/>version,\ 1);}
\DoxyCodeLine{00297\ }
\DoxyCodeLine{00298\ \ \ \ \ \ \ \ \ my\_cache-\/>version\ =\ 1;}
\DoxyCodeLine{00299\ \ \ \ \ \ \}}
\DoxyCodeLine{00300\ }
\DoxyCodeLine{00301\ \ \ \ \textcolor{keywordflow}{if}\ (\_my\_cache\_file)}
\DoxyCodeLine{00302\ \ \ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(\_my\_cache\_file);}
\DoxyCodeLine{00303\ }
\DoxyCodeLine{00304\ \ \ \ \_my\_cache\_file\ =\ ef;}
\DoxyCodeLine{00305\ \ \ \ \_my\_cache\_dict\ =\ \mbox{\hyperlink{group__Eet__File__Group_gabac3fef94bb732840b9ac9cc2917c4c6}{eet\_dictionary\_get}}(ef);}
\DoxyCodeLine{00306\ }
\DoxyCodeLine{00307\ \ \ \ \textcolor{keywordflow}{return}\ my\_cache;}
\DoxyCodeLine{00308\ \}\ \textcolor{comment}{/*\ \_my\_cache\_load\ */}}
\DoxyCodeLine{00309\ }
\DoxyCodeLine{00310\ \textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{00311\ \_my\_cache\_save(\textcolor{keyword}{const}\ My\_Cache\ *my\_cache,}
\DoxyCodeLine{00312\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ \ \ \ \ *filename)}
\DoxyCodeLine{00313\ \{}
\DoxyCodeLine{00314\ \ \ \ \textcolor{keywordtype}{char}\ tmp[PATH\_MAX];}
\DoxyCodeLine{00315\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga8d9779184a9870c1a225f1f40c76e8a7}{Eet\_File}}\ *ef;}
\DoxyCodeLine{00316\ \ \ \ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}\ ret;}
\DoxyCodeLine{00317\ \ \ \ \textcolor{keywordtype}{unsigned}\ \textcolor{keywordtype}{int}\ i,\ len;}
\DoxyCodeLine{00318\ \ \ \ \textcolor{keyword}{struct\ }stat\ st;}
\DoxyCodeLine{00319\ }
\DoxyCodeLine{00320\ \ \ \ len\ =\ \mbox{\hyperlink{group__Eina__String__Group_gae28caa0c42c4e76ae584f22bd3615723}{eina\_strlcpy}}(tmp,\ filename,\ \textcolor{keyword}{sizeof}(tmp));}
\DoxyCodeLine{00321\ \ \ \ \textcolor{keywordflow}{if}\ (len\ +\ 12\ >=\ (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(tmp))}
\DoxyCodeLine{00322\ \ \ \ \ \ \{}
\DoxyCodeLine{00323\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ file\ name\ is\ too\ big:\ \%s\(\backslash\)n"{}},\ filename);}
\DoxyCodeLine{00324\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{00325\ \ \ \ \ \ \}}
\DoxyCodeLine{00326\ }
\DoxyCodeLine{00327\ \ \ \ i\ =\ 0;}
\DoxyCodeLine{00328\ \ \ \ \textcolor{keywordflow}{do}}
\DoxyCodeLine{00329\ \ \ \ \ \ \{}
\DoxyCodeLine{00330\ \ \ \ \ \ \ \ \ snprintf(tmp\ +\ len,\ 12,\ \textcolor{stringliteral}{"{}.\%u"{}},\ i);}
\DoxyCodeLine{00331\ \ \ \ \ \ \ \ \ i++;}
\DoxyCodeLine{00332\ \ \ \ \ \ \}}
\DoxyCodeLine{00333\ \ \ \ \textcolor{keywordflow}{while}\ (stat(tmp,\ \&st)\ ==\ 0);}
\DoxyCodeLine{00334\ }
\DoxyCodeLine{00335\ \ \ \ ef\ =\ \mbox{\hyperlink{group__Eet__File__Group_ga675160a758832ee812edf7f64ed30ee6}{eet\_open}}(tmp,\ \mbox{\hyperlink{group__Eet__File__Group_ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9}{EET\_FILE\_MODE\_WRITE}});}
\DoxyCodeLine{00336\ \ \ \ \textcolor{keywordflow}{if}\ (!ef)}
\DoxyCodeLine{00337\ \ \ \ \ \ \{}
\DoxyCodeLine{00338\ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ could\ not\ open\ '\%s'\ for\ write\(\backslash\)n"{}},\ tmp);}
\DoxyCodeLine{00339\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{00340\ \ \ \ \ \ \}}
\DoxyCodeLine{00341\ }
\DoxyCodeLine{00342\ \ \ \ ret\ =\ \mbox{\hyperlink{group__Eet__Data__Group_gac66d1c49e3490bc5d803982d833ff8aa}{eet\_data\_write}}}
\DoxyCodeLine{00343\ \ \ \ \ \ \ \ (ef,\ \_my\_cache\_descriptor,\ MY\_CACHE\_FILE\_ENTRY,\ my\_cache,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{00344\ }
\DoxyCodeLine{00345\ \ \ \ \textcolor{comment}{//\ VERY\ IMPORTANT\ NOTE:}}
\DoxyCodeLine{00346\ \ \ \ \textcolor{comment}{//\ after\ eet\_close(),\ all\ strings\ mmaped\ from\ file\ will\ be\ GONE,\ invalid!}}
\DoxyCodeLine{00347\ \ \ \ \textcolor{comment}{//\ you'll\ need\ to\ free\ the\ old\ cache\ and\ open\ the\ new\ one.}}
\DoxyCodeLine{00348\ \ \ \ \textcolor{comment}{//\ For\ cache\ this\ is\ okay,\ as\ you\ should\ be\ saving\ not\ so\ often\ or\ just}}
\DoxyCodeLine{00349\ \ \ \ \textcolor{comment}{//\ at\ end.}}
\DoxyCodeLine{00350\ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{00351\ \ \ \ \textcolor{comment}{//\ This\ is\ a\ trade\ off,\ you\ save\ memory\ by\ using\ mmap()ed\ strings,\ but}}
\DoxyCodeLine{00352\ \ \ \ \textcolor{comment}{//\ you\ have\ to\ care\ about\ this.}}
\DoxyCodeLine{00353\ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(ef);}
\DoxyCodeLine{00354\ }
\DoxyCodeLine{00355\ \ \ \ \textcolor{keywordflow}{if}\ (ret)}
\DoxyCodeLine{00356\ \ \ \ \ \ \{}
\DoxyCodeLine{00357\ \ \ \ \ \ \ \ \ unlink(filename);}
\DoxyCodeLine{00358\ \ \ \ \ \ \ \ \ rename(tmp,\ filename);}
\DoxyCodeLine{00359\ \ \ \ \ \ \}}
\DoxyCodeLine{00360\ }
\DoxyCodeLine{00361\ \ \ \ \textcolor{keywordflow}{return}\ ret;}
\DoxyCodeLine{00362\ \}\ \textcolor{comment}{/*\ \_my\_cache\_save\ */}}
\DoxyCodeLine{00363\ }
\DoxyCodeLine{00364\ \textcolor{keywordtype}{int}}
\DoxyCodeLine{00365\ main(\textcolor{keywordtype}{int}\ \ \ argc,}
\DoxyCodeLine{00366\ \ \ \ \ \ \textcolor{keywordtype}{char}\ *argv[])}
\DoxyCodeLine{00367\ \{}
\DoxyCodeLine{00368\ \ \ \ My\_Cache\ *my\_cache;}
\DoxyCodeLine{00369\ \ \ \ \mbox{\hyperlink{struct__Eina__Iterator}{Eina\_Iterator}}\ *it;}
\DoxyCodeLine{00370\ \ \ \ My\_Account\ *acc;}
\DoxyCodeLine{00371\ \ \ \ \textcolor{keywordtype}{int}\ ret\ =\ 0;}
\DoxyCodeLine{00372\ }
\DoxyCodeLine{00373\ \ \ \ \textcolor{keywordflow}{if}\ (argc\ <\ 3)}
\DoxyCodeLine{00374\ \ \ \ \ \ \{}
\DoxyCodeLine{00375\ \ \ \ \ \ \ \ \ fprintf(stderr,}
\DoxyCodeLine{00376\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Usage:\(\backslash\)n\(\backslash\)t\%s\ <input>\ <output>\ [action]\ [action-\/params]\(\backslash\)n\(\backslash\)n"{}}}
\DoxyCodeLine{00377\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}Where\ actions\ and\ their\ parameters:\(\backslash\)n"{}}}
\DoxyCodeLine{00378\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tacc\ <name>\(\backslash\)n"{}}}
\DoxyCodeLine{00379\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tpost\ <account-\/name>\ <message>\(\backslash\)n"{}}}
\DoxyCodeLine{00380\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tmessage\ <account-\/name>\ <message>\(\backslash\)n"{}}}
\DoxyCodeLine{00381\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)n"{}},}
\DoxyCodeLine{00382\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ argv[0]);}
\DoxyCodeLine{00383\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ -\/1;}
\DoxyCodeLine{00384\ \ \ \ \ \ \}}
\DoxyCodeLine{00385\ }
\DoxyCodeLine{00386\ \ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\_init}}();}
\DoxyCodeLine{00387\ \ \ \ \mbox{\hyperlink{group__Eet__Group_ga9903687bfa20fe9a9e59d4c1d213e89a}{eet\_init}}();}
\DoxyCodeLine{00388\ \ \ \ \_my\_cache\_descriptor\_init();}
\DoxyCodeLine{00389\ }
\DoxyCodeLine{00390\ \ \ \ my\_cache\ =\ \_my\_cache\_load(argv[1]);}
\DoxyCodeLine{00391\ \ \ \ \textcolor{keywordflow}{if}\ (!my\_cache)}
\DoxyCodeLine{00392\ \ \ \ \ \ \{}
\DoxyCodeLine{00393\ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}creating\ new\ cache.\(\backslash\)n"{}});}
\DoxyCodeLine{00394\ \ \ \ \ \ \ \ \ my\_cache\ =\ \_my\_cache\_new();}
\DoxyCodeLine{00395\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!my\_cache)}
\DoxyCodeLine{00396\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00397\ \ \ \ \ \ \ \ \ \ \ \ \ \ ret\ =\ -\/2;}
\DoxyCodeLine{00398\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{goto}\ end;}
\DoxyCodeLine{00399\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00400\ \ \ \ \ \ \}}
\DoxyCodeLine{00401\ }
\DoxyCodeLine{00402\ \ \ \ \textcolor{keywordflow}{if}\ (argc\ >\ 3)}
\DoxyCodeLine{00403\ \ \ \ \ \ \{}
\DoxyCodeLine{00404\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (strcmp(argv[3],\ \textcolor{stringliteral}{"{}acc"{}})\ ==\ 0)}
\DoxyCodeLine{00405\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00406\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (argc\ ==\ 5)}
\DoxyCodeLine{00407\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00408\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ My\_Account\ *acc\_\ =\ \_my\_cache\_account\_find(my\_cache,\ argv[4]);}
\DoxyCodeLine{00409\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!acc\_)}
\DoxyCodeLine{00410\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00411\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ acc\_\ =\ \_my\_account\_new(argv[4]);}
\DoxyCodeLine{00412\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eina__Hash__Group_ga84a3b957ede675cb03f3c344695c1282}{eina\_hash\_direct\_add}}(my\_cache-\/>accounts,\ acc\_-\/>name,\ acc\_);}
\DoxyCodeLine{00413\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00414\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00415\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ account\ '\%s'\ already\ exists.\(\backslash\)n"{}},}
\DoxyCodeLine{00416\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ argv[4]);}
\DoxyCodeLine{00417\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00418\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00419\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,}
\DoxyCodeLine{00420\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}ERROR:\ wrong\ number\ of\ parameters\ (\%d).\(\backslash\)n"{}},}
\DoxyCodeLine{00421\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ argc);}
\DoxyCodeLine{00422\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00423\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (strcmp(argv[3],\ \textcolor{stringliteral}{"{}post"{}})\ ==\ 0)}
\DoxyCodeLine{00424\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00425\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (argc\ ==\ 6)}
\DoxyCodeLine{00426\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00427\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ My\_Account\ *acc\_\ =\ \_my\_cache\_account\_find(my\_cache,\ argv[4]);}
\DoxyCodeLine{00428\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (acc\_)}
\DoxyCodeLine{00429\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00430\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_my\_post\_add(acc\_,\ argv[5]);}
\DoxyCodeLine{00431\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00432\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00433\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ unknown\ account:\ '\%s'\(\backslash\)n"{}},\ argv[4]);}
\DoxyCodeLine{00434\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00435\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00436\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,}
\DoxyCodeLine{00437\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}ERROR:\ wrong\ number\ of\ parameters\ (\%d).\(\backslash\)n"{}},}
\DoxyCodeLine{00438\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ argc);}
\DoxyCodeLine{00439\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00440\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (strcmp(argv[3],\ \textcolor{stringliteral}{"{}message"{}})\ ==\ 0)}
\DoxyCodeLine{00441\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00442\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (argc\ ==\ 6)}
\DoxyCodeLine{00443\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00444\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ My\_Account\ *acc\_\ =\ \_my\_cache\_account\_find(my\_cache,\ argv[4]);}
\DoxyCodeLine{00445\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (acc\_)}
\DoxyCodeLine{00446\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00447\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ My\_Message\ *msg\ =\ \_my\_message\_new(argv[5]);}
\DoxyCodeLine{00448\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ acc\_-\/>messages\ =\ \mbox{\hyperlink{group__Eina__List__Group_ga625698a383dda8fc0db245a1c7608c49}{eina\_list\_append}}(acc\_-\/>messages,\ msg);}
\DoxyCodeLine{00449\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00450\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00451\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ unknown\ account:\ '\%s'\(\backslash\)n"{}},\ argv[4]);}
\DoxyCodeLine{00452\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00453\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00454\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,}
\DoxyCodeLine{00455\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}ERROR:\ wrong\ number\ of\ parameters\ (\%d).\(\backslash\)n"{}},}
\DoxyCodeLine{00456\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ argc);}
\DoxyCodeLine{00457\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00458\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00459\ \ \ \ \ \ \ \ \ \ \ fprintf(stderr,\ \textcolor{stringliteral}{"{}ERROR:\ unknown\ action\ '\%s'\(\backslash\)n"{}},\ argv[2]);}
\DoxyCodeLine{00460\ \ \ \ \ \ \}}
\DoxyCodeLine{00461\ }
\DoxyCodeLine{00462\ \ \ \ printf(\textcolor{stringliteral}{"{}My\_Cache:\(\backslash\)n"{}}}
\DoxyCodeLine{00463\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)tversion.:\ \%\#x\(\backslash\)n"{}}}
\DoxyCodeLine{00464\ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\(\backslash\)taccounts:\ \%u\(\backslash\)n"{}},}
\DoxyCodeLine{00465\ \ \ \ \ \ \ \ \ \ \ my\_cache-\/>version,}
\DoxyCodeLine{00466\ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eina__Hash__Group_ga4bdeb2a1699703c62db697f229efe32d}{eina\_hash\_population}}(my\_cache-\/>accounts));}
\DoxyCodeLine{00467\ \ \ \ it\ =\ \mbox{\hyperlink{group__Eina__Hash__Group_ga1fa6b5d170d65706416bfb1446d7b1b8}{eina\_hash\_iterator\_data\_new}}(my\_cache-\/>accounts);}
\DoxyCodeLine{00468\ \ \ \ \mbox{\hyperlink{group__Eina__Iterator__Group_gac7314580e18868ef229f5d2814562794}{EINA\_ITERATOR\_FOREACH}}(it,\ acc)}
\DoxyCodeLine{00469\ \ \ \ \ \ \{}
\DoxyCodeLine{00470\ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)t\ \ >\ \%-\/\#8x\ '\%.20s'\ stats:\ m=\%u,\ p=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{00471\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ acc-\/>id,\ acc-\/>name\ ?\ acc-\/>name\ :\ \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{00472\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ eina\_list\_count(acc-\/>messages),}
\DoxyCodeLine{00473\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ acc-\/>posts\_count);}
\DoxyCodeLine{00474\ }
\DoxyCodeLine{00475\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (eina\_list\_count(acc-\/>messages))}
\DoxyCodeLine{00476\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00477\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ *l;}
\DoxyCodeLine{00478\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ My\_Message\ *msg;}
\DoxyCodeLine{00479\ \ \ \ \ \ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)t\ \ |messages:\(\backslash\)n"{}});}
\DoxyCodeLine{00480\ }
\DoxyCodeLine{00481\ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(acc-\/>messages,\ l,\ msg)}
\DoxyCodeLine{00482\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00483\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)t\ \ |\ \ \ \%-\/8x\ '\%s'\ [\%s]:\ '\%.20s'\(\backslash\)n"{}},}
\DoxyCodeLine{00484\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ msg-\/>id,}
\DoxyCodeLine{00485\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ msg-\/>name\ ?\ msg-\/>name\ :\ \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{00486\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ msg-\/>screen\_name\ ?\ msg-\/>screen\_name\ :\ \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{00487\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ msg-\/>message\ ?\ msg-\/>message\ :\ \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{00488\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00489\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00490\ }
\DoxyCodeLine{00491\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (acc-\/>posts\_count)}
\DoxyCodeLine{00492\ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00493\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ My\_Post\ *post;}
\DoxyCodeLine{00494\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ i;}
\DoxyCodeLine{00495\ \ \ \ \ \ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)t\ \ |posts:\(\backslash\)n"{}});}
\DoxyCodeLine{00496\ }
\DoxyCodeLine{00497\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (i\ =\ 0;\ i\ <\ acc-\/>posts\_count;\ i++)}
\DoxyCodeLine{00498\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00499\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ post\ =\ \&acc-\/>posts[i];}
\DoxyCodeLine{00500\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (post-\/>dm\_to)}
\DoxyCodeLine{00501\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)t\ \ |\ \ @\%s:\ '\%.20s'\(\backslash\)n"{}},\ post-\/>dm\_to,\ post-\/>message);}
\DoxyCodeLine{00502\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{00503\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)t\ \ |\ \ '\%.20s'\(\backslash\)n"{}},\ post-\/>message);}
\DoxyCodeLine{00504\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00505\ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00506\ }
\DoxyCodeLine{00507\ \ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{00508\ \ \ \ \ \ \}}
\DoxyCodeLine{00509\ \ \ \ \mbox{\hyperlink{group__Eina__Iterator__Group_ga50da005e8d26c0a043d0d1c025bc9008}{eina\_iterator\_free}}(it);}
\DoxyCodeLine{00510\ }
\DoxyCodeLine{00511\ \ \ \ \textcolor{keywordflow}{if}\ (!\_my\_cache\_save(my\_cache,\ argv[2]))}
\DoxyCodeLine{00512\ \ \ \ \ \ ret\ =\ -\/3;}
\DoxyCodeLine{00513\ }
\DoxyCodeLine{00514\ \ \ \ \_my\_cache\_free(my\_cache);}
\DoxyCodeLine{00515\ }
\DoxyCodeLine{00516\ end:}
\DoxyCodeLine{00517\ \ \ \ \textcolor{keywordflow}{if}\ (\_my\_cache\_file)}
\DoxyCodeLine{00518\ \ \ \ \ \ \mbox{\hyperlink{group__Eet__File__Group_ga1675fef1f6012c1e02ae313d13dc3e03}{eet\_close}}(\_my\_cache\_file);}
\DoxyCodeLine{00519\ \ \ \ \_my\_cache\_descriptor\_shutdown();}
\DoxyCodeLine{00520\ \ \ \ \mbox{\hyperlink{group__Eet__Group_gacbc7583179399d3b3e7b003e911f866f}{eet\_shutdown}}();}
\DoxyCodeLine{00521\ \ \ \ \mbox{\hyperlink{group__Eina__Main__Group_ga5bf35513199d5220341437c05696285d}{eina\_shutdown}}();}
\DoxyCodeLine{00522\ }
\DoxyCodeLine{00523\ \ \ \ \textcolor{keywordflow}{return}\ ret;}
\DoxyCodeLine{00524\ \}\ \textcolor{comment}{/*\ main\ */}}
\DoxyCodeLine{00525\ }

\end{DoxyCodeInclude}
 