DhBookListDirectory

DhBookListDirectory — Subclass of DhBookList containing the DhBook's in one directory

Functions

Properties

GFile * directory Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── DhBookList
        ╰── DhBookListDirectory

Includes

#include <devhelp/devhelp.h>

Description

DhBookListDirectory is a subclass of DhBookList containing the DhBook's in “directory”. In that directory, each book must be in a direct sub-directory, with the Devhelp index file as a direct child of that sub-directory.

For example if “directory” is "/usr/share/gtk-doc/html/", and if there is an index file at "/usr/share/gtk-doc/html/glib/glib.devhelp2", DhBookListDirectory will contain a DhBook for that index file.

Additionally the name of (1) the sub-directory and (2) the index file minus its extension, must match ("glib" in the example).

See DhBook for the list of allowed Devhelp index file extensions ("*.devhelp2" in the example).

DhBookListDirectory listens to the DhBook “deleted” and “updated” signals, to remove the DhBook or to re-create it. And DhBookListDirectory contains a GFileMonitor on the “directory” to add new DhBook's when they are installed. But note that those GFileMonitor's are not guaranteed to work perfectly, recreating the DhBookListDirectory (or restarting the application) may be needed to see all the index files after filesystem changes in “directory”.

Functions

dh_book_list_directory_new ()

DhBookListDirectory *
dh_book_list_directory_new (GFile *directory);

Returns a DhBookListDirectory for directory .

If a DhBookListDirectory instance is still alive for directory (according to g_file_equal()), the same instance is returned with the reference count increased by one, to avoid data duplication. If no DhBookListDirectory instance already exists for directory , this function returns a new instance with a reference count of one (so it's the responsibility of the caller to keep the object alive if wanted, to avoid destroying and re-creating the same DhBookListDirectory repeatedly).

Parameters

directory

the “directory”.

 

Returns

a DhBookListDirectory for directory .

[transfer full]

Since: 3.30


dh_book_list_directory_get_directory ()

GFile *
dh_book_list_directory_get_directory (DhBookListDirectory *list_directory);

Parameters

list_directory

a DhBookListDirectory.

 

Returns

the “directory”.

[transfer none]

Since: 3.30

Types and Values

struct DhBookListDirectory

struct DhBookListDirectory;

Property Details

The “directory” property

  “directory”                GFile *

The directory, as a GFile, containing a set of Devhelp books.

Flags: Read / Write / Construct Only

Since: 3.30