~thomas-voss/media-hub/add-display-controller-interface

« back to all changes in this revision

Viewing changes to src/core/media/power/battery_observer.h

  • Committer: thomas-voss
  • Date: 2014-11-12 21:31:46 UTC
  • Revision ID: thomas.voss@canonical.com-20141112213146-zei2v3f01773chlb
Move around implementation.
Remove no longer needed interfaces and implementations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
};
44
44
 
45
45
// Interface that enables observation of the system power state.
46
 
struct StateObserver
 
46
struct BatteryObserver
47
47
{
48
48
    // To safe us some typing.
49
 
    typedef std::shared_ptr<StateObserver> Ptr;
 
49
    typedef std::shared_ptr<BatteryObserver> Ptr;
50
50
 
51
 
    StateObserver() = default;
52
 
    virtual ~StateObserver() = default;
 
51
    BatteryObserver() = default;
 
52
    virtual ~BatteryObserver() = default;
53
53
 
54
54
    // A getable/observable property reporting the current power-level
55
55
    // of the system.
58
58
    // warning is currently presented to the user.
59
59
    virtual const core::Property<bool>& is_warning_active() const = 0;
60
60
};
61
 
}
62
 
}
63
 
}
64
 
}
65
61
 
66
 
namespace com
67
 
{
68
 
namespace canonical
69
 
{
70
 
namespace indicator
71
 
{
72
 
namespace power
73
 
{
74
 
// Creates an instance of a power::StateObserver connecting to indicator power
75
 
// to provide the required functionality.
76
 
// Please note that the lifetime of the ExternalServices helper
77
 
// has to exceed the lifetime of the DisplayController instance.
78
 
core::ubuntu::media::power::StateObserver::Ptr make_state_observer(core::ubuntu::media::helper::ExternalServices&);
 
62
// Creates a BatteryObserver instance that connects to the platform default
 
63
// services to observe battery levels.
 
64
core::ubuntu::media::power::BatteryObserver::Ptr make_platform_default_battery_observer(core::ubuntu::media::helper::ExternalServices&);
79
65
}
80
66
}
81
67
}