~ubuntu-branches/ubuntu/wily/indicator-power/wily

« back to all changes in this revision

Viewing changes to tests/indicator-power-service-cmdline-battery.cc

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-09-09 04:22:52 UTC
  • mto: This revision was merged to the branch mainline in revision 68.
  • Revision ID: package-import@ubuntu.com-20140909042252-9sk6yny4de760g8l
Tags: upstream-12.10.6+14.10.20140909
ImportĀ upstreamĀ versionĀ 12.10.6+14.10.20140909

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
on_name_lost (gpointer instance G_GNUC_UNUSED, gpointer loop)
38
38
{
39
39
  g_message ("exiting: service couldn't acquire or lost ownership of busname");
40
 
  g_main_loop_quit ((GMainLoop*)loop);
 
40
  g_main_loop_quit (static_cast<GMainLoop*>(loop));
41
41
}
42
42
 
43
43
static IndicatorPowerDevice * battery = nullptr;
83
83
int
84
84
main (int argc G_GNUC_UNUSED, char ** argv G_GNUC_UNUSED)
85
85
{
86
 
  g_message ("This app is basically the same as indicator-power-service but,\n"
87
 
             "instead of the system's real devices, sees a single fake battery\n"
88
 
             "which can be manipulated by typing commands:\n"
89
 
             "'charging', 'discharging', a charge percentage, or ctrl-c.");
 
86
  g_print("This test app has the same code as indicator-power-service\n"
 
87
          "except instead of listening to UPower, it has a fake battery\n"
 
88
          "which you can edit with keyboard inputs. Supported commands:\n"
 
89
          "1. A number in [0..100] to set battery level\n"
 
90
          "2. 'charging'\n"
 
91
          "3. 'discharging'\n"
 
92
          "4. ctrl-c to exit\n");
90
93
 
91
94
  IndicatorPowerDeviceProvider * device_provider;
92
95
  IndicatorPowerService * service;