Back to index

indicator-power  12.10.0
Protected Member Functions | Protected Attributes | Static Protected Attributes
IndicatorTest Class Reference

List of all members.

Protected Member Functions

virtual void SetUp ()
virtual void TearDown ()
const char * GetAccessibleDesc (IndicatorPower *power) const

Protected Attributes

IndicatorPowerDevice * battery_device

Static Protected Attributes

IndicatorPowerDevice * ac_device

Detailed Description

Definition at line 48 of file test-indicator.cc.


Member Function Documentation

const char* IndicatorTest::GetAccessibleDesc ( IndicatorPower *  power) const [inline, protected]

Definition at line 78 of file test-indicator.cc.

    {
      GList * entries = indicator_object_get_entries (INDICATOR_OBJECT(power));
      g_assert (g_list_length(entries) == 1); 
      IndicatorObjectEntry * entry = static_cast<IndicatorObjectEntry*>(entries->data);
      const char * ret = entry->accessible_desc;
      g_list_free (entries);
      return ret;
    }
virtual void IndicatorTest::SetUp ( ) [inline, protected, virtual]

Definition at line 55 of file test-indicator.cc.

    {
      ensure_glib_initialized ();
         
      g_setenv( "GSETTINGS_SCHEMA_DIR", SCHEMA_DIR, TRUE);

      ac_device = indicator_power_device_new (
        "/org/freedesktop/UPower/devices/line_power_AC",
        UP_DEVICE_KIND_LINE_POWER,
        0.0, UP_DEVICE_STATE_UNKNOWN, 0);

      battery_device = indicator_power_device_new (
        "/org/freedesktop/UPower/devices/battery_BAT0",
        UP_DEVICE_KIND_BATTERY,
        52.871712, UP_DEVICE_STATE_DISCHARGING, 8834);
    }

Here is the call graph for this function:

virtual void IndicatorTest::TearDown ( ) [inline, protected, virtual]

Definition at line 72 of file test-indicator.cc.

    {
      g_object_unref (battery_device);
      g_object_unref (ac_device);
    }

Member Data Documentation

IndicatorPowerDevice* IndicatorTest::ac_device [static, protected]

Definition at line 52 of file test-indicator.cc.

IndicatorPowerDevice* IndicatorTest::battery_device [protected]

Definition at line 53 of file test-indicator.cc.


The documentation for this class was generated from the following file: