Passim.Client

g GObject.Object GObject.Object Passim.Client Passim.Client GObject.Object->Passim.Client

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_carbon_saving ()

get_download_saving ()

get_items ()

get_name ()

get_status ()

get_uri ()

get_version ()

load ()

publish (item)

unpublish (hash)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Passim.Client(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Passim.ClientClass

A shared client.

classmethod new()
Returns:

a new Passim.Client

Return type:

Passim.Client

Creates a new client.

New in version 0.1.0.

get_carbon_saving()
Returns:

kgs of CO₂e

Return type:

float

Gets the carbon saving from using this project.

New in version 0.1.6.

get_download_saving()
Returns:

bytes

Return type:

int

Gets the total number of bytes saved from using this project.

New in version 0.1.6.

get_items()
Raises:

GLib.Error

Returns:

items, or None for error

Return type:

[Passim.Item]

Get items currently published by the daemon.

New in version 0.1.0.

get_name()
Returns:

the name string, or None if unset

Return type:

str

Gets the daemon name.

New in version 0.1.6.

get_status()
Returns:

the Passim.Status

Return type:

Passim.Status

Gets the daemon status.

New in version 0.1.2.

get_uri()
Returns:

the URI string, or None if unset

Return type:

str

Gets the daemon URI.

New in version 0.1.6.

get_version()
Returns:

the version string, or None if unset

Return type:

str

Gets the daemon version.

New in version 0.1.0.

load()
Raises:

GLib.Error

Returns:

True for success

Return type:

bool

Loads properties from the passim daemon.

New in version 0.1.0.

publish(item)
Parameters:

item (Passim.Item) – a Passim.Item

Raises:

GLib.Error

Returns:

True for success

Return type:

bool

Connects to the remote server.

New in version 0.1.0.

unpublish(hash)
Parameters:

hash (str) – an item hash value

Raises:

GLib.Error

Returns:

True for success

Return type:

bool

Unpublish a file from the index.

New in version 0.1.0.