database-plain.h 1.38 KB
Newer Older
1
/* SPDX-License-Identifier: Zlib */
2 3 4 5 6 7 8

#ifndef ZATHURA_DATABASE_PLAIN_H
#define ZATHURA_DATABASE_PLAIN_H

#include "database.h"

#define ZATHURA_TYPE_PLAINDATABASE \
Sebastian Ramacher's avatar
Sebastian Ramacher committed
9
  (zathura_plaindatabase_get_type())
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#define ZATHURA_PLAINDATABASE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), ZATHURA_TYPE_PLAINDATABASE, ZathuraPlainDatabase))
#define ZATHURA_IS_PLAINDATABASE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZATHURA_TYPE_PLAINDATABASE))
#define ZATHURA_PLAINDATABASE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), ZATHURA_TYPE_PLAINDATABASE, ZathuraPlainDatabaseClass))
#define ZATHURA_IS_PLAINDATABASE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), ZATHURA_TYPE_PLAINDATABASE))
#define ZATHURA_PLAINDATABASE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), ZATHURA_TYPE_PLAINDATABASE, ZathuraPlainDatabaseClass))

typedef struct _ZathuraPlainDatabase        ZathuraPlainDatabase;
typedef struct _ZathuraPlainDatabaseClass   ZathuraPlainDatabaseClass;

struct _ZathuraPlainDatabase
{
  GObject parent_instance;
};

struct _ZathuraPlainDatabaseClass
{
  GObjectClass parent_class;
};

34
GType zathura_plaindatabase_get_type(void) G_GNUC_CONST;
35 36 37 38 39 40 41 42 43
/**
 * Initialize database system.
 *
 * @param dir Path to the directory where the database file should be located.
 * @return A valid zathura_database_t instance or NULL on failure
 */
zathura_database_t* zathura_plaindatabase_new(const char* dir);

#endif