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

« back to all changes in this revision

Viewing changes to src/libunity-webapps-repository/unity-webapps-application-repository.h

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
 
2
/*
 
3
 * unity-webapps-application-repository.h
 
4
 * Copyright (C) Canonical LTD 2011
 
5
 * 
 
6
 * Author: Robert Carr <racarr@canonical.com>
 
7
 * 
 
8
unity-webapps is free software: you can redistribute it and/or modify it
 
9
 * under the terms of the GNU Lesser General Public License as published
 
10
 * by the Free Software Foundation, either version 3 of the License, or
 
11
 * (at your option) any later version.
 
12
 * 
 
13
 * unity-webapps is distributed in the hope that it will be useful, but
 
14
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
16
 * See the GNU Lesser General Public License for more details.
 
17
 * 
 
18
 * You should have received a copy of the GNU Lesser General Public License
 
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 
20
 */
 
21
 
 
22
 
 
23
#ifndef __UNITY_WEBAPPS_APPLICATION_REPOSITORY_H
 
24
#define __UNITY_WEBAPPS_APPLICATION_REPOSITORY_H
 
25
 
 
26
 
 
27
#define UNITY_WEBAPPS_TYPE_APPLICATION_REPOSITORY              (unity_webapps_application_repository_get_type())
 
28
#define UNITY_WEBAPPS_APPLICATION_REPOSITORY(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), UNITY_WEBAPPS_TYPE_APPLICATION_REPOSITORY, UnityWebappsApplicationRepository))
 
29
#define UNITY_WEBAPPS_APPLICATION_REPOSITORY_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), UNITY_WEBAPPS_TYPE_APPLICATION_REPOSITORY, UnityWebappsApplicationRepositoryClass))
 
30
#define UNITY_WEBAPPS_IS_APPLICATION_REPOSITORY(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), UNITY_WEBAPPS_TYPE_APPLICATION_REPOSITORY))
 
31
#define UNITY_WEBAPPS_IS_APPLICATION_REPOSITORY_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_WEBAPPS_TYPE_APPLICATION_REPOSITORY))
 
32
#define UNITY_WEBAPPS_APPLICATION_REPOSITORY_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), UNITY_WEBAPPS_TYPE_APPLICATION_REPOSITORY, UnityWebappsApplicationRepositoryClass))
 
33
 
 
34
#include "unity-webapps-available-application.h"
 
35
 
 
36
typedef struct _UnityWebappsApplicationRepositoryPrivate UnityWebappsApplicationRepositoryPrivate;
 
37
 
 
38
typedef struct _UnityWebappsApplicationRepository UnityWebappsApplicationRepository;
 
39
 
 
40
struct _UnityWebappsApplicationRepository {
 
41
        GObject object;
 
42
 
 
43
        UnityWebappsApplicationRepositoryPrivate *priv;
 
44
};
 
45
 
 
46
typedef struct _UnityWebappsApplicationRepositoryClass UnityWebappsApplicationRepositoryClass;
 
47
 
 
48
struct _UnityWebappsApplicationRepositoryClass
 
49
{
 
50
        GObjectClass parent_class;
 
51
};
 
52
 
 
53
typedef enum {
 
54
        UNITY_WEBAPPS_APPLICATION_STATUS_AVAILABLE,
 
55
        UNITY_WEBAPPS_APPLICATION_STATUS_INSTALLED,
 
56
        UNITY_WEBAPPS_APPLICATION_STATUS_UNRESOLVED
 
57
} UnityWebappsApplicationStatus;
 
58
 
 
59
GType unity_webapps_application_repository_get_type (void) G_GNUC_CONST;
 
60
 
 
61
UnityWebappsApplicationRepository *unity_webapps_application_repository_new_default ();
 
62
 
 
63
gboolean
 
64
unity_webapps_application_repository_prepare (UnityWebappsApplicationRepository *repository);
 
65
 
 
66
const gchar * unity_webapps_application_repository_resolve_url (UnityWebappsApplicationRepository *repository, const gchar *url);
 
67
 
 
68
UnityWebappsApplicationStatus
 
69
unity_webapps_application_repository_get_resolved_application_status (UnityWebappsApplicationRepository *repository, const gchar *application);
 
70
 
 
71
typedef void (*UnityWebappsApplicationRepositoryInstallCallback) (UnityWebappsApplicationRepository *repository, const gchar *name, UnityWebappsApplicationStatus status, gpointer user_data);
 
72
 
 
73
void
 
74
unity_webapps_application_repository_install_application (UnityWebappsApplicationRepository *repository, const gchar *name,
 
75
                                                                                                                  UnityWebappsApplicationRepositoryInstallCallback callback, gpointer user_data);
 
76
 
 
77
gchar *
 
78
unity_webapps_application_repository_get_userscript_contents (UnityWebappsApplicationRepository *repository, const gchar *name);
 
79
 
 
80
#endif