TrackerMinerOnline

TrackerMinerOnline — Abstract base class for miners connecting to online resources

Functions

Properties

Signals

gboolean connected Run Last
void disconnected Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── TrackerMiner
        ╰── TrackerMinerOnline

Implemented Interfaces

TrackerMinerOnline implements GInitable.

Includes

#include <libtracker-miner/tracker-miner.h>

Description

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.

Functions

tracker_miner_online_get_type ()

GType
tracker_miner_online_get_type (void);

Returns


tracker_miner_online_get_network_type ()

TrackerNetworkType
tracker_miner_online_get_network_type (TrackerMinerOnline *miner);

Returns


tracker_network_type_get_type ()

GType
tracker_network_type_get_type (void);

Returns

Types and Values

struct TrackerMinerOnline

struct TrackerMinerOnline;


struct TrackerMinerOnlineClass

struct TrackerMinerOnlineClass {
	TrackerMinerClass parent_class;

	/* vmethods */
	gboolean (* connected)    (TrackerMinerOnline *miner,
	                           TrackerNetworkType  network);
	void     (* disconnected) (TrackerMinerOnline *miner);

	/* <Private> */
	gpointer padding[10];
};

Members

TrackerMinerClass parent_class;

parent object class

 

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.

 

gpointer padding[10];

Reserved for future API improvements.

 

Since 0.18.


enum TrackerNetworkType

Enumerates the different types of connections that the device might use when connected to internet. Note that not all providers might provide this information.

Members

TRACKER_NETWORK_TYPE_NONE

Network is disconnected

 

TRACKER_NETWORK_TYPE_UNKNOWN

Network status is unknown

 

TRACKER_NETWORK_TYPE_GPRS

Network is connected over a GPRS connection

 

TRACKER_NETWORK_TYPE_EDGE

Network is connected over an EDGE connection

 

TRACKER_NETWORK_TYPE_3G

Network is connected over a 3G or faster (HSDPA, UMTS, ...) connection

 

TRACKER_NETWORK_TYPE_LAN

Network is connected over a local network connection. This can be ethernet, wifi, etc.

 

Since 0.18

Property Details

The “network-type” property

  “network-type”             TrackerNetworkType

Network type for the current connection.

Flags: Read

Default value: TRACKER_NETWORK_TYPE_NONE

Signal Details

The “connected” signal

gboolean
user_function (TrackerMinerOnline *trackermineronline,
               TrackerNetworkType  arg1,
               gpointer            user_data)

Parameters

trackermineronline

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Returns

Flags: Run Last


The “disconnected” signal

void
user_function (TrackerMinerOnline *trackermineronline,
               gpointer            user_data)

Parameters

trackermineronline

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last