~jbicha/hud/build-depend-on-valac-not-gir

« back to all changes in this revision

Viewing changes to service/usage-tracker.h

Merging the HUD into indicator-appmenu

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Tracks which menu items get used by users and works to promote those
 
3
higher in the search rankings than others.
 
4
 
 
5
Copyright 2011 Canonical Ltd.
 
6
 
 
7
Authors:
 
8
    Ted Gould <ted@canonical.com>
 
9
 
 
10
This program is free software: you can redistribute it and/or modify it 
 
11
under the terms of the GNU General Public License version 3, as published 
 
12
by the Free Software Foundation.
 
13
 
 
14
This program is distributed in the hope that it will be useful, but 
 
15
WITHOUT ANY WARRANTY; without even the implied warranties of 
 
16
MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
 
17
PURPOSE.  See the GNU General Public License for more details.
 
18
 
 
19
You should have received a copy of the GNU General Public License along 
 
20
with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
*/
 
22
 
 
23
#ifndef __USAGE_TRACKER_H__
 
24
#define __USAGE_TRACKER_H__
 
25
 
 
26
#include <glib.h>
 
27
#include <glib-object.h>
 
28
 
 
29
G_BEGIN_DECLS
 
30
 
 
31
#define USAGE_TRACKER_TYPE            (usage_tracker_get_type ())
 
32
#define USAGE_TRACKER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), USAGE_TRACKER_TYPE, UsageTracker))
 
33
#define USAGE_TRACKER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), USAGE_TRACKER_TYPE, UsageTrackerClass))
 
34
#define IS_USAGE_TRACKER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), USAGE_TRACKER_TYPE))
 
35
#define IS_USAGE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), USAGE_TRACKER_TYPE))
 
36
#define USAGE_TRACKER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), USAGE_TRACKER_TYPE, UsageTrackerClass))
 
37
 
 
38
typedef struct _UsageTracker        UsageTracker;
 
39
typedef struct _UsageTrackerClass   UsageTrackerClass;
 
40
typedef struct _UsageTrackerPrivate UsageTrackerPrivate;
 
41
 
 
42
struct _UsageTrackerClass {
 
43
        GObjectClass parent_class;
 
44
};
 
45
 
 
46
struct _UsageTracker {
 
47
        GObject parent;
 
48
 
 
49
        UsageTrackerPrivate * priv;
 
50
};
 
51
 
 
52
GType usage_tracker_get_type (void);
 
53
UsageTracker * usage_tracker_new (void);
 
54
void usage_tracker_mark_usage (UsageTracker * self, const gchar * application, const gchar * entry);
 
55
guint usage_tracker_get_usage (UsageTracker * self, const gchar * application, const gchar * entry);
 
56
 
 
57
G_END_DECLS
 
58
 
 
59
#endif