~alexlauni/libunity-webapps/firefox-crash-lp1068495

« back to all changes in this revision

Viewing changes to src/libunity-webapps-repository/unity-webapps-url-index.c

MergeĀ lp:~robertcarr/libunity-webapps/package-support

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * unity-webapps-url-index.c
 
3
 * Copyright (C) Canonical LTD 2011
 
4
 *
 
5
 * Author: Robert Carr <racarr@canonical.com>
 
6
 * 
 
7
 unity-webapps is free software: you can redistribute it and/or modify it
 
8
 * under the terms of the GNU Lesser General Public License as published
 
9
 * by the Free Software Foundation, either version 3 of the License, or
 
10
 * (at your option) any later version.
 
11
 * 
 
12
 * unity-webapps is distributed in the hope that it will be useful, but
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
15
 * See the GNU Lesser General Public License for more details.
 
16
 * 
 
17
 * You should have received a copy of the GNU Lesser General Public License
 
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 
19
 */
 
20
 
 
21
#include <glib.h>
 
22
#include <gio/gio.h>
 
23
 
 
24
#include "unity-webapps-url-index.h"
 
25
 
 
26
#include "../unity-webapps-debug.h"
 
27
 
 
28
struct _UnityWebappsUrlIndexPrivate {
 
29
  gpointer fill;
 
30
};
 
31
 
 
32
 
 
33
G_DEFINE_ABSTRACT_TYPE(UnityWebappsUrlIndex, unity_webapps_url_index, G_TYPE_OBJECT)
 
34
 
 
35
#define UNITY_WEBAPPS_URL_INDEX_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), UNITY_WEBAPPS_TYPE_URL_INDEX, UnityWebappsUrlIndexPrivate))
 
36
 
 
37
static void
 
38
unity_webapps_url_index_class_init (UnityWebappsUrlIndexClass *klass)
 
39
{
 
40
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
41
  
 
42
  g_type_class_add_private (object_class, sizeof(UnityWebappsUrlIndexPrivate));
 
43
}
 
44
 
 
45
static void
 
46
unity_webapps_url_index_init (UnityWebappsUrlIndex *index)
 
47
{
 
48
  index->priv = UNITY_WEBAPPS_URL_INDEX_GET_PRIVATE (index);
 
49
}
 
50
 
 
51
GList *
 
52
unity_webapps_url_index_lookup_url (UnityWebappsUrlIndex *index,
 
53
                                    const gchar *url)
 
54
{
 
55
  return UNITY_WEBAPPS_URL_INDEX_GET_CLASS (index)->lookup_url (index, url);
 
56
}