summaryrefslogtreecommitdiff
path: root/tests/lib/textchan-null.h
blob: 583bec571bca025f7597c01cf5867a8688f69800 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
 * /dev/null as a text channel
 *
 * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
 * Copyright (C) 2008 Nokia Corporation
 *
 * Copying and distribution of this file, with or without modification,
 * are permitted in any medium without royalty provided the copyright
 * notice and this notice are preserved.
 */

#ifndef __TP_TESTS_TEXT_CHANNEL_NULL_H__
#define __TP_TESTS_TEXT_CHANNEL_NULL_H__

#include <glib-object.h>
#include <telepathy-glib/base-connection.h>
#include <telepathy-glib/text-mixin.h>
#include <telepathy-glib/group-mixin.h>

G_BEGIN_DECLS

typedef struct _TpTestsTextChannelNull TpTestsTextChannelNull;
typedef struct _TpTestsTextChannelNullClass TpTestsTextChannelNullClass;
typedef struct _TpTestsTextChannelNullPrivate TpTestsTextChannelNullPrivate;

GType tp_tests_text_channel_null_get_type (void);

#define TP_TESTS_TYPE_TEXT_CHANNEL_NULL \
  (tp_tests_text_channel_null_get_type ())
#define TP_TESTS_TEXT_CHANNEL_NULL(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TESTS_TYPE_TEXT_CHANNEL_NULL, \
                               TpTestsTextChannelNull))
#define TP_TESTS_TEXT_CHANNEL_NULL_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), TP_TESTS_TYPE_TEXT_CHANNEL_NULL, \
                            TpTestsTextChannelNullClass))
#define TP_TESTS_IS_TEXT_CHANNEL_NULL(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TESTS_TYPE_TEXT_CHANNEL_NULL))
#define TP_TESTS_IS_TEXT_CHANNEL_NULL_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), TP_TESTS_TYPE_TEXT_CHANNEL_NULL))
#define TP_TESTS_TEXT_CHANNEL_NULL_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_TEXT_CHANNEL_NULL, \
                              TpTestsTextChannelNullClass))

struct _TpTestsTextChannelNullClass {
    GObjectClass parent_class;

    TpTextMixinClass text_class;
};

struct _TpTestsTextChannelNull {
    GObject parent;
    TpTextMixin text;

    guint get_handle_called;
    guint get_interfaces_called;
    guint get_channel_type_called;

    TpTestsTextChannelNullPrivate *priv;
};

/* Subclass with D-Bus properties */

typedef struct _TestPropsTextChannel TpTestsPropsTextChannel;
typedef struct _TestPropsTextChannelClass TpTestsPropsTextChannelClass;

struct _TestPropsTextChannel {
    TpTestsTextChannelNull parent;

    GHashTable *dbus_property_interfaces_retrieved;
};

struct _TestPropsTextChannelClass {
    TpTestsTextChannelNullClass parent;

    TpDBusPropertiesMixinClass dbus_properties_class;
};

GType tp_tests_props_text_channel_get_type (void);

#define TP_TESTS_TYPE_PROPS_TEXT_CHANNEL \
  (tp_tests_props_text_channel_get_type ())
#define TP_TESTS_PROPS_TEXT_CHANNEL(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TESTS_TYPE_PROPS_TEXT_CHANNEL, \
                               TpTestsPropsTextChannel))
#define TP_TESTS_PROPS_TEXT_CHANNEL_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), TP_TESTS_TYPE_PROPS_TEXT_CHANNEL, \
                            TpTestsPropsTextChannelClass))
#define TP_TESTS_IS_PROPS_TEXT_CHANNEL(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TESTS_TYPE_PROPS_TEXT_CHANNEL))
#define TP_TESTS_IS_PROPS_TEXT_CHANNEL_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), TP_TESTS_TYPE_PROPS_TEXT_CHANNEL))
#define TP_TESTS_PROPS_TEXT_CHANNEL_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_PROPS_TEXT_CHANNEL, \
                              TpTestsPropsTextChannelClass))

/* Subclass with D-Bus properties and Group */

typedef struct _TestPropsGroupTextChannel TpTestsPropsGroupTextChannel;
typedef struct _TestPropsGroupTextChannelClass TpTestsPropsGroupTextChannelClass;

struct _TestPropsGroupTextChannel {
    TpTestsPropsTextChannel parent;

    TpGroupMixin group;
};

struct _TestPropsGroupTextChannelClass {
    TpTestsPropsTextChannelClass parent;

    TpGroupMixinClass group_class;
};

GType tp_tests_props_group_text_channel_get_type (void);

#define TP_TESTS_TYPE_PROPS_GROUP_TEXT_CHANNEL \
  (tp_tests_props_group_text_channel_get_type ())
#define TP_TESTS_PROPS_GROUP_TEXT_CHANNEL(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TESTS_TYPE_PROPS_GROUP_TEXT_CHANNEL, \
                               TpTestsPropsGroupTextChannel))
#define TP_TESTS_PROPS_GROUP_TEXT_CHANNEL_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), TP_TESTS_TYPE_PROPS_GROUP_TEXT_CHANNEL, \
                            TpTestsPropsGroupTextChannelClass))
#define TP_TESTS_IS_PROPS_GROUP_TEXT_CHANNEL(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TESTS_TYPE_PROPS_GROUP_TEXT_CHANNEL))
#define TP_TESTS_IS_PROPS_GROUP_TEXT_CHANNEL_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), TP_TESTS_TYPE_PROPS_GROUP_TEXT_CHANNEL))
#define TP_TESTS_PROPS_GROUP_TEXT_CHANNEL_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_PROPS_GROUP_TEXT_CHANNEL, \
                              TpTestsPropsGroupTextChannelClass))

void tp_tests_text_channel_null_close (TpTestsTextChannelNull *self);

GHashTable * tp_tests_text_channel_get_props (TpTestsTextChannelNull *self);

G_END_DECLS

#endif /* #ifndef __TP_TESTS_TEXT_CHANNEL_NULL_H__ */