![]() |
![]() |
![]() |
Tracker Miner Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
TrackerMinerOnlineTrackerMinerOnline — Abstract base class for miners connecting to online resources |
#include <libtracker-miner/tracker-miner.h>
struct TrackerMinerOnline;
struct TrackerMinerOnlineClass;
TrackerNetworkType tracker_miner_online_get_network_type
(TrackerMinerOnline *miner
);
TrackerMinerOnline is an abstract base class for miners retrieving data from online resources. It's a very thin layer above TrackerMiner that additionally handles network connection status.
TrackerMinerOnline implementations can implement the
connected
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.
struct TrackerMinerOnline;
Abstract miner object for data requiring connectivity.
struct TrackerMinerOnlineClass { TrackerMinerClass parent_class; /* vmethods */ gboolean (* connected) (TrackerMinerOnline *miner, TrackerNetworkType network); void (* disconnected) (TrackerMinerOnline *miner); /* <Private> */ gpointer padding[10]; };
Virtual methods that can be overridden.
TrackerMinerClass |
a TrackerMinerClass |
called when there is a network connection, or a new default route, returning TRUE starts/resumes indexing. | |
called when there is no network connection. | |
Reserved for future API improvements. |
Since 0.18.
TrackerNetworkType tracker_miner_online_get_network_type
(TrackerMinerOnline *miner
);
Get the type of network this data miner
uses to index content.
|
a TrackerMinerOnline. |
Returns : |
a TrackerNetworkType on success or TRACKER_NETWORK_TYPE_NONE on error. |
Since 0.18.
"network-type"
property"network-type" TrackerNetworkType : Read
Network type for the current connection.
Default value: TRACKER_NETWORK_TYPE_NONE
"connected"
signalgboolean user_function (TrackerMinerOnline *miner,
TrackerNetworkType type,
gpointer user_data) : Run Last
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.
|
a TrackerMinerOnline |
|
a TrackerNetworkType |
|
user data set when the signal handler was connected. |
Since 0.18.0
"disconnected"
signalvoid user_function (TrackerMinerOnline *miner,
gpointer user_data) : Run Last
the ::disconnected signal is emitted when a specific type
of
network becomes disconnected.
|
a TrackerMinerOnline |
|
a TrackerNetworkType |
|
user data set when the signal handler was connected. |
Since 0.18.0