Skip to main content

NetworkPacketBody

Enum NetworkPacketBody 

Source
pub enum NetworkPacketBody {
Show 43 variants Identity(IdentityPacket), Pair(PairPacket), Battery(BatteryPacket), Clipboard(ClipboardPacket), ClipboardConnect(ClipboardConnectPacket), ConnectivityReport(ConnectivityReportPacket), ContactsRequestAllUidsTimestamps(()), ContactsRequestVcardByUid(ContactsRequestVcardsByUid), ContactsResponseUidsTimestamps(ContactsResponseUidsTimestamp), ContactsResponseVcards(ContactsResponseVcards), DigitizerSession(DigitizerSessionPacket), Digitizer(DigitizerPacket), FindmyphoneRequest(()), Lock(LockPacket), LockRequest(LockRequestPacket), MousepadEcho(MousepadEchoPacket), MousepadKeyboardState(MousepadKeyboardStatePacket), MousepadRequest(MousepadRequestPacket), Mpris(MprisPacket), MprisRequest(MprisRequestPacket), Notification(NotificationPacket), NotificationAction(NotificationActionPacket), NotificationReply(NotificationReplyPacket), NotificationRequest(NotificationRequestPacket), Ping(PingPacket), Presenter(PresenterPacket), RunCommand(RunCommandPacket), RunCommandRequest(RunCommandRequestPacket), Sftp(SftpPacket), SftpRequest(SftpRequestPacket), ShareRequest(ShareRequestPacket), ShareRequestUpdate(ShareRequestUpdatePacket), SmsAttachmentFile(SmsAttachmentFilePacket), SmsMessages(SmsMessagesPacket), SmsRequest(SmsRequestPacket), SmsRequestAttachment(SmsRequestAttachmentPacket), SmsRequestConversation(SmsRequestConversationPacket), SmsRequestConversations(()), SystemVolume(SystemVolumePacket), SystemVolumeRequest(SystemVolumeRequestPacket), Telephony(TelephonyPacket), TelephonyRequestMute(()), Other(Value),
}
Expand description

The payload of a NetworkPacket.

Variants§

§

Identity(IdentityPacket)

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

§

Pair(PairPacket)

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

§

Battery(BatteryPacket)

This packet is a battery status update.

§

Clipboard(ClipboardPacket)

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

§

ClipboardConnect(ClipboardConnectPacket)

This packet is only sent when a device connects.

§

ConnectivityReport(ConnectivityReportPacket)

This packet is a connectivity report.

§

ContactsRequestAllUidsTimestamps(())

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

§

ContactsRequestVcardByUid(ContactsRequestVcardsByUid)

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

§

ContactsResponseUidsTimestamps(ContactsResponseUidsTimestamp)

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

§

ContactsResponseVcards(ContactsResponseVcards)

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

§

DigitizerSession(DigitizerSessionPacket)

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(DigitizerPacket)

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(LockPacket)

This packet is a lock status update.

§

LockRequest(LockRequestPacket)

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

§

MousepadEcho(MousepadEchoPacket)

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

§

MousepadKeyboardState(MousepadKeyboardStatePacket)

This packet is a keyboard status update.

§

MousepadRequest(MousepadRequestPacket)

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

§

Mpris(MprisPacket)

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(MprisRequestPacket)

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

§

Notification(NotificationPacket)

This packet is a notification.

§

NotificationAction(NotificationActionPacket)

This packet is an activation of a notification action.

§

NotificationReply(NotificationReplyPacket)

This packet is a reply for a repliable notification.

§

NotificationRequest(NotificationRequestPacket)

This packet is a request for notifications.

§

Ping(PingPacket)

This packet is a ping request.

§

Presenter(PresenterPacket)

This packet is a presentation remote event.

§

RunCommand(RunCommandPacket)

This packet is a list of available commands.

§

RunCommandRequest(RunCommandRequestPacket)

This packet is a runcommand status update.

§

Sftp(SftpPacket)

This packet contains SFTP login information.

§

SftpRequest(SftpRequestPacket)

This packet is a request to start SFTP.

§

ShareRequest(ShareRequestPacket)

This packet is an upload request.

§

ShareRequestUpdate(ShareRequestUpdatePacket)

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(SmsAttachmentFilePacket)

This packet is a message attachment transfer.

§

SmsMessages(SmsMessagesPacket)

This packet is a list of messages.

§

SmsRequest(SmsRequestPacket)

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

§

SmsRequestAttachment(SmsRequestAttachmentPacket)

This packet is a request for a message attachment.

§

SmsRequestConversation(SmsRequestConversationPacket)

This packet is a request for messages from a thread.

§

SmsRequestConversations(())

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

§

SystemVolume(SystemVolumePacket)

This packet is a mixer stream state update.

§

SystemVolumeRequest(SystemVolumeRequestPacket)

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

§

Telephony(TelephonyPacket)

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

§

TelephonyRequestMute(())

This packet is sent to request the ringer be muted.

§

Other(Value)

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

Implementations§

Trait Implementations§

Source§

impl Clone for NetworkPacketBody

Source§

fn clone(&self) -> NetworkPacketBody

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 NetworkPacketBody

Source§

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

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

impl<'de> Deserialize<'de> for NetworkPacketBody

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 Serialize for NetworkPacketBody

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

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<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>,