~xavi-garcia-mena/ubuntu/vivid/upower/percentages-power-off

« back to all changes in this revision

Viewing changes to devkit-power-gobject/dkp-history-obj.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-02-16 10:16:24 UTC
  • Revision ID: james.westby@ubuntu.com-20100216101624-2cmwqsr1ndftdd87
Tags: upstream-0.9.0+git20100216.72bb2
ImportĀ upstreamĀ versionĀ 0.9.0+git20100216.72bb2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 
2
 *
 
3
 * Copyright (C) 2008 Richard Hughes <richard@hughsie.com>
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation; either version 2 of the License, or
 
8
 * (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program; if not, write to the Free Software
 
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 *
 
19
 */
 
20
 
 
21
#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
 
22
#error "Only <devicekit-power.h> can be included directly."
 
23
#endif
 
24
 
 
25
#ifndef __DKP_HISTORY_OBJ_H__
 
26
#define __DKP_HISTORY_OBJ_H__
 
27
 
 
28
#include <glib.h>
 
29
#include <devkit-power-gobject/dkp-enum.h>
 
30
 
 
31
G_BEGIN_DECLS
 
32
 
 
33
typedef struct
 
34
{
 
35
        guint                    time;
 
36
        gdouble                  value;
 
37
        DkpDeviceState           state;
 
38
} DkpHistoryObj;
 
39
 
 
40
/* compat */
 
41
typedef DkpHistoryObj UpHistoryObj;
 
42
#define up_history_obj_new              dkp_history_obj_new
 
43
#define up_history_obj_create           dkp_history_obj_create
 
44
#define up_history_obj_copy             dkp_history_obj_copy
 
45
#define up_history_obj_free             dkp_history_obj_free
 
46
#define up_history_obj_from_string      dkp_history_obj_from_string
 
47
#define up_history_obj_to_string        dkp_history_obj_to_string
 
48
 
 
49
DkpHistoryObj   *dkp_history_obj_new            (void);
 
50
gboolean         dkp_history_obj_clear          (DkpHistoryObj          *obj);
 
51
void             dkp_history_obj_free           (DkpHistoryObj          *obj);
 
52
DkpHistoryObj   *dkp_history_obj_copy           (const DkpHistoryObj    *cobj);
 
53
gboolean         dkp_history_obj_print          (const DkpHistoryObj    *obj);
 
54
DkpHistoryObj   *dkp_history_obj_create         (gdouble                 value,
 
55
                                                 DkpDeviceState          state);
 
56
gboolean         dkp_history_obj_equal          (const DkpHistoryObj    *obj1,
 
57
                                                 const DkpHistoryObj    *obj2);
 
58
DkpHistoryObj   *dkp_history_obj_from_string    (const gchar            *text);
 
59
gchar           *dkp_history_obj_to_string      (const DkpHistoryObj    *obj);
 
60
 
 
61
G_END_DECLS
 
62
 
 
63
#endif /* __DKP_HISTORY_OBJ_H__ */
 
64