Camel.KeyFile

g Camel.KeyFile Camel.KeyFile GObject.Object GObject.Object GObject.Object->Camel.KeyFile

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (path, flags, version)

delete ()

read (start, records)

rename (path)

write (parent, records)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Camel.KeyFile(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Camel.KeyFileClass

classmethod new(path, flags, version)
Parameters:
  • path (str) – a filename with path of the Camel.KeyFile to create

  • flags (int) – open flags

  • version (str) – Version string (header) of file. Currently written but not checked.

Returns:

A new key file, or None if the file could not be opened/created/initialised.

Return type:

Camel.KeyFile or None

Create a new key file. A linked list of record blocks.

delete()
Return type:

int

read(start, records)
Parameters:
  • start (int) – The record pointer. This will be set to the next record pointer on success.

  • records ([int] or None) – Records, allocated, must be freed with GLib.free, if != None.

Returns:

-1 on io error.

Return type:

int

Read the next block of data from the key file. Returns the number of records.

rename(path)
Parameters:

path (str) –

Return type:

int

write(parent, records)
Parameters:
  • parent (int) – a #camel_block_t

  • records ([int]) – an array of #camel_key_t to write

Returns:

-1 on io error. The key file will remain unchanged.

Return type:

int

Write a new list of records to the key file.