All pastes #165624 Raw Edit

mos

public c v1 · immutable
·published 2006-09-10 00:52 UTC
rendered paste body
ifndef _EPHOTO_DATABASE_H_#define _EPHOTO_DATABASE_H_#include <stdio.h>#include <stdlib.h>#include <sqlite3.h>sqlite3 *ephoto_db_init(void);//constructorvoid ephoto_db_destroy(sqlite3 *);//destructorint ephoto_db_add_album(sqlite3 *,char []);//create a new album//(db,"albumanme")//returns 1 on failureint ephoto_db_add_file(sqlite3 *,char [], char []);//add a thumb to an album//(db,"albumname","/path/to/thumb")//returns 1 on failureint ephoto_db_remove_album(sqlite3 *,char *);//remove an album from the database//will dissasociate all files with it//(db,"albumanme")//returns 1 on failureint ephoto_db_remove_file(sqlite3 *,char *,char *);//dissasociate a file from a specific album or "ALL"//(db,"albumanme","/path/to/file")//pass albumname = "ALL" to dissasociate a file from all albums, removing all knowlege of it from the database//returns 1 on failureEcore_List ephoto_db_read(sqlite3 *);#endif