TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Signals | Public Member Functions | Private Slots | List of all members
TTKLocalPeer Class Reference

The class of the ttk local peer. More...

#include <ttklocalpeer.h>

+ Inheritance diagram for TTKLocalPeer:

Signals

void messageReceived (const QString &message)
 

Public Member Functions

 TTKLocalPeer (QObject *parent=nullptr, const QString &id={})
 
bool isClient () const
 
bool sendMessage (const QString &message, int timeout) const
 
QString applicationId () const
 

Private Slots

void receiveConnection ()
 

Detailed Description

The class of the ttk local peer.

Author
Greedysky greed.nosp@m.ysky.nosp@m.@163..nosp@m.com

Definition at line 29 of file ttklocalpeer.h.

Constructor & Destructor Documentation

TTKLocalPeer::TTKLocalPeer ( QObject *  parent = nullptr,
const QString &  id = {} 
)
explicit

Object constructor.

Definition at line 67 of file ttklocalpeer.cpp.

Member Function Documentation

QString TTKLocalPeer::applicationId ( ) const

Get current server id.

Definition at line 199 of file ttklocalpeer.cpp.

References TTK_D.

bool TTKLocalPeer::isClient ( ) const

Current client is running or not.

Definition at line 119 of file ttklocalpeer.cpp.

References qPrintable, receiveConnection(), TTK_D, TTK_WARN_STREAM, and TTKLockedPrivate::TTKLockedFile::WriteLock.

Referenced by sendMessage().

void TTKLocalPeer::messageReceived ( const QString &  message)
signal

Emit when the current message received.

Referenced by receiveConnection().

void TTKLocalPeer::receiveConnection ( )
privateslot

Current message received.

Definition at line 205 of file ttklocalpeer.cpp.

References messageReceived(), TTK_D, and TTK_WARN_STREAM.

Referenced by isClient().

bool TTKLocalPeer::sendMessage ( const QString &  message,
int  timeout 
) const

Send current message when the client in.

Definition at line 150 of file ttklocalpeer.cpp.

References isClient(), and TTK_D.


The documentation for this class was generated from the following files: