Skip to main content

NetworkPacketType

Enum NetworkPacketType 

Source
pub enum NetworkPacketType {
Show 43 variants Identity, Pair, Battery, Clipboard, ClipboardConnect, ConnectivityReport, ContactsRequestAllUidsTimestamps, ContactsRequestVcardByUid, ContactsResponseUidsTimestamps, ContactsResponseVcards, DigitizerSession, Digitizer, FindmyphoneRequest, Lock, LockRequest, MousepadEcho, MousepadKeyboardState, MousepadRequest, Mpris, MprisRequest, Notification, NotificationAction, NotificationReply, NotificationRequest, Ping, Presenter, RunCommand, RunCommandRequest, Sftp, SftpRequest, ShareRequest, ShareRequestUpdate, SmsAttachmentFile, SmsMessages, SmsRequest, SmsRequestAttachment, SmsRequestConversation, SmsRequestConversations, SystemVolume, SystemVolumeRequest, Telephony, TelephonyRequestMute, Other(String),
}
Expand description

The type of a NetworkPacket.

It’s used to define which packet types are supported by a plugin, see Plugin::supported_incoming_packets and Plugin::supported_outgoing_packets.

Variants§

§

Identity

The KDE Connect identity packet is used to identify devices and their capabilities.

§

Pair

The KDE Connect pair packet is used to negotiate pairing between devices.

§

Battery

This packet is a battery status update.

§

Clipboard

This packet is sent when the clipboard content changes. In other words, it is typically sent when the selection owner changes.

§

ClipboardConnect

This packet is only sent when a device connects and allows syncing clipboard text content between devices.

§

ConnectivityReport

This packet allows a device to expose the status of its connectivity.

§

ContactsRequestAllUidsTimestamps

This packet is a request for a list of contact UIDs with modification timestamps.

§

ContactsRequestVcardByUid

This packet is a request for a list of contact UIDs with vCard data.

§

ContactsResponseUidsTimestamps

This packet is a list of contact UIDs with modification timestamps.

§

ContactsResponseVcards

This packet is a list of contact UIDs with vCard data.

§

DigitizerSession

This packet either starts or stops a drawing tablet session. The session is started when this packet is sent with a start action. When it is started, it includes the information necessary to create a fake drawing tablet device on the receiver. The session is ended when this packet is sent with an end action, or the device disconnects. It is valid to send both a start or an end packet regardless whether a session exists or not. If a session exists and a start packet is sent, the session will be first ended, and then another session will be started. If no session exists and an end packet is sent, nothing will happen.

§

Digitizer

This packet is a stylus (or finger) event. kdeconnect.digitizer packets must not be sent until a session has been started. You may start a session by sending the kdeconnect.digitizer.session packet with the field action set to start, and filling the appropriate fields.

§

FindmyphoneRequest

This packet is a request for a device to announce its location. By convention, sending a second packet cancels the request.

§

Lock

This packet is a lock status update.

§

LockRequest

This packet is a request for a lock status update or change.

§

MousepadEcho

This packet is an echo for a kdeconnect.mousepad.request packet.

§

MousepadKeyboardState

This packet is a keyboard status update.

§

MousepadRequest

This packet is a request for a pointer or keyboard event.

§

Mpris

This packet is used for two things: if it contains a playerList field, it is used to enumerate the available media players to a remote device; if it contains a player field, it is used to report the status of a specific media player. Note that player packets can be incremental, ie: only contain the fields that changed since the last update.

§

MprisRequest

This packet is used to request the status of remote media players, issue commands, and request the transfer of album art payloads.

§

Notification

This packet is a notification.

§

NotificationAction

This packet is an activation of a notification action.

§

NotificationReply

This packet is a reply for a repliable notification.

§

NotificationRequest

This packet is a request for notifications.

§

Ping

This packet is a ping request.

§

Presenter

This packet is a presentation remote event.

§

RunCommand

This packet is a list of available commands.

§

RunCommandRequest

This packet is a runcommand status update.

§

Sftp

This packet contains SFTP login information.

§

SftpRequest

This packet is a request to start SFTP.

§

ShareRequest

This packet is an upload request.

§

ShareRequestUpdate

This packet is the metadata for a multi-file transfer. By convention it is sent in advance of the packets containing the payload, which will include the same fields, potentially with updated totals.

§

SmsAttachmentFile

This packet is a message attachment transfer.

§

SmsMessages

This packet is a list of messages.

§

SmsRequest

This packet is a request to send an SMS/MMS message.

§

SmsRequestAttachment

This packet is a request for a message attachment.

§

SmsRequestConversation

This packet is a request for messages from a thread.

§

SmsRequestConversations

This packet is a request for the latest message in each thread.

§

SystemVolume

This packet is a mixer stream state update.

§

SystemVolumeRequest

This packet is a audio stream request. It is used to request both the list of streams and changes to those streams.

§

Telephony

This packet is a telephony event, such as the phone ringing.

§

TelephonyRequestMute

This packet is sent to request the ringer be muted.

§

Other(String)

Another type of packet that a library user can implement to handle special custom actions.

Trait Implementations§

Source§

impl Clone for NetworkPacketType

Source§

fn clone(&self) -> NetworkPacketType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NetworkPacketType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for NetworkPacketType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for NetworkPacketType

Source§

fn eq(&self, other: &NetworkPacketType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for NetworkPacketType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for NetworkPacketType

Source§

impl StructuralPartialEq for NetworkPacketType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,