~xubuntu-dev/ubiquity/lp1437180_feh

« back to all changes in this revision

Viewing changes to src/mockresolver/mockresolver.h

  • Committer: Colin Watson
  • Date: 2012-04-30 23:38:41 UTC
  • mfrom: (5402 trunk)
  • mto: This revision was merged to the branch mainline in revision 5403.
  • Revision ID: cjwatson@canonical.com-20120430233841-xb0qsk46lnhski7m
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* MockResolver - a very stupid resolver used in test code
 
2
 *
 
3
 * This resolver always resolves a given hostname successfully, and returns
 
4
 * an error for anything else.  It only implements just enough of the API to
 
5
 * fool the usersetup plugin.
 
6
 *
 
7
 * Copyright (C) 2012 Canonical Ltd.
 
8
 * Author: Colin Watson <cjwatson@ubuntu.com>
 
9
 *
 
10
 * This file is part of Ubiquity.
 
11
 *
 
12
 * Ubiquity is free software; you can redistribute it and/or modify it under
 
13
 * the terms of the GNU General Public License as published by the Free
 
14
 * Software Foundation; either version 2 of the License, or at your option)
 
15
 * any later version.
 
16
 *
 
17
 * Ubiquity is distributed in the hope that it will be useful, but WITHOUT
 
18
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
19
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 
20
 * more details.
 
21
 *
 
22
 * You should have received a copy of the GNU General Public License along
 
23
 * with Ubiquity; if not, write to the Free Software Foundation, Inc., 51
 
24
 * Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
25
 */
 
26
 
 
27
#ifndef _UBIQUITY_MOCK_RESOLVER_H
 
28
#define _UBIQUITY_MOCK_RESOLVER_H
 
29
 
 
30
#include <glib.h>
 
31
#include <glib-object.h>
 
32
#include <gio/gio.h>
 
33
 
 
34
G_BEGIN_DECLS
 
35
 
 
36
#define UBIQUITY_TYPE_MOCK_RESOLVER ubiquity_mock_resolver_get_type()
 
37
 
 
38
#define UBIQUITY_MOCK_RESOLVER(obj) \
 
39
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
 
40
  UBIQUITY_TYPE_MOCK_RESOLVER, UbiquityMockResolver))
 
41
 
 
42
#define UBIQUITY_MOCK_RESOLVER_CLASS(klass) \
 
43
  (G_TYPE_CHECK_CLASS_CAST ((klass), \
 
44
  UBIQUITY_TYPE_MOCK_RESOLVER, UbiquityMockResolverClass))
 
45
 
 
46
#define UBIQUITY_IS_MOCK_RESOLVER(obj) \
 
47
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
 
48
  UBIQUITY_TYPE_MOCK_RESOLVER))
 
49
 
 
50
#define UBIQUITY_IS_MOCK_RESOLVER_CLASS(klass) \
 
51
  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
 
52
  UBIQUITY_TYPE_MOCK_RESOLVER))
 
53
 
 
54
#define UBIQUITY_MOCK_RESOLVER_GET_CLASS(obj) \
 
55
  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
 
56
  UBIQUITY_TYPE_MOCK_RESOLVER, UbiquityMockResolverClass))
 
57
 
 
58
typedef struct _UbiquityMockResolver UbiquityMockResolver;
 
59
typedef struct _UbiquityMockResolverClass UbiquityMockResolverClass;
 
60
typedef struct _UbiquityMockResolverPrivate UbiquityMockResolverPrivate;
 
61
 
 
62
struct _UbiquityMockResolver
 
63
{
 
64
  GResolver parent;
 
65
 
 
66
  UbiquityMockResolverPrivate *priv;
 
67
};
 
68
 
 
69
struct _UbiquityMockResolverClass
 
70
{
 
71
  GResolverClass parent_class;
 
72
};
 
73
 
 
74
GType ubiquity_mock_resolver_get_type (void) G_GNUC_CONST;
 
75
 
 
76
UbiquityMockResolver *ubiquity_mock_resolver_new (void);
 
77
 
 
78
G_END_DECLS
 
79
 
 
80
#endif /* _UBIQUITY_MOCK_RESOLVER_H */