LsmLib

API


LsmTree *LsmTree_new (int in_withContent);

LsmTree *LsmTree_newFromLsmXmlFile (char *in_lsmXmlFile);

LsmTree *LsmTree_newFromLsmXmlStream (char *in_lsmXmlStream);

LsmTree *LsmTree_newFromLsmXmlDocPtr (xmlDocPtr in_lsmXmlDocPtr);

LsmTree *LsmTree_newFromLsmXmlNodePtr (xmlNodePtr in_lsmXmlNodePtr);

LsmTree *LsmTree_newFromDirectory (char *in_directory, int in_withContent);


int LsmTree_toLsmXmlFile (LsmTree * self, char *in_lsmXmlFile);

int LsmTree_toLsmXmlStream (LsmTree * self, char **out_lsmXmlStream);

int LsmTree_toLsmXmlDocPtr (LsmTree * self, xmlDocPtr * out_lsmXmlDocPtr);

int LsmTree_toLsmXmlNodePtr (LsmTree * self, xmlNodePtr * out_lsmXmlNodePtr);

int LsmTree_toDirectory (LsmTree * self, char *in_directory);

int LsmTree_destroy (LsmTree * self);


int LsmTree_Export_toHTML (LsmTree * self, char **out_htmlStream);

int LsmTree_Export_toHTMLFile (LsmTree * self, char *in_HTMLFile);

int LsmTree_Export_toHTMLNode (LsmTree * self, xmlNodePtr * out_HTMLNode);

int LsmTree_Export_toString (LsmTree * self, char **out_string);

int LsmTree_Export_toStringOnStdout (LsmTree * self);



int LsmTree_VFS_saveFileAt (LsmTree * self, char *in_file, char *in_at);

int
LsmTree_VFS_saveDirectoryAt (LsmTree * self, char *in_directory, char *in_at);

int
LsmTree_VFS_getFileAtAsStream (LsmTree * self,
                               char *in_at,
                               char **out_stream, int *out_length);



int
LsmTree_VFS_addFileAt (LsmTree * self,
                       char *in_file,
                       char *in_at,
                       char *in_auth, char *in_owner, char *in_group);

int
LsmTree_VFS_addDirectoryAt (LsmTree * self, char *in_directory, char *in_at);

int
LsmTree_VFS_addStreamAsFileAt (LsmTree * self,
                               char *in_stream,
                               int in_streamLength,
                               char *in_at,
                               char *in_auth, char *in_owner, char *in_group);

// begin TODO
int
LsmTree_VFS_insertAnotherLsmTreeAt (LsmTree * self,
                                    LsmTree * anotherLsmTree, char *in_at);

// end TODO

int LsmTree_VFS_setDefaultAuth (LsmTree * self, char *in_defaultAuth);

int LsmTree_VFS_getDefaultAuth (LsmTree * self, char **out_defaultAuth);

int LsmTree_VFS_setDefaultOwner (LsmTree * self, char *in_defaultOwner);

int LsmTree_VFS_getDefaultOwner (LsmTree * self, char **out_defaultOwner);

int LsmTree_VFS_setDefaultGroup (LsmTree * self, char *in_defaultGroup);

int LsmTree_VFS_getDefaultGroup (LsmTree * self, char **out_defaultGroup);


int
LsmBase64_encodeFromFile (char *in_file, char **out_dest, int *out_destSize);
int
LsmBase64_encodeFromStream (char *in_stream,
                            int in_streamLength,
                            char **out_dest, int *out_destSize);

int LsmBase64_decodeToFile (char *in_src, char *in_file);



int
LsmBase64_decodeToStream (char *in_src,
                          char **out_stream, int *out_streamLength);


int LsmTree_Sync_file2Lsm (LsmTree * self, char *in_file, char *in_prefix);
// in_prefix can be NULL

int
LsmTree_Sync_directory2Lsm (LsmTree * self,
                            char *in_directory, char *in_prefix);

int LsmTree_Sync_lsm2File (LsmTree * self, char *in_file, char *in_prefix);

int
LsmTree_Sync_lsm2Directory (LsmTree * self,
                            char *in_directory, char *in_prefix);