up-history-item: UPower Reference Manual

## up-history-item up-history-item — Helper object representing one item of historical data. |

## Functions

UpHistoryItem * | up_history_item_new ()
gdouble | up_history_item_get_value ()
void | up_history_item_set_value ()
guint | up_history_item_get_time ()
void | up_history_item_set_time ()
void | up_history_item_set_time_to_present ()
UpDeviceState | up_history_item_get_state ()
void | up_history_item_set_state ()
gchar * | up_history_item_to_string ()
gboolean | up_history_item_set_from_string ()

## Description

This object represents one item of data which may be returned from the daemon in response to a query.

See also: UpDevice, UpClient

## Functions

### up_history_item_new ()

    UpHistoryItem *
    up_history_item_new (void);

#### Returns

a new UpHistoryItem object.

Since: 0.9.0

### up_history_item_get_value ()

    gdouble
    up_history_item_get_value (UpHistoryItem *history_item);

Gets the item value.

#### Parameters

history_item | UpHistoryItem |

Since: 0.9.0

### up_history_item_set_value ()

    void
    up_history_item_set_value (UpHistoryItem *history_item,
                               gdouble value);

Sets the item value.

#### Parameters

history_item | UpHistoryItem |
value | the new value |

Since: 0.9.0

### up_history_item_get_time ()

    guint
    up_history_item_get_time (UpHistoryItem *history_item);

Gets the item time.

#### Parameters

history_item | UpHistoryItem |

Since: 0.9.0

### up_history_item_set_time ()

    void
    up_history_item_set_time (UpHistoryItem *history_item,
                              guint time);

Sets the item time.

#### Parameters

history_item | UpHistoryItem |
time | the new value |

Since: 0.9.0

### up_history_item_set_time_to_present ()

    void
    up_history_item_set_time_to_present (UpHistoryItem *history_item);

Sets the item time to the present value.

#### Parameters

history_item | UpHistoryItem |

Since: 0.9.1

### up_history_item_get_state ()

    UpDeviceState
    up_history_item_get_state (UpHistoryItem *history_item);

Gets the item state.

#### Parameters

history_item | UpHistoryItem |

Since: 0.9.0

### up_history_item_set_state ()

    void
    up_history_item_set_state (UpHistoryItem *history_item,
                               UpDeviceState state);

Sets the item state.

#### Parameters

history_item | UpHistoryItem |
state | the new value |

Since: 0.9.0

### up_history_item_to_string ()

    gchar *
    up_history_item_to_string (UpHistoryItem *history_item);

Converts the history item to a string representation.

#### Parameters

history_item | UpHistoryItem |

Since: 0.9.1

### up_history_item_set_from_string ()

    gboolean
    up_history_item_set_from_string (UpHistoryItem *history_item,
                                     const gchar *text);

Converts the history item to a string representation.

#### Parameters

history_item | UpHistoryItem |

Since: 0.9.1

## Types and Values