[tracker] libtracker-miner: Document missing APIs
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Document missing APIs
- Date: Thu, 11 Dec 2014 20:24:23 +0000 (UTC)
commit ebfac417e719c77db0a39c8ac7eefd18d13f5ddb
Author: Martyn Russell <martyn lanedo com>
Date: Thu Dec 11 20:23:40 2014 +0000
libtracker-miner: Document missing APIs
.../libtracker-miner/libtracker-miner-docs.sgml | 1 -
.../libtracker-miner/libtracker-miner-sections.txt | 8 +-
src/libtracker-miner/tracker-decorator.c | 90 ++++++++++++----
src/libtracker-miner/tracker-decorator.h | 3 +-
src/libtracker-miner/tracker-indexing-tree.c | 113 +++++++++++++++++++-
src/libtracker-miner/tracker-miner-object.h | 46 ++++++++
src/libtracker-miner/tracker-miner-online.c | 39 +++++++
src/libtracker-miner/tracker-miner-online.h | 9 ++-
8 files changed, 278 insertions(+), 31 deletions(-)
---
diff --git a/docs/reference/libtracker-miner/libtracker-miner-docs.sgml
b/docs/reference/libtracker-miner/libtracker-miner-docs.sgml
index 6d19210..456ba24 100644
--- a/docs/reference/libtracker-miner/libtracker-miner-docs.sgml
+++ b/docs/reference/libtracker-miner/libtracker-miner-docs.sgml
@@ -31,7 +31,6 @@
<chapter>
<title>Basics and foundations</title>
<xi:include href="xml/tracker-miner-enums.xml"/>
- <xi:include href="xml/tracker-miner-common.xml"/>
</chapter>
<chapter>
diff --git a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
index da04be1..93b0361 100644
--- a/docs/reference/libtracker-miner/libtracker-miner-sections.txt
+++ b/docs/reference/libtracker-miner/libtracker-miner-sections.txt
@@ -155,11 +155,6 @@ tracker_media_art_queue_empty
</SECTION>
<SECTION>
-<FILE>tracker-miner-common</FILE>
-TRACKER_MINER_FS_GRAPH_URN
-</SECTION>
-
-<SECTION>
<FILE>tracker-miner-enum-types</FILE>
<SUBSECTION Standard>
TRACKER_TYPE_DIRECTORY_FLAGS
@@ -261,6 +256,7 @@ tracker_miner_get_type
<SECTION>
<FILE>tracker-miner-online</FILE>
<TITLE>TrackerMinerOnline</TITLE>
+TrackerMinerOnline
TrackerMinerOnlineClass
tracker_miner_online_get_network_type
<SUBSECTION Standard>
@@ -270,7 +266,6 @@ TRACKER_MINER_ONLINE
TRACKER_MINER_ONLINE_CLASS
TRACKER_MINER_ONLINE_GET_CLASS
TRACKER_TYPE_MINER_ONLINE
-TrackerMinerOnline
tracker_miner_online_get_type
</SECTION>
@@ -293,3 +288,4 @@ TRACKER_THUMBNAILER_GET_CLASS
TRACKER_TYPE_THUMBNAILER
tracker_thumbnailer_get_type
</SECTION>
+
diff --git a/src/libtracker-miner/tracker-decorator.c b/src/libtracker-miner/tracker-decorator.c
index 28cdf4a..8991e97 100644
--- a/src/libtracker-miner/tracker-decorator.c
+++ b/src/libtracker-miner/tracker-decorator.c
@@ -99,6 +99,17 @@ static GInitableIface *parent_initable_iface;
static void tracker_decorator_initable_iface_init (GInitableIface *iface);
+/**
+ * tracker_decorator_error_quark:
+ *
+ * Quarks are used as the domain for a #GError. For all errors relating
+ * to @TrackerDecorator, you can compare the domain to the return
+ * value of this function.
+ *
+ * Returns: the @GQuark used for #GErrors related to @TrackerDecorator implementations.
+ *
+ * Since: 0.18.
+ **/
G_DEFINE_QUARK (TrackerDecoratorError, tracker_decorator_error)
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (TrackerDecorator, tracker_decorator, TRACKER_TYPE_MINER,
@@ -118,6 +129,16 @@ tracker_decorator_info_new (TrackerSparqlCursor *cursor)
return info;
}
+/**
+ * tracker_decorator_info_ref:
+ * @info: a #TrackerDecoratorInfo
+ *
+ * Increases the reference count of @info by 1.
+ *
+ * Returns: the same @info passed in, or %NULL on error.
+ *
+ * Since: 0.18.
+ **/
TrackerDecoratorInfo *
tracker_decorator_info_ref (TrackerDecoratorInfo *info)
{
@@ -125,6 +146,15 @@ tracker_decorator_info_ref (TrackerDecoratorInfo *info)
return info;
}
+/**
+ * tracker_decorator_info_unref:
+ * @info: a #TrackerDecoratorInfo
+ *
+ * Decreases the reference count of @info by 1 and frees it when the
+ * reference count reaches 0.
+ *
+ * Since: 0.18.
+ **/
void
tracker_decorator_info_unref (TrackerDecoratorInfo *info)
{
@@ -962,7 +992,7 @@ tracker_decorator_class_init (TrackerDecoratorClass *klass)
* #TrackerDecorator sees resources that are available for
* extended metadata extraction.
*
- * Since: 0.18
+ * Since: 0.18.
**/
signals[ITEMS_AVAILABLE] =
g_signal_new ("items-available",
@@ -980,7 +1010,7 @@ tracker_decorator_class_init (TrackerDecoratorClass *klass)
* #TrackerDecorator has finished extracted extended metadata
* for resources in the database.
*
- * Since: 0.18
+ * Since: 0.18.
**/
signals[FINISHED] =
g_signal_new ("finished",
@@ -1018,7 +1048,7 @@ tracker_decorator_init (TrackerDecorator *decorator)
*
* Returns: a const gchar* or #NULL if an error happened.
*
- * Since: 0.18
+ * Since: 0.18.
**/
const gchar *
tracker_decorator_get_data_source (TrackerDecorator *decorator)
@@ -1040,7 +1070,7 @@ tracker_decorator_get_data_source (TrackerDecorator *decorator)
*
* Returns: (transfer none): a const gchar** or #NULL.
*
- * Since: 0.18
+ * Since: 0.18.
**/
const gchar **
tracker_decorator_get_class_names (TrackerDecorator *decorator)
@@ -1055,11 +1085,16 @@ tracker_decorator_get_class_names (TrackerDecorator *decorator)
/**
* tracker_decorator_get_n_items:
- * @decorator: a #TrackerDecorator.
+ * @decorator: a #TrackerDecorator
+ *
+ * Get the number of items left in the queue to be processed. This
+ * indicates content that may already exist in Tracker but is waiting
+ * to be further flurished with metadata with a 2nd pass extraction or
+ * index.
*
* Returns: the number of items queued to be processed, always >= 0.
*
- * Since: 0.18
+ * Since: 0.18.
**/
guint
tracker_decorator_get_n_items (TrackerDecorator *decorator)
@@ -1082,7 +1117,7 @@ tracker_decorator_get_n_items (TrackerDecorator *decorator)
* @id is the same IDs emitted by tracker-store when the database is updated for
* consistency. For details, see the GraphUpdated signal.
*
- * Since: 0.18
+ * Since: 0.18.
**/
void
tracker_decorator_prepend_id (TrackerDecorator *decorator,
@@ -1103,7 +1138,7 @@ tracker_decorator_prepend_id (TrackerDecorator *decorator,
* queue. @id is the same IDs emitted by tracker-store when the database is
* updated for consistency. For details, see the GraphUpdated signal.
*
- * Since: 0.18
+ * Since: 0.18.
**/
void
tracker_decorator_delete_id (TrackerDecorator *decorator,
@@ -1292,7 +1327,7 @@ complete_tasks_or_query (TrackerDecorator *decorator)
* This function will give a #GError if the miner is paused at the
* time it is called.
*
- * Since: 0.18
+ * Since: 0.18.
**/
void
tracker_decorator_next (TrackerDecorator *decorator,
@@ -1341,7 +1376,7 @@ tracker_decorator_next (TrackerDecorator *decorator,
* Returns: (transfer full): a #TrackerDecoratorInfo on success or
* #NULL on error. Free with tracker_decorator_info_unref().
*
- * Since: 0.18
+ * Since: 0.18.
**/
TrackerDecoratorInfo *
tracker_decorator_next_finish (TrackerDecorator *decorator,
@@ -1355,6 +1390,18 @@ tracker_decorator_next_finish (TrackerDecorator *decorator,
return g_task_propagate_pointer (G_TASK (result), error);
}
+/**
+ * tracker_decorator_set_priority_rdf_types:
+ * @decorator: a #TrackerDecorator
+ * @rdf_types: a string array of rdf types
+ *
+ * Re-evaluate the priority queues internally to ensure that
+ * @rdf_types are handled before all other content. This is useful for
+ * applications that need their content available sooner than the
+ * standard time it would take to index content.
+ *
+ * Since: 0.18.
+ **/
void
tracker_decorator_set_priority_rdf_types (TrackerDecorator *decorator,
const gchar * const *rdf_types)
@@ -1411,7 +1458,7 @@ tracker_decorator_set_priority_rdf_types (TrackerDecorator *decorator,
*
* Returns: the URN for #TrackerDecoratorInfo on success or #NULL on error.
*
- * Since: 0.18
+ * Since: 0.18.
**/
const gchar *
tracker_decorator_info_get_urn (TrackerDecoratorInfo *info)
@@ -1429,7 +1476,7 @@ tracker_decorator_info_get_urn (TrackerDecoratorInfo *info)
*
* Returns: the URL for #TrackerDecoratorInfo on success or #NULL on error.
*
- * Since: 0.18
+ * Since: 0.18.
**/
const gchar *
tracker_decorator_info_get_url (TrackerDecoratorInfo *info)
@@ -1450,26 +1497,27 @@ tracker_decorator_info_get_url (TrackerDecoratorInfo *info)
*
* Returns: the MIME type for #TrackerDecoratorInfo on success or #NULL on error.
*
- * Since: 0.18
+ * Since: 0.18.
**/
const gchar *
tracker_decorator_info_get_mimetype (TrackerDecoratorInfo *info)
{
- g_return_val_if_fail (info != NULL, NULL);
- return info->mimetype;
+ g_return_val_if_fail (info != NULL, NULL);
+ return info->mimetype;
}
+
/**
* tracker_decorator_info_get_task:
* @info: a #TrackerDecoratorInfo.
*
- * When processing resource updates in the database, the #GTask APIs
- * are used. This function returns the particular #GTask used for
- * @info.
+ * Get the #GTask associated with retrieving extended metadata and
+ * information for a URN in Tracker.
*
- * Returns: (transfer none): the #GTask on success or #NULL on error.
+ * Returns: (transfer none): the #GTask for #TrackerDecoratorInfo on
+ * success or #NULL if there is no existing #GTask.
*
- * Since: 0.18
+ * Since: 0.18.
**/
GTask *
tracker_decorator_info_get_task (TrackerDecoratorInfo *info)
@@ -1491,7 +1539,7 @@ tracker_decorator_info_get_task (TrackerDecoratorInfo *info)
*
* Returns: (transfer none): a #TrackerSparqlBuilder on success or #NULL on error.
*
- * Since: 0.18
+ * Since: 0.18.
**/
TrackerSparqlBuilder *
tracker_decorator_info_get_sparql (TrackerDecoratorInfo *info)
diff --git a/src/libtracker-miner/tracker-decorator.h b/src/libtracker-miner/tracker-decorator.h
index 6202b41..ccb076b 100644
--- a/src/libtracker-miner/tracker-decorator.h
+++ b/src/libtracker-miner/tracker-decorator.h
@@ -42,7 +42,8 @@ typedef struct _TrackerDecoratorInfo TrackerDecoratorInfo;
/**
* TrackerDecorator:
*
- * Abstract miner object.
+ * Abstract miner object for passive extended metadata indexing, i.e.
+ * data past the basic information such as file name, size, etc.
**/
struct _TrackerDecorator {
TrackerMiner parent_instance;
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index d47326c..6d9fc37 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -264,6 +264,19 @@ tracker_indexing_tree_class_init (TrackerIndexingTreeClass *klass)
"Whether hidden resources are filtered",
FALSE,
G_PARAM_READWRITE));
+ /**
+ * TrackerIndexingTree::directory-added:
+ * @indexing_tree: a #TrackerIndexingTree
+ * @directory: a #GFile
+ *
+ * the ::directory-added signal is emitted when a new
+ * directory is added to the list of other directories which
+ * are to be considered for indexing. Typically this is
+ * signalled when the tracker_indexing_tree_add() API is
+ * called.
+ *
+ * Since: 0.14.0
+ **/
signals[DIRECTORY_ADDED] =
g_signal_new ("directory-added",
G_OBJECT_CLASS_TYPE (object_class),
@@ -273,6 +286,20 @@ tracker_indexing_tree_class_init (TrackerIndexingTreeClass *klass)
NULL, NULL,
NULL,
G_TYPE_NONE, 1, G_TYPE_FILE);
+
+ /**
+ * TrackerIndexingTree::directory-removed:
+ * @indexing_tree: a #TrackerIndexingTree
+ * @directory: a #GFile
+ *
+ * the ::directory-removed signal is emitted when a
+ * directory is removed from the list of other directories
+ * which are to be considered for indexing. Typically this is
+ * signalled when the tracker_indexing_tree_remove() API is
+ * called.
+ *
+ * Since: 0.14.0
+ **/
signals[DIRECTORY_REMOVED] =
g_signal_new ("directory-removed",
G_OBJECT_CLASS_TYPE (object_class),
@@ -282,6 +309,20 @@ tracker_indexing_tree_class_init (TrackerIndexingTreeClass *klass)
NULL, NULL,
NULL,
G_TYPE_NONE, 1, G_TYPE_FILE);
+
+ /**
+ * TrackerIndexingTree::directory-updated:
+ * @indexing_tree: a #TrackerIndexingTree
+ * @directory: a #GFile
+ *
+ * the ::directory-updated signal is emitted when @directory
+ * that was previously added has had its indexing flags
+ * updated due to another directory that is a parent of
+ * @directory changing. This tends to happen uppon
+ * tracker_indexing_tree_add() API calls.
+ *
+ * Since: 0.14.0
+ **/
signals[DIRECTORY_UPDATED] =
g_signal_new ("directory-updated",
G_OBJECT_CLASS_TYPE (object_class),
@@ -612,7 +653,7 @@ tracker_indexing_tree_clear_filters (TrackerIndexingTree *tree,
*
* Returns %TRUE if @file matches any filter of the given filter type.
*
- * Returns: %TRUE if @file is filtered
+ * Returns: %TRUE if @file is filtered.
**/
gboolean
tracker_indexing_tree_file_matches_filter (TrackerIndexingTree *tree,
@@ -804,6 +845,17 @@ tracker_indexing_tree_parent_is_indexable (TrackerIndexingTree *tree,
return TRUE;
}
+/**
+ * tracker_indexing_tree_get_filter_hidden:
+ * @tree: a #TrackerIndexingTree
+ *
+ * Describes if the @tree should index hidden content. To change this
+ * setting, see tracker_indexing_tree_set_filter_hidden().
+ *
+ * Returns: %FALSE if hidden files are indexed, otherwise %TRUE.
+ *
+ * Since: 0.18.
+ **/
gboolean
tracker_indexing_tree_get_filter_hidden (TrackerIndexingTree *tree)
{
@@ -815,6 +867,22 @@ tracker_indexing_tree_get_filter_hidden (TrackerIndexingTree *tree)
return priv->filter_hidden;
}
+/**
+ * tracker_indexing_tree_set_filter_hidden:
+ * @tree: a #TrackerIndexingTree
+ * @filter_hidden: a boolean
+ *
+ * When indexing content, sometimes it is preferable to ignore hidden
+ * content, for example, files prefixed with ".". This is
+ * common for files in a home directory which are usually config
+ * files.
+ *
+ * Sets the indexing policy for @tree with hidden files and content.
+ * To ignore hidden files, @filter_hidden should be %TRUE, otherwise
+ * %FALSE.
+ *
+ * Since: 0.18.
+ **/
void
tracker_indexing_tree_set_filter_hidden (TrackerIndexingTree *tree,
gboolean filter_hidden)
@@ -829,6 +897,21 @@ tracker_indexing_tree_set_filter_hidden (TrackerIndexingTree *tree,
g_object_notify (G_OBJECT (tree), "filter-hidden");
}
+/**
+ * tracker_indexing_tree_set_default_policy:
+ * @tree: a #TrackerIndexingTree
+ * @filter: a #TrackerFilterType
+ * @policy: a #TrackerFilterPolicy
+ *
+ * Set the default @policy (to allow or deny) for content in @tree
+ * based on the type - in this case @filter. Here, @filter is a file
+ * or directory and there are some other options too.
+ *
+ * For example, you can (by default), disable indexing all directories
+ * using this function.
+ *
+ * Since: 0.18.
+ **/
void
tracker_indexing_tree_set_default_policy (TrackerIndexingTree *tree,
TrackerFilterType filter,
@@ -843,6 +926,22 @@ tracker_indexing_tree_set_default_policy (TrackerIndexingTree *tree,
priv->policies[filter] = policy;
}
+/**
+ * tracker_indexing_tree_get_default_policy:
+ * @tree: a #TrackerIndexingTree
+ * @filter: a #TrackerFilterType
+ *
+ * Get the default filtering policies for @tree when indexing content.
+ * Some content is black listed or white listed and the default policy
+ * for that is returned here. The @filter allows specific type of
+ * policies to be returned, for example, the default policy for files
+ * (#TRACKER_FILTER_FILE).
+ *
+ * Returns: Either #TRACKER_FILTER_POLICY_DENY or
+ * #TRACKER_FILTER_POLICY_ALLOW.
+ *
+ * Since: 0.18.
+ **/
TrackerFilterPolicy
tracker_indexing_tree_get_default_policy (TrackerIndexingTree *tree,
TrackerFilterType filter)
@@ -958,6 +1057,18 @@ tracker_indexing_tree_get_master_root (TrackerIndexingTree *tree)
return priv->root;
}
+/**
+ * tracker_indexing_tree_file_is_root:
+ * @tree: a #TrackerIndexingTree
+ * @file: a #GFile to compare
+ *
+ * Evaluates if the URL represented by @file is the same of that for
+ * the root of the @tree.
+ *
+ * Returns: %TRUE if @file matches the URL canonically, otherwise %FALSE.
+ *
+ * Since: 1.2.
+ **/
gboolean
tracker_indexing_tree_file_is_root (TrackerIndexingTree *tree,
GFile *file)
diff --git a/src/libtracker-miner/tracker-miner-object.h b/src/libtracker-miner/tracker-miner-object.h
index 8d358ba..76363e8 100644
--- a/src/libtracker-miner/tracker-miner-object.h
+++ b/src/libtracker-miner/tracker-miner-object.h
@@ -32,8 +32,38 @@
G_BEGIN_DECLS
/* Common definitions for all miners */
+/**
+ * TRACKER_MINER_DBUS_INTERFACE:
+ *
+ * The name of the D-Bus interface to use for all data miners that
+ * inter-operate with Tracker.
+ *
+ * Since: 0.8.
+ **/
#define TRACKER_MINER_DBUS_INTERFACE "org.freedesktop.Tracker1.Miner"
+
+/**
+ * TRACKER_MINER_DBUS_NAME_PREFIX:
+ *
+ * D-Bus name prefix to use for all data miners. This allows custom
+ * miners to be written using @TRACKER_MINER_DBUS_NAME_PREFIX + "Files" for
+ * example and would show up on D-Bus under
+ * "org.freedesktop.Tracker1.Miner.Files".
+ *
+ * Since: 0.8.
+ **/
#define TRACKER_MINER_DBUS_NAME_PREFIX "org.freedesktop.Tracker1.Miner."
+
+/**
+ * TRACKER_MINER_DBUS_PATH_PREFIX:
+ *
+ * D-Bus path prefix to use for all data miners. This allows custom
+ * miners to be written using @TRACKER_MINER_DBUS_PATH_PREFIX + "Files" for
+ * example and would show up on D-Bus under
+ * "/org/freedesktop/Tracker1/Miner/Files".
+ *
+ * Since: 0.8.
+ **/
#define TRACKER_MINER_DBUS_PATH_PREFIX "/org/freedesktop/Tracker1/Miner/"
#define TRACKER_TYPE_MINER (tracker_miner_get_type())
@@ -43,7 +73,23 @@ G_BEGIN_DECLS
#define TRACKER_IS_MINER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), TRACKER_TYPE_MINER))
#define TRACKER_MINER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TRACKER_TYPE_MINER, TrackerMinerClass))
+/**
+ * TRACKER_MINER_ERROR_DOMAIN:
+ *
+ * Used as the domain for any #GErrors reported by @TrackerMiner objects.
+ *
+ * Since: 0.8.
+ **/
#define TRACKER_MINER_ERROR_DOMAIN "TrackerMiner"
+
+/**
+ * TRACKER_MINER_ERROR:
+ *
+ * Returns the @GQuark used for #GErrors and for @TrackerMiner
+ * implementations. This calls tracker_miner_error_quark().
+ *
+ * Since: 0.8.
+ **/
#define TRACKER_MINER_ERROR tracker_miner_error_quark()
typedef struct _TrackerMiner TrackerMiner;
diff --git a/src/libtracker-miner/tracker-miner-online.c b/src/libtracker-miner/tracker-miner-online.c
index 5009a9a..89e959e 100644
--- a/src/libtracker-miner/tracker-miner-online.c
+++ b/src/libtracker-miner/tracker-miner-online.c
@@ -57,6 +57,8 @@
* <literal>connected</literal> vmethod in order to tell the miner whether
* a connection is valid to retrieve data or not. The miner data extraction
* still must be dictated through the #TrackerMiner vmethods.
+ *
+ * Since: 0.18.
**/
typedef struct _TrackerMinerOnlinePrivate TrackerMinerOnlinePrivate;
@@ -158,6 +160,20 @@ tracker_miner_online_class_init (TrackerMinerOnlineClass *klass)
TRACKER_TYPE_NETWORK_TYPE,
TRACKER_NETWORK_TYPE_NONE,
G_PARAM_READABLE));
+
+ /**
+ * TrackerMinerOnline::connected:
+ * @miner: a #TrackerMinerOnline
+ * @type: a #TrackerNetworkType
+ *
+ * the ::connected signal is emitted when a specific @type of
+ * network becomes connected.
+ *
+ * Return values of #TRUE from this signal indicate whether a
+ * #TrackerMiner should resume indexing or not upon ::connected.
+ *
+ * Since: 0.18.0
+ **/
signals[CONNECTED] =
g_signal_new ("connected",
G_OBJECT_CLASS_TYPE (object_class),
@@ -165,6 +181,17 @@ tracker_miner_online_class_init (TrackerMinerOnlineClass *klass)
G_STRUCT_OFFSET (TrackerMinerOnlineClass, connected),
NULL, NULL, NULL,
G_TYPE_BOOLEAN, 1, TRACKER_TYPE_NETWORK_TYPE);
+
+ /**
+ * TrackerMinerOnline::disconnected:
+ * @miner: a #TrackerMinerOnline
+ * @type: a #TrackerNetworkType
+ *
+ * the ::disconnected signal is emitted when a specific @type of
+ * network becomes disconnected.
+ *
+ * Since: 0.18.0
+ **/
signals[DISCONNECTED] =
g_signal_new ("disconnected",
G_OBJECT_CLASS_TYPE (object_class),
@@ -376,11 +403,23 @@ miner_online_initable_iface_init (GInitableIface *iface)
iface->init = miner_online_initable_init;
}
+/**
+ * tracker_miner_online_get_network_type:
+ * @miner: a #TrackerMinerOnline.
+ *
+ * Get the type of network this data @miner uses to index content.
+ *
+ * Returns: a #TrackerNetworkType on success or #TRACKER_NETWORK_TYPE_NONE on error.
+ *
+ * Since: 0.18.
+ **/
TrackerNetworkType
tracker_miner_online_get_network_type (TrackerMinerOnline *miner)
{
TrackerMinerOnlinePrivate *priv;
+ g_return_val_if_fail (TRACKER_IS_MINER_ONLINE (miner), TRACKER_NETWORK_TYPE_NONE);
+
priv = tracker_miner_online_get_instance_private (miner);
return priv->network_type;
diff --git a/src/libtracker-miner/tracker-miner-online.h b/src/libtracker-miner/tracker-miner-online.h
index c3b0873..6a25cd5 100644
--- a/src/libtracker-miner/tracker-miner-online.h
+++ b/src/libtracker-miner/tracker-miner-online.h
@@ -39,18 +39,25 @@ G_BEGIN_DECLS
typedef struct _TrackerMinerOnline TrackerMinerOnline;
typedef struct _TrackerMinerOnlineClass TrackerMinerOnlineClass;
+/**
+ * TrackerMinerOnline:
+ *
+ * Abstract miner object for data requiring connectivity.
+ **/
struct _TrackerMinerOnline {
TrackerMiner parent_instance;
};
/**
* TrackerMinerOnlineClass:
- * @parent_class: parent object class
+ * @parent_class: a #TrackerMinerClass
* @connected: called when there is a network connection, or a new
* default route, returning #TRUE starts/resumes indexing.
* @disconnected: called when there is no network connection.
* @padding: Reserved for future API improvements.
*
+ * Virtual methods that can be overridden.
+ *
* Since: 0.18.
**/
struct _TrackerMinerOnlineClass {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]