~larsu/indicator-session/glib-deadlock-workaround

« back to all changes in this revision

Viewing changes to tests/backend-dbus/mock-webcredentials.h

  • Committer: Charles Kerr
  • Date: 2013-03-22 21:34:34 UTC
  • mto: (384.2.29 ng)
  • mto: This revision was merged to the branch mainline in revision 399.
  • Revision ID: charles.kerr@canonical.com-20130322213434-a85qbob8bi4fvfx2
port indicator-session to GMenu/cmake. Code coverage increased from 0% to 95.4%.

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 MOCK_WEBCREDENTIALS_H
 
21
#define MOCK_WEBCREDENTIALS_H
 
22
 
 
23
#include "mock-object.h" // parent class
 
24
#include "backend-dbus/dbus-webcredentials.h" // Webcredentials
 
25
 
 
26
class MockWebcredentials: public MockObject
 
27
{
 
28
  public:
 
29
 
 
30
    MockWebcredentials (GMainLoop       * loop,
 
31
                        GDBusConnection * bus_connection);
 
32
    virtual ~MockWebcredentials ();
 
33
 
 
34
    bool has_error () const { return webcredentials_get_error_status (my_skeleton); }
 
35
    bool set_error (bool b) const { webcredentials_set_error_status (my_skeleton, b); }
 
36
 
 
37
  private:
 
38
 
 
39
    Webcredentials * my_skeleton;
 
40
};
 
41
 
 
42
#endif