Main Module

Main Module — The main module

Synopsis

#include <rclib.h>

extern const gchar *rclib_build_date;
extern const gchar *rclib_build_time;
void                rclib_exit                          ();
gboolean            rclib_init                          (gint *argc,
                                                         gchar **argv[],
                                                         const gchar *dir,
                                                         GError **error);
extern const guint  rclib_major_version;
extern const guint  rclib_micro_version;
extern const guint  rclib_minor_version;

Description

The main module is used for general library initialization and library information access, it will initialize the core, database, player schedulor, lyric processor, and connect some signals to callbacks for update the metadata in the database. If you do not want to initialize the modules by yourself, just using function rclib_init().

Details

rclib_build_date

extern const gchar *rclib_build_date;

The build (complied) date of LibRhythmCat.


rclib_build_time

extern const gchar *rclib_build_time;

The build (complied) time of LibRhythmCat.


rclib_exit ()

void                rclib_exit                          ();

Exit and unload the library.


rclib_init ()

gboolean            rclib_init                          (gint *argc,
                                                         gchar **argv[],
                                                         const gchar *dir,
                                                         GError **error);

Initialize the library, please call this function before using any other library functions. If you want to initialize the library by yourself, you should call the initializion function in each module.

argc :

address of the argc parameter of your main() function (or 0 if argv is NULL). This will be changed if any arguments were handled. [inout]

argv :

address of the argv parameter of main(), or NULL. [array length=argc][inout][allow-none]

dir :

the directory of the user data

error :

return location for a GError, or NULL

Returns :

Whether the initializion succeeded.

rclib_major_version

extern const guint rclib_major_version;

The major version of LibRhythmCat.


rclib_micro_version

extern const guint rclib_micro_version;

The micro version of LibRhythmCat.


rclib_minor_version

extern const guint rclib_minor_version;

The minor version of LibRhythmCat.