#ifndef __USERDATA_COLLECTOR_H__ #define __USERDATA_COLLECTOR_H__ #include #include G_BEGIN_DECLS #define USERDATA_TYPE_COLLECTOR (userdata_collector_get_type ()) #define USERDATA_COLLECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), USERDATA_TYPE_COLLECTOR, UserdataCollector)) #define USERDATA_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), USERDATA_TYPE_COLLECTOR, UserdataCollectorClass)) #define USERDATA_IS_COLLECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), USERDATA_TYPE_COLLECTOR)) #define USERDATA_IS_COLLECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), USERDATA_TYPE_COLLECTOR)) #define USERDATA_COLLECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), USERDATA_TYPE_COLLECTOR, UserdataCollectorClass)) typedef struct _UserdataCollector UserdataCollector; typedef struct _UserdataCollectorClass UserdataCollectorClass; typedef struct _UserdataCollectorPrivate UserdataCollectorPrivate; /** * UserdataCollectorClass: * @parent_class: #GObjectClass * @reserved1: Reserved for future use. * @reserved2: Reserved for future use. * @reserved3: Reserved for future use. * @reserved4: Reserved for future use. * @reserved5: Reserved for future use. * @reserved6: Reserved for future use. * * Class for #UserdataCollector */ struct _UserdataCollectorClass { GObjectClass parent_class; /*< Private >*/ void (*reserved1) (void); void (*reserved2) (void); void (*reserved3) (void); void (*reserved4) (void); void (*reserved5) (void); void (*reserved6) (void); }; /** * UserdataCollector: * * Object to abstract out the collection and ensure that the test is enabled * before writing the data out to the filesystem. */ struct _UserdataCollector { GObject parent; /*< Private >*/ UserdataCollectorPrivate * priv; }; GType userdata_collector_get_type (void); UserdataCollector * userdata_collector_new (const gchar * project); gboolean userdata_collector_submit (UserdataCollector * collector, const gchar * json_data); /** * SECTION:collector * @short_description: Collects user data for user research * @stability: Unstable * @include: libuserdata/collector.h * * Object to abstract out the process of User data collection for applications * and for a particular project. It takes JSON fragments and handles putting them * into the system so that they can be picked up, and uploaded to the server * for longer term research. The object will automatically put on User ID and * timestamp the entries so there is no need to do that. */ G_END_DECLS #endif