Libmsi.Record

g GObject.Object GObject.Object Libmsi.Record Libmsi.Record GObject.Object->Libmsi.Record

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (count)

clear ()

get_field_count ()

get_int (field)

get_stream (field)

get_string (field)

is_null (field)

load_stream (field, filename)

set_int (field, val)

set_stream (field, input, count, cancellable)

set_string (field, val)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

count

int

r/w/co

count

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Libmsi.Record(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Libmsi.RecordClass

classmethod new(count)
Parameters:

count (int) –

Return type:

Libmsi.Record

clear()
Returns:

True on success.

Return type:

bool

Clear record fields.

get_field_count()
Returns:

the number of record fields.

Return type:

int

get_int(field)
Parameters:

field (int) – a field identifier

Returns:

The integer value, or Libmsi.NULL_INT if the field is not an integer.

Return type:

int

Get the integer value of %field. If the field is a string representing an integer, it will be converted to an integer value. Other values and types will return Libmsi.NULL_INT.

get_stream(field)
Parameters:

field (int) – a field identifier

Returns:

a new Gio.InputStream

Return type:

Gio.InputStream

Get the stream associated with the given record field.

get_string(field)
Parameters:

field (int) – a field identifier

Returns:

a string, or None on error.

Return type:

str

Get a string representation of %field.

is_null(field)
Parameters:

field (int) – a field identifier

Returns:

True if the field is null (or %field > record field count)

Return type:

bool

load_stream(field, filename)
Parameters:
  • field (int) – a field identifier

  • filename (str) – a filename or None

Returns:

True on success.

Return type:

bool

Load the file content as a stream in field.

set_int(field, val)
Parameters:
  • field (int) – a field identifier

  • val (int) – value to set field to

Returns:

True on success.

Return type:

bool

Set the %field to the integer value %val.

set_stream(field, input, count, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success

Return type:

bool

Set the stream content from input stream.

set_string(field, val)
Parameters:
  • field (int) – a field identifier

  • val (str) – a string or None

Returns:

True on success.

Return type:

bool

Set the %field value to %val string.

Property Details

Libmsi.Record.props.count
Name:

count

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

count