DhBookManager: Devhelp Reference Manual

## DhBookManager DhBookManager |

## Functions

DhBookManager * | dh_book_manager_new ()
void | dh_book_manager_populate ()
GList * | dh_book_manager_get_books ()
GList * | dh_book_manager_get_languages ()
gboolean | dh_book_manager_get_group_by_language ()
void | dh_book_manager_set_group_by_language ()

## Properties

gboolean | group-by-language | Read / Write

## Signals

void | book-created | Run Last
void | book-deleted | Run Last
void | book-disabled | Run Last
void | book-enabled | Run Last
void | language-disabled | Run Last
void | language-enabled | Run Last

## Types and Values

struct | DhBookManager
struct | DhBookManagerClass

## Object Hierarchy

        GObject
        ╰── DhBookManager

## Description

## Functions

### dh_book_manager_new ()

    DhBookManager *
    dh_book_manager_new (void);

Create a new DhBookManager object.

#### Returns

a new DhBookManager object

### dh_book_manager_populate ()

    void
    dh_book_manager_populate (DhBookManager *book_manager);

Populate the DhBookManager with all books found on the system and user directories.

#### Parameters

book_manager | a DhBookManager object |

### dh_book_manager_get_books ()

    GList *
    dh_book_manager_get_books (DhBookManager *book_manager);

Get the GList of books.

#### Parameters

book_manager | a DhBookManager object |

#### Returns

the books.

[element-type DhBook][transfer none]

### dh_book_manager_get_languages ()

    GList *
    dh_book_manager_get_languages (DhBookManager *book_manager);

`dh_book_manager_get_languages` has been deprecated since version 3.18 and should not be used in newly-written code.

Not used anywhere

Get the GList of languages.

#### Parameters

book_manager | a DhBookManager object |

#### Returns

the list of languages.

[element-type DhLanguage][transfer none]

### dh_book_manager_get_group_by_language ()

    gboolean
    dh_book_manager_get_group_by_language (DhBookManager *book_manager);

Get whether books should be grouped by language.

#### Parameters

book_manager | a DhBookManager object |

#### Returns

`TRUE` if books should be grouped by language, `FALSE` otherwise

### dh_book_manager_set_group_by_language ()

    void
    dh_book_manager_set_group_by_language (DhBookManager *book_manager,
                                           gboolean group_by_language);

Set whether books should be grouped by language.

#### Parameters

book_manager | a DhBookManager object |
group_by_language | `TRUE` if books should be grouped by language, `FALSE` otherwise |

## Types and Values

### struct DhBookManager

    struct DhBookManager;

### struct DhBookManagerClass

    struct DhBookManagerClass {
            GObjectClass parent_class;
    };

## Property Details

### The `“group-by-language”` property

      “group-by-language”        gboolean

TRUE if books should be grouped by language.

Flags: Read / Write

Default value: FALSE

## Signal Details

### The `“book-created”` signal

    void
    user_function (DhBookManager *book_manager,
                   GObject       *book,
                   gpointer       user_data)

#### Parameters

book_manager | the book manager on which the signal is emitted |
book | the created book. | [type DhBook]
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“book-deleted”` signal

    void
    user_function (DhBookManager *book_manager,
                   GObject       *book,
                   gpointer       user_data)

#### Parameters

book_manager | the book manager on which the signal is emitted |
book | the deleted book. | [type DhBook]
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“book-disabled”` signal

    void
    user_function (DhBookManager *book_manager,
                   GObject       *book,
                   gpointer       user_data)

#### Parameters

book_manager | the book manager on which the signal is emitted |
book | the disabled book. | [type DhBook]
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“book-enabled”` signal

    void
    user_function (DhBookManager *book_manager,
                   GObject       *book,
                   gpointer       user_data)

#### Parameters

book_manager | the book manager on which the signal is emitted |
book | the enabled book. | [type DhBook]
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“language-disabled”` signal

    void
    user_function (DhBookManager *book_manager,
                   gchar         *language_name,
                   gpointer       user_data)

#### Parameters

book_manager | the book manager on which the signal is emitted |
language_name | the disabled language name |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“language-enabled”` signal

    void
    user_function (DhBookManager *book_manager,
                   gchar         *language_name,
                   gpointer       user_data)

#### Parameters

book_manager | the book manager on which the signal is emitted |
language_name | the enabled language name |
user_data | user data set when the signal handler was connected. |

Flags: Run Last