Back to index

indicator-appmenu  12.10.0
usage-tracker.h
Go to the documentation of this file.
00001 /*
00002 Tracks which menu items get used by users and works to promote those
00003 higher in the search rankings than others.
00004 
00005 Copyright 2011 Canonical Ltd.
00006 
00007 Authors:
00008     Ted Gould <ted@canonical.com>
00009 
00010 This program is free software: you can redistribute it and/or modify it 
00011 under the terms of the GNU General Public License version 3, as published 
00012 by the Free Software Foundation.
00013 
00014 This program is distributed in the hope that it will be useful, but 
00015 WITHOUT ANY WARRANTY; without even the implied warranties of 
00016 MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
00017 PURPOSE.  See the GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License along 
00020 with this program.  If not, see <http://www.gnu.org/licenses/>.
00021 */
00022 
00023 #ifndef __USAGE_TRACKER_H__
00024 #define __USAGE_TRACKER_H__
00025 
00026 #include <glib-object.h>
00027 
00028 G_BEGIN_DECLS
00029 
00030 #define USAGE_TRACKER_TYPE            (usage_tracker_get_type ())
00031 #define USAGE_TRACKER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), USAGE_TRACKER_TYPE, UsageTracker))
00032 #define USAGE_TRACKER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), USAGE_TRACKER_TYPE, UsageTrackerClass))
00033 #define IS_USAGE_TRACKER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), USAGE_TRACKER_TYPE))
00034 #define IS_USAGE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), USAGE_TRACKER_TYPE))
00035 #define USAGE_TRACKER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), USAGE_TRACKER_TYPE, UsageTrackerClass))
00036 
00037 typedef struct _UsageTracker        UsageTracker;
00038 typedef struct _UsageTrackerClass   UsageTrackerClass;
00039 typedef struct _UsageTrackerPrivate UsageTrackerPrivate;
00040 
00041 struct _UsageTrackerClass {
00042        GObjectClass parent_class;
00043 };
00044 
00045 struct _UsageTracker {
00046        GObject parent;
00047 
00048        UsageTrackerPrivate * priv;
00049 };
00050 
00051 GType usage_tracker_get_type (void);
00052 UsageTracker * usage_tracker_new (void);
00053 void usage_tracker_mark_usage (UsageTracker * self, const gchar * application, const gchar * entry);
00054 guint usage_tracker_get_usage (UsageTracker * self, const gchar * application, const gchar * entry);
00055 UsageTracker * usage_tracker_get_instance (void);
00056 
00057 G_END_DECLS
00058 
00059 #endif