Commit f3550b4a authored by Sam Thursfield's avatar Sam Thursfield

Merge branch 'sam/g-add-private' into 'master'

Use G_ADD_PRIVATE() instead of g_type_class_add_private()

Closes tracker#115

See merge request GNOME/tracker-miners!85
parents 21ed37cd 121efa6b
......@@ -126,7 +126,7 @@ enum {
};
G_DEFINE_TYPE (TrackerConfig, tracker_config, G_TYPE_SETTINGS)
G_DEFINE_TYPE_WITH_PRIVATE (TrackerConfig, tracker_config, G_TYPE_SETTINGS)
static void
tracker_config_class_init (TrackerConfigClass *klass)
......@@ -303,14 +303,11 @@ tracker_config_class_init (TrackerConfigClass *klass)
"Set to false to disable writeback",
DEFAULT_ENABLE_WRITEBACK,
G_PARAM_READWRITE));
g_type_class_add_private (object_class, sizeof (TrackerConfigPrivate));
}
static void
tracker_config_init (TrackerConfig *object)
{
object->priv = G_TYPE_INSTANCE_GET_PRIVATE (object, TRACKER_TYPE_CONFIG, TrackerConfigPrivate);
}
static void
......@@ -401,7 +398,7 @@ config_get_property (GObject *object,
GParamSpec *pspec)
{
TrackerConfig *config = TRACKER_CONFIG (object);
TrackerConfigPrivate *priv = config->priv;
TrackerConfigPrivate *priv = tracker_config_get_instance_private (config);
switch (param_id) {
/* General */
......@@ -478,7 +475,7 @@ config_finalize (GObject *object)
{
TrackerConfigPrivate *priv;
priv = TRACKER_CONFIG (object)->priv;
priv = tracker_config_get_instance_private (TRACKER_CONFIG (object));
g_slist_foreach (priv->ignored_file_patterns,
(GFunc) g_pattern_spec_free,
......@@ -561,7 +558,7 @@ config_set_ignored_file_conveniences (TrackerConfig *config)
GSList *paths = NULL;
GSList *patterns = NULL;
priv = config->priv;
priv = tracker_config_get_instance_private (config);
g_slist_foreach (priv->ignored_file_patterns,
(GFunc) g_pattern_spec_free,
......@@ -602,7 +599,7 @@ config_set_ignored_directory_conveniences (TrackerConfig *config)
GSList *patterns = NULL;
GSList *paths = NULL;
priv = config->priv;
priv = tracker_config_get_instance_private (config);
g_slist_foreach (priv->ignored_directory_patterns,
(GFunc) g_pattern_spec_free,
......@@ -839,7 +836,7 @@ tracker_config_get_index_recursive_directories (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->index_recursive_directories;
}
......@@ -851,7 +848,7 @@ tracker_config_get_index_single_directories (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->index_single_directories;
}
......@@ -863,7 +860,7 @@ tracker_config_get_ignored_directories (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->ignored_directories;
}
......@@ -875,7 +872,7 @@ tracker_config_get_ignored_directories_with_content (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->ignored_directories_with_content;
}
......@@ -887,7 +884,7 @@ tracker_config_get_ignored_files (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->ignored_files;
}
......@@ -943,7 +940,7 @@ rebuild_filtered_lists (TrackerConfig *config)
* 1. Only notify on changes.
* 2. Don't update the unfiltered lists (since they have aliases)
*/
priv = config->priv;
priv = tracker_config_get_instance_private (config);
/* Filter single directories first, checking duplicates */
old_list = priv->index_single_directories;
......@@ -1025,7 +1022,7 @@ config_set_index_recursive_directories (TrackerConfig *config,
g_return_if_fail (TRACKER_IS_CONFIG (config));
priv = config->priv;
priv = tracker_config_get_instance_private (config);
l = priv->index_recursive_directories_unfiltered;
......@@ -1058,7 +1055,7 @@ config_set_index_single_directories (TrackerConfig *config,
g_return_if_fail (TRACKER_IS_CONFIG (config));
priv = config->priv;
priv = tracker_config_get_instance_private (config);
l = priv->index_single_directories_unfiltered;
......@@ -1091,7 +1088,7 @@ config_set_ignored_directories (TrackerConfig *config,
g_return_if_fail (TRACKER_IS_CONFIG (config));
priv = config->priv;
priv = tracker_config_get_instance_private (config);
l = priv->ignored_directories;
......@@ -1127,7 +1124,7 @@ config_set_ignored_directories_with_content (TrackerConfig *config,
g_return_if_fail (TRACKER_IS_CONFIG (config));
priv = config->priv;
priv = tracker_config_get_instance_private (config);
l = priv->ignored_directories_with_content;
......@@ -1160,7 +1157,7 @@ config_set_ignored_files (TrackerConfig *config,
g_return_if_fail (TRACKER_IS_CONFIG (config));
priv = config->priv;
priv = tracker_config_get_instance_private (config);
l = priv->ignored_files;
......@@ -1197,7 +1194,7 @@ tracker_config_get_ignored_directory_patterns (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->ignored_directory_patterns;
}
......@@ -1209,7 +1206,7 @@ tracker_config_get_ignored_file_patterns (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->ignored_file_patterns;
}
......@@ -1221,7 +1218,7 @@ tracker_config_get_ignored_directory_paths (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->ignored_directory_paths;
}
......@@ -1233,7 +1230,7 @@ tracker_config_get_ignored_file_paths (TrackerConfig *config)
g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
priv = config->priv;
priv = tracker_config_get_instance_private (config);
return priv->ignored_file_paths;
}
......@@ -36,7 +36,6 @@ typedef struct TrackerConfigClass TrackerConfigClass;
struct TrackerConfig {
GSettings parent;
gpointer priv;
};
struct TrackerConfigClass {
......
......@@ -71,7 +71,7 @@ enum {
PROP_FILES_MINER
};
#define TRACKER_MINER_FILES_INDEX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_MINER_FILES_INDEX, TrackerMinerFilesIndexPrivate))
#define TRACKER_MINER_FILES_INDEX_GET_PRIVATE(o) (tracker_miner_files_index_get_instance_private (TRACKER_MINER_FILES_INDEX (o)))
static void index_set_property (GObject *object,
guint param_id,
......@@ -83,7 +83,7 @@ static void index_get_property (GObject *object,
GParamSpec *pspec);
static void index_finalize (GObject *object);
G_DEFINE_TYPE(TrackerMinerFilesIndex, tracker_miner_files_index, G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_PRIVATE(TrackerMinerFilesIndex, tracker_miner_files_index, G_TYPE_OBJECT)
static void
tracker_miner_files_index_class_init (TrackerMinerFilesIndexClass *klass)
......@@ -103,8 +103,6 @@ tracker_miner_files_index_class_init (TrackerMinerFilesIndexClass *klass)
"The FS Miner",
TRACKER_TYPE_MINER_FILES,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (klass, sizeof (TrackerMinerFilesIndexPrivate));
}
static void
......
......@@ -55,7 +55,7 @@
#define TRACKER_EXTRACT_DATA_SOURCE TRACKER_PREFIX_TRACKER "extractor-data-source"
#define TRACKER_MINER_FILES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_MINER_FILES, TrackerMinerFilesPrivate))
#define TRACKER_MINER_FILES_GET_PRIVATE(o) (tracker_miner_files_get_instance_private (TRACKER_MINER_FILES (o)))
static GQuark miner_files_error_quark = 0;
......@@ -239,6 +239,7 @@ static void miner_files_update_filters (TrackerMinerF
static GInitableIface* miner_files_initable_parent_iface;
G_DEFINE_TYPE_WITH_CODE (TrackerMinerFiles, tracker_miner_files, TRACKER_TYPE_MINER_FS,
G_ADD_PRIVATE (TrackerMinerFiles)
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
miner_files_initable_iface_init));
......@@ -378,8 +379,6 @@ tracker_miner_files_class_init (TrackerMinerFilesClass *klass)
TRACKER_TYPE_CONFIG,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (klass, sizeof (TrackerMinerFilesPrivate));
miner_files_error_quark = g_quark_from_static_string ("TrackerMinerFiles");
}
......
......@@ -39,7 +39,7 @@
#define BATTERY_LOW_THRESHOLD 0.05f
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_POWER, TrackerPowerPriv))
#define GET_PRIV(obj) (tracker_power_get_instance_private (TRACKER_POWER (obj)))
typedef struct {
LibHalContext *context;
......@@ -50,7 +50,7 @@ typedef struct {
gchar *ac_adapter_udi;
gboolean on_battery;
gdouble battery_percentage;
} TrackerPowerPriv;
} TrackerPowerPrivate;
static void tracker_power_finalize (GObject *object);
static void hal_get_property (GObject *object,
......@@ -81,7 +81,7 @@ enum {
PROP_ON_LOW_BATTERY
};
G_DEFINE_TYPE (TrackerPower, tracker_power, G_TYPE_OBJECT);
G_DEFINE_TYPE_WITH_PRIVATE (TrackerPower, tracker_power, G_TYPE_OBJECT);
static void
tracker_power_class_init (TrackerPowerClass *klass)
......@@ -107,14 +107,12 @@ tracker_power_class_init (TrackerPowerClass *klass)
"Whether the battery is low",
FALSE,
G_PARAM_READABLE));
g_type_class_add_private (object_class, sizeof (TrackerPowerPriv));
}
static void
tracker_power_init (TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
DBusError error;
g_message ("Initializing HAL Power...");
......@@ -185,7 +183,7 @@ tracker_power_init (TrackerPower *power)
static void
tracker_power_finalize (GObject *object)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
priv = GET_PRIV (object);
......@@ -214,7 +212,7 @@ hal_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
priv = GET_PRIV (object);
......@@ -235,7 +233,7 @@ hal_get_property (GObject *object,
static gboolean
hal_setup_ac_adapters (TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
DBusError error;
gchar **devices, **p;
gint num;
......@@ -311,7 +309,7 @@ hal_setup_ac_adapters (TrackerPower *power)
static gboolean
hal_setup_batteries (TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
DBusError error;
gchar **devices, **p;
gint num;
......@@ -360,7 +358,7 @@ hal_setup_batteries (TrackerPower *power)
static void
hal_battery_notify (TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
GList *values, *v;
gint percentage, n_values;
gdouble old_percentage;
......@@ -399,7 +397,7 @@ static void
hal_battery_modify (TrackerPower *power,
const gchar *udi)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
gint percentage;
priv = GET_PRIV (power);
......@@ -418,7 +416,7 @@ static void
hal_battery_remove (TrackerPower *power,
const gchar *udi)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
priv = GET_PRIV (power);
......@@ -444,7 +442,7 @@ hal_device_removed_cb (LibHalContext *context,
const gchar *udi)
{
TrackerPower *power;
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
power = (TrackerPower*) libhal_ctx_get_user_data (context);
priv = GET_PRIV (power);
......@@ -462,7 +460,7 @@ hal_device_property_modified_cb (LibHalContext *context,
dbus_bool_t is_added)
{
TrackerPower *power;
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
DBusError error;
power = (TrackerPower*) libhal_ctx_get_user_data (context);
......@@ -519,7 +517,7 @@ tracker_power_new ()
gboolean
tracker_power_get_on_battery (TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
g_return_val_if_fail (TRACKER_IS_POWER (power), TRUE);
......@@ -539,7 +537,7 @@ tracker_power_get_on_battery (TrackerPower *power)
gboolean
tracker_power_get_on_low_battery (TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
g_return_val_if_fail (TRACKER_IS_POWER (power), TRUE);
......
......@@ -26,7 +26,7 @@
#include "tracker-power.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_POWER, TrackerPowerPriv))
#define GET_PRIV(obj) (tracker_power_get_instance_private (TRACKER_POWER (obj)))
typedef struct {
UpClient *client;
......@@ -35,7 +35,7 @@ typedef struct {
#endif
gboolean on_battery;
gboolean on_low_battery;
} TrackerPowerPriv;
} TrackerPowerPrivate;
static void tracker_power_initable_iface_init (GInitableIface *iface);
static void tracker_power_finalize (GObject *object);
......@@ -55,6 +55,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (TrackerPower, tracker_power, G_TYPE_OBJECT,
G_ADD_PRIVATE (TrackerPower)
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, tracker_power_initable_iface_init));
static void
......@@ -82,8 +83,6 @@ tracker_power_class_init (TrackerPowerClass *klass)
"Whether the battery is low",
FALSE,
G_PARAM_READABLE));
g_type_class_add_private (object_class, sizeof (TrackerPowerPriv));
}
#ifndef HAVE_UP_CLIENT_GET_ON_LOW_BATTERY
......@@ -92,7 +91,7 @@ on_on_battery_changed (UpClient *client,
GParamSpec *pspec,
TrackerPower *power)
{
TrackerPowerPriv *priv = GET_PRIV (power);
TrackerPowerPrivate *priv = GET_PRIV (power);
gboolean on_battery;
on_battery = up_client_get_on_battery (priv->client);
......@@ -107,7 +106,7 @@ on_warning_level_changed (UpDevice *device,
GParamSpec *pspec,
TrackerPower *power)
{
TrackerPowerPriv *priv = GET_PRIV (power);
TrackerPowerPrivate *priv = GET_PRIV (power);
UpDeviceLevel warning_level;
gboolean on_low_battery;
......@@ -130,7 +129,7 @@ tracker_power_initable_init (GInitable *initable,
GError **error)
{
TrackerPower *power;
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
g_message ("Initializing UPower...");
......@@ -165,7 +164,7 @@ tracker_power_initable_init (GInitable *initable,
static void
tracker_power_finalize (GObject *object)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
priv = GET_PRIV (object);
......@@ -184,7 +183,7 @@ tracker_power_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
priv = GET_PRIV (object);
......@@ -206,7 +205,7 @@ static void
tracker_power_client_changed_cb (UpClient *client,
TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
gboolean on_battery;
gboolean on_low_battery;
......@@ -267,7 +266,7 @@ tracker_power_new ()
gboolean
tracker_power_get_on_battery (TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
g_return_val_if_fail (TRACKER_IS_POWER (power), TRUE);
......@@ -287,7 +286,7 @@ tracker_power_get_on_battery (TrackerPower *power)
gboolean
tracker_power_get_on_low_battery (TrackerPower *power)
{
TrackerPowerPriv *priv;
TrackerPowerPrivate *priv;
g_return_val_if_fail (TRACKER_IS_POWER (power), TRUE);
......
......@@ -95,7 +95,7 @@ enum {
static guint signals[LAST_SIGNAL] = {0};
G_DEFINE_TYPE (TrackerStorage, tracker_storage, G_TYPE_OBJECT);
G_DEFINE_TYPE_WITH_PRIVATE (TrackerStorage, tracker_storage, G_TYPE_OBJECT);
static void
tracker_storage_class_init (TrackerStorageClass *klass)
......@@ -132,8 +132,6 @@ tracker_storage_class_init (TrackerStorageClass *klass)
2,
G_TYPE_STRING,
G_TYPE_STRING);
g_type_class_add_private (object_class, sizeof (TrackerStoragePrivate));
}
static void
......@@ -143,7 +141,7 @@ tracker_storage_init (TrackerStorage *storage)
g_message ("Initializing Storage...");
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
priv->mounts = g_node_new (NULL);
......@@ -177,7 +175,7 @@ tracker_storage_finalize (GObject *object)
{
TrackerStoragePrivate *priv;
priv = TRACKER_STORAGE_GET_PRIVATE (object);
priv = tracker_storage_get_instance_private (TRACKER_STORAGE (object));
g_hash_table_destroy (priv->unmount_watchdogs);
......@@ -345,7 +343,7 @@ mount_add_new (TrackerStorage *storage,
TrackerStoragePrivate *priv;
GNode *node;
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
node = mount_add_hierarchy (priv->mounts, uuid, mount_point, removable_device, optical_disc);
g_hash_table_insert (priv->mounts_by_uuid, g_strdup (uuid), node);
......@@ -573,7 +571,7 @@ mount_add (TrackerStorage *storage,
return;
}
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
/* fstab partitions may not have corresponding
* GVolumes, so volume may be NULL */
......@@ -706,7 +704,7 @@ mounts_setup (TrackerStorage *storage)
TrackerStoragePrivate *priv;
GList *mounts, *lm;
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
mounts = g_volume_monitor_get_mounts (priv->volume_monitor);
......@@ -748,7 +746,7 @@ mount_remove (TrackerStorage *storage,
gchar *mount_point;
gchar *mp;
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
file = g_mount_get_root (mount);
mount_point = g_file_get_path (file);
......@@ -790,7 +788,7 @@ mount_removed_cb (GVolumeMonitor *monitor,
TrackerStoragePrivate *priv;
storage = user_data;
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
mount_remove (storage, mount);
......@@ -810,7 +808,7 @@ unmount_failed_cb (gpointer user_data)
* due to an error, and add back the still mounted
* path.
*/
priv = TRACKER_STORAGE_GET_PRIVATE (data->storage);
priv = tracker_storage_get_instance_private (data->storage);
g_warning ("Unmount operation failed, adding back mount point...");
......@@ -831,7 +829,7 @@ mount_pre_removed_cb (GVolumeMonitor *monitor,
guint id;
storage = user_data;
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
mount_remove (storage, mount);
......@@ -918,7 +916,7 @@ tracker_storage_get_device_roots (TrackerStorage *storage,
g_return_val_if_fail (TRACKER_IS_STORAGE (storage), NULL);
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
gr.roots = NULL;
gr.type = type;
......@@ -956,7 +954,7 @@ tracker_storage_get_device_uuids (TrackerStorage *storage,
g_return_val_if_fail (TRACKER_IS_STORAGE (storage), NULL);
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
uuids = NULL;
......@@ -1004,7 +1002,7 @@ tracker_storage_get_mount_point_for_uuid (TrackerStorage *storage,
g_return_val_if_fail (TRACKER_IS_STORAGE (storage), NULL);
g_return_val_if_fail (uuid != NULL, NULL);
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
node = g_hash_table_lookup (priv->mounts_by_uuid, uuid);
......@@ -1037,7 +1035,7 @@ tracker_storage_get_type_for_uuid (TrackerStorage *storage,
g_return_val_if_fail (TRACKER_IS_STORAGE (storage), 0);
g_return_val_if_fail (uuid != NULL, 0);
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
node = g_hash_table_lookup (priv->mounts_by_uuid, uuid);
......@@ -1094,7 +1092,7 @@ tracker_storage_get_uuid_for_file (TrackerStorage *storage,
path = norm_path;
}
priv = TRACKER_STORAGE_GET_PRIVATE (storage);
priv = tracker_storage_get_instance_private (storage);
info = mount_info_find (priv->mounts, path);
......
......@@ -52,7 +52,7 @@ enum {
PROP_FILES_MINER
};
#define TRACKER_WRITEBACK_DISPATCHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_WRITEBACK_DISPATCHER, TrackerWritebackDispatcherPrivate))
#define TRACKER_WRITEBACK_DISPATCHER_GET_PRIVATE(o) (tracker_writeback_dispatcher_get_instance_private (TRACKER_WRITEBACK_DISPATCHER (o)))
static void writeback_dispatcher_set_property (GObject *object,
guint param_id,
......@@ -82,6 +82,7 @@ writeback_dispatcher_initable_iface_init (GInitableIface *iface)
}
G_DEFINE_TYPE_WITH_CODE (TrackerWritebackDispatcher, tracker_writeback_dispatcher, G_TYPE_OBJECT,
G_ADD_PRIVATE (TrackerWritebackDispatcher)
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
writeback_dispatcher_initable_iface_init));
......@@ -103,8 +104,6 @@ tracker_writeback_dispatcher_class_init (TrackerWritebackDispatcherClass *klass)
"The FS Miner",
TRACKER_TYPE_MINER_FILES,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (klass, sizeof (TrackerWritebackDispatcherPrivate));
}
static void
......
......@@ -32,7 +32,7 @@
#include "tracker-miner-rss.h"
#define TRACKER_MINER_RSS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_MINER_RSS, TrackerMinerRSSPrivate))
#define TRACKER_MINER_RSS_GET_PRIVATE(obj) (tracker_miner_rss_get_instance_private (TRACKER_MINER_RSS (obj)))
typedef struct _TrackerMinerRSSPrivate TrackerMinerRSSPrivate;
......@@ -96,7 +96,7 @@ static void feed_ready_cb (GrssFeedsPool *
gpointer user_data);
static const gchar *get_message_url (GrssFeedItem *item);
G_DEFINE_TYPE (TrackerMinerRSS, tracker_miner_rss, TRACKER_TYPE_MINER_ONLINE)
G_DEFINE_TYPE_WITH_PRIVATE (TrackerMinerRSS, tracker_miner_rss, TRACKER_TYPE_MINER_ONLINE)
static void
parser_characters (void *data,
......@@ -239,8 +239,6 @@ tracker_miner_rss_class_init (TrackerMinerRSSClass *klass)
miner_class->resumed = miner_resumed;
miner_online_class->connected = miner_connected;
g_type_class_add_private (object_class, sizeof (TrackerMinerRSSPrivate));
}
static void
......
......@@ -38,7 +38,7 @@ struct TrackerExtractControllerPrivate {
gint paused;
};
G_DEFINE_TYPE (TrackerExtractController, tracker_extract_controller, G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_PRIVATE (TrackerExtractController, tracker_extract_controller, G_TYPE_OBJECT)
static void
files_miner_idleness_changed (TrackerExtractController *self,
......@@ -288,17 +288,12 @@ tracker_extract_controller_class_init (TrackerExtractControllerClass *klass)
G_PARAM_STATIC_STRINGS |
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (object_class,
sizeof (TrackerExtractControllerPrivate));
}
static void
tracker_extract_controller_init (TrackerExtractController *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
TRACKER_TYPE_EXTRACT_CONTROLLER,
TrackerExtractControllerPrivate);
self->priv = tracker_extract_controller_get_instance_private (self);
}
TrackerExtractController *
......
......@@ -85,6 +85,7 @@ static void tracker_extract_decorator_initable_iface_init (GInitableIface *iface
G_DEFINE_TYPE_WITH_CODE (TrackerExtractDecorator, tracker_extract_decorator,
TRACKER_TYPE_DECORATOR_FS,