Namespace

Valent – 1

Connect, control and sync devices

Version1.0.0.alpha.47
AuthorsAndy Holmes
LicenseGPL-3.0-or-later
Websitehttps://valent.andyholmes.ca/
Sourcehttps://github.com/andyholmes/valent/

Build

C headersvalent.h
pkg-config fileslibvalent-1

Dependencies

GObject—2.0 The base type system library
Browse documentation
EBook—1.2 A library for contacts and address books
Browse documentation
Peas—2 A GObject-based plugin engine
Browse documentation

Additional documentation

Classes

Application

The primary application class of Valent.

unstable since: 1.0

ApplicationPlugin

An abstract base class for application plugins.

unstable since: 1.0

Channel

A base class for device connections.

unstable since: 1.0

ChannelService

An abstract base class for connection backends.

unstable since: 1.0

Clipboard

A class for reading and writing the desktop clipboard.

unstable since: 1.0

ClipboardAdapter

An abstract base class for clipboard selections.

unstable since: 1.0

Component

An abstract base class for components.

unstable since: 1.0

Contacts

A class for managing address books.

unstable since: 1.0

ContactsAdapter

An abstract base class for address book providers.

unstable since: 1.0

Context

A class representing a abstract data context.

unstable since: 1.0

Device

A class representing a remote device, such as a smartphone or desktop.

unstable since: 1.0

DeviceManager

A class for discovering and managing devices.

unstable since: 1.0

DevicePlugin

An abstract base class for device plugins.

unstable since: 1.0

DeviceTransfer

A class for device file transfers.

unstable since: 1.0

Extension

An abstract base class for extensions.

unstable since: 1.0

Input

A class for controlling pointer and keyboard devices.

unstable since: 1.0

InputAdapter

An abstract base class for virtual input devices.

unstable since: 1.0

Media

A class for monitoring and controlling media players.

unstable since: 1.0

MediaAdapter

An abstract base class for media player adapters.

unstable since: 1.0

MediaPlayer

A base class for media players.

unstable since: 1.0

Message

MessageAttachment

Messages

A class for managing address books.

unstable since: 1.0

MessagesAdapter

An abstract base class for address book providers.

unstable since: 1.0

Mixer

A class for monitoring and controlling the system volume.

unstable since: 1.0

MixerAdapter

An abstract base class for audio mixers.

unstable since: 1.0

MixerStream

A base class for mixer streams.

unstable since: 1.0

Notification

A class representing a notification.

unstable since: 1.0

Notifications

A class for sending and receiving notifications.

unstable since: 1.0

NotificationsAdapter

An abstract base class for notification servers.

unstable since: 1.0

Object

A base class for objects.

unstable since: 1.0

Resource

ValentResource is an interface that represents a resource.

unstable since: 1.0

Session

A class for monitoring the session state.

unstable since: 1.0

SessionAdapter

An abstract base class for session managers.

unstable since: 1.0

Transfer

An abstract base class for data transfers.

unstable since: 1.0

Enumerations

MediaRepeat

Enumeration of loop modes.

unstable since: 1.0

MediaState

Media state flags.

unstable since: 1.0

MessageBox

Enumeration of message types. These are the same as those used in Android, however only VALENT_MESSAGE_BOX_SENT and VALENT_MESSAGE_BOX_INBOX are used currently.

unstable since: 1.0

MixerDirection

Enumeration of stream directions.

unstable since: 1.0

PluginState

unstable since: 1.0

TransferState

Enumeration of transfer states.

unstable since: 1.0

Bitfields

DeviceState

Device state flags.

unstable since: 1.0

MediaActions

Media action flags.

unstable since: 1.0

Error Domains

PacketError

Error enumeration for KDE Connect packet validation.

unstable since: 1.0

Functions

certificate_get_common_name

Get the common name from certificate, which by convention in KDE Connect is the single source of truth for a device’s ID.

unstable since: 1.0

certificate_get_public_key

Get the public key of certificate.

unstable since: 1.0

certificate_new

Get a TLS certificate and private key pair.

unstable since: 1.0

certificate_new_finish

Finish an operation started by valent_certificate_new().

unstable since: 1.0

certificate_new_sync

Get a TLS certificate and private key pair.

unstable since: 1.0

check_version

Run-time version check.

unstable since: 1.0

contact_resource_from_econtact

core_get_resource

debug_clear

Shutdown logging for Valent.

unstable since: 1.0

debug_init

Initializes logging for Valent.

unstable since: 1.0

get_main_thread

Get the main thread.

unstable since: 1.0

get_major_version

Get the major version component of the Valent library.

unstable since: 1.0

get_micro_version

Get the micro version component of the Valent library.

unstable since: 1.0

get_minor_version

Get the minor version component of the Valent library.

unstable since: 1.0

get_plugin_engine

Get the global PeasEngine.

unstable since: 1.0

get_user_directory

Returns the full path of a special directory using its logical id.

unstable since: 1.0

get_user_file

A convenience for creating a GFile.

unstable since: 1.0

packet_check_field

Check packet for field and return TRUE if present, with two exceptions:.

unstable since: 1.0

packet_deserialize

Convenience function that deserializes a KDE Connect packet from a string with basic validation. If str is empty, this function will return NULL.

unstable since: 1.0

packet_dup_strv

Lookup field in the body of packet and return a newly allocated list of strings.

unstable since: 1.0

packet_end

Finish a packet created with valent_packet_init().

unstable since: 1.0

packet_error_quark

packet_from_stream

Read a KDE Connect packet from an input stream.

unstable since: 1.0

packet_get_array

Lookup field in the body of packet and assign it to value.

unstable since: 1.0

packet_get_body

Convenience function for getting the packet body of a KDE Connect packet.

unstable since: 1.0

packet_get_boolean

Lookup field in the body of packet and assign it to value.

unstable since: 1.0

packet_get_double

Lookup field in the body of packet and assign it to value.

unstable since: 1.0

packet_get_id

Convenience function for getting the timestamp of a KDE Connect packet.

unstable since: 1.0

packet_get_int

Lookup field in the body of packet and assign it to value.

unstable since: 1.0

packet_get_object

Lookup field in the body of packet and assign it to value.

unstable since: 1.0

packet_get_payload_full

A convenience for retrieving the payloadTransferInfo and payloadSize fields from packet.

unstable since: 1.0

packet_get_payload_info

A convenience for retrieve the ‘payloadTransferInfofield frompacket`.

unstable since: 1.0

packet_get_payload_size

Get the payloadSize field of packet in bytes.

unstable since: 1.0

packet_get_string

Lookup field in the body of packet and assign it to value.

unstable since: 1.0

packet_get_type

Convenience function for getting the capability type of a KDE Connect packet.

unstable since: 1.0

packet_has_payload

Return TRUE if the packet holds valid transfer information. Payload information is considered invalid in the following cases:.

unstable since: 1.0

packet_init

Initialize a JsonBuilder and KDE Connect packet.

unstable since: 1.0

packet_new

A convenience function for creating a new KDE Connect packet with the type field set to type.

unstable since: 1.0

packet_serialize

Convenience function that updates the timestamp of a packet before returning a serialized string with newline ending, ready to be written to a stream.

unstable since: 1.0

packet_set_payload_full

A convenience method for setting the payloadTransferInfo and payloadSize fields on packet.

unstable since: 1.0

packet_set_payload_info

A convenience method for setting the payloadTransferInfo field on packet.

unstable since: 1.0

packet_set_payload_size

Set the payloadSize field of packet to size.

unstable since: 1.0

packet_to_stream

A convenience function for writing a packet to a connection.

unstable since: 1.0

packet_validate

Check if packet is a well-formed KDE Connect packet.

unstable since: 1.0

timestamp_ms

Get a current UNIX epoch timestamp in milliseconds.

unstable since: 1.0

Function Macros

CHECK_VERSION

Compile-time version check.

GOTO

Traces the jump to a label in a function. Use this instead of goto to jump to _l and log the label.

unstable since: 1.0

JSON

Logs _node as pretty-printed JSON at G_LOG_LEVEL_DEBUG, prefixed with _ctx for context.

unstable since: 1.0

NOTE

Logs a formatted message at VALENT_LOG_LEVEL_TRACE.

unstable since: 1.0

RETURN

Traces the exit from a function. Use this instead of return to return _r and log the function exiting.

unstable since: 1.0

Constants

API_VERSION

The API version of libvalent, encoded as a string (eg. "1.0").

CONTACTS_GRAPH

The SPARQL graph name for contacts in Valent.

ENABLE_DEBUG

Whether debugging is enabled.

ENABLE_TRACE

Whether tracing is enabled.

LOG_LEVEL_TRACE

The GLogLevelFlags log level for trace messages in Valent.

MAJOR_VERSION

The major version component of libvalent (e.g. 1 if for 1.2.3).

MESSAGES_GRAPH

The SPARQL graph name for messages in Valent.

MICRO_VERSION

The micro version component of libvalent (e.g. 3 if for 1.2.3).

MINOR_VERSION

The minor version component of libvalent (e.g. 2 if for 1.2.3).

POINTER_MIDDLE

The middle button.

POINTER_PRIMARY

The primary button.

POINTER_SECONDARY

The primary button.

VCS_TAG

VERSION

The full version of libvalent, encoded as a string (eg. "1.0.0.alpha").