/*

This file is part of Tins IMage Viewer (timv).
Copyright (c) 2011, Martin Furter
All rights reserved.

ANY-LICENSE:
You can use this software under any license approved by the
Open Source Initiative as long as the license you choose is
compatible to the dependencies of Tins IMage Viewer (timv).

See http://www.opensource.org/licenses/ for a list of
approved licenses.

*/

#ifndef _FOTO_LIB_H_INCLUDED_
#define _FOTO_LIB_H_INCLUDED_

#include <sqlite3.h>
#include <gtk/gtk.h>

/* Some boilerplate GObject defines. 'klass' is used
 *   instead of 'class', because 'class' is a C++ keyword */

#define FOTO_LIB_TYPE            (foto_lib_get_type())
#define FOTO_LIB(obj)            (G_TYPE_CHECK_INSTANCE_CAST( (obj), FOTO_LIB_TYPE, FotoLib) )
#define FOTO_LIB_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST( (klass),  FOTO_LIB_TYPE, FotoLibClass) )
#define IS_FOTO_LIB(obj)         (G_TYPE_CHECK_INSTANCE_TYPE( (obj), FOTO_LIB_TYPE) )
#define IS_FOTO_LIB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE( (klass),  FOTO_LIB_TYPE) )
#define FOTO_LIB_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS( (obj),  FOTO_LIB_TYPE, FotoLibClass) )



typedef struct {
	/* this MUST be the first member */
	GObject         parent;

	char* path;
	char* db_filename;
	sqlite3* db;
} FotoLib;


/* FotoLibClass: more boilerplate GObject stuff */
typedef struct {
  GObjectClass parent_class;
} FotoLibClass;


GType foto_lib_get_type();
FotoLib* foto_lib_open( const char* dir );
FotoLib* foto_lib_create( const char* dir, const char* url,
		const char* user, const char* pass );

#endif /* _FOTO_LIB_H_INCLUDED_ */

