~codygarver/+junk/ind-sess

« back to all changes in this revision

Viewing changes to tests/backend-mock-users.h

  • Committer: Cody Garver
  • Date: 2014-04-03 17:08:08 UTC
  • Revision ID: cody@elementaryos.org-20140403170808-z56s93rorb1dzvmk
Initial import, version 12.10.5+14.04.20140324-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * Authors:
 
5
 *   Charles Kerr <charles.kerr@canonical.com>
 
6
 *
 
7
 * This program is free software: you can redistribute it and/or modify it
 
8
 * under the terms of the GNU General Public License version 3, as published
 
9
 * by the Free Software Foundation.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful, but
 
12
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
13
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
14
 * PURPOSE.  See the GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License along
 
17
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 */
 
19
 
 
20
#ifndef __USERS_MOCK_H__
 
21
#define __USERS_MOCK_H__
 
22
 
 
23
#include <glib.h>
 
24
#include <glib-object.h>
 
25
 
 
26
#include "users.h" /* parent class */
 
27
 
 
28
G_BEGIN_DECLS
 
29
 
 
30
#define INDICATOR_TYPE_SESSION_USERS_MOCK          (indicator_session_users_mock_get_type())
 
31
#define INDICATOR_SESSION_USERS_MOCK(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), INDICATOR_TYPE_SESSION_USERS_MOCK, IndicatorSessionUsersMock))
 
32
#define INDICATOR_SESSION_USERS_MOCK_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), INDICATOR_TYPE_SESSION_USERS_MOCK, IndicatorSessionUsersMockClass))
 
33
#define INDICATOR_IS_SESSION_USERS_MOCK(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), INDICATOR_TYPE_SESSION_USERS_MOCK))
 
34
 
 
35
typedef struct _IndicatorSessionUsersMock        IndicatorSessionUsersMock;
 
36
typedef struct _IndicatorSessionUsersMockPriv    IndicatorSessionUsersMockPriv;
 
37
typedef struct _IndicatorSessionUsersMockClass   IndicatorSessionUsersMockClass;
 
38
 
 
39
/**
 
40
 * An implementation of IndicatorSessionUsers that lies about everything.
 
41
 */
 
42
struct _IndicatorSessionUsersMock
 
43
{
 
44
  /*< private >*/
 
45
  IndicatorSessionUsers parent;
 
46
  IndicatorSessionUsersMockPriv * priv;
 
47
};
 
48
 
 
49
struct _IndicatorSessionUsersMockClass
 
50
{
 
51
  IndicatorSessionUsersClass parent_class;
 
52
};
 
53
 
 
54
GType indicator_session_users_mock_get_type (void);
 
55
 
 
56
IndicatorSessionUsers * indicator_session_users_mock_new (void);
 
57
 
 
58
void indicator_session_users_mock_add_user (IndicatorSessionUsersMock * self,
 
59
                                            IndicatorSessionUser      * user);
 
60
 
 
61
void indicator_session_users_mock_remove_user (IndicatorSessionUsersMock * self,
 
62
                                               guint                       uid);
 
63
 
 
64
 
 
65
 
 
66
G_END_DECLS
 
67
 
 
68
#endif