LibreOffice Module sd (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sd::Transmitter Class Reference

#include <Transmitter.hxx>

Inheritance diagram for sd::Transmitter:
[legend]
Collaboration diagram for sd::Transmitter:
[legend]

Public Types

enum  Priority {
  PRIORITY_LOW = 1 ,
  PRIORITY_HIGH
}
 

Public Member Functions

 Transmitter (::sd::IBluetoothSocket *aSocket)
 
virtual ~Transmitter () override
 
void addMessage (const OString &aMessage, const Priority aPriority)
 
void notifyFinished ()
 

Private Member Functions

virtual void SAL_CALL run () override
 

Private Attributes

::sd::IBluetoothSocketpStreamSocket
 
::osl::Condition mProcessingRequired
 
::osl::Mutex mMutex
 
bool mFinishRequested
 Used to indicate that we're done and the transmitter loop should exit. More...
 
std::queue< OString > mLowPriority
 Queue for low priority messages. All access must be guarded my mMutex. More...
 
std::queue< OString > mHighPriority
 Queue for high priority messages. All access must be guarded my mMutex. More...
 

Detailed Description

Definition at line 24 of file Transmitter.hxx.

Member Enumeration Documentation

◆ Priority

Enumerator
PRIORITY_LOW 
PRIORITY_HIGH 

Definition at line 28 of file Transmitter.hxx.

Constructor & Destructor Documentation

◆ Transmitter()

Transmitter::Transmitter ( ::sd::IBluetoothSocket aSocket)
explicit

Definition at line 16 of file Transmitter.cxx.

◆ ~Transmitter()

Transmitter::~Transmitter ( )
overridevirtual

Definition at line 64 of file Transmitter.cxx.

Member Function Documentation

◆ addMessage()

void Transmitter::addMessage ( const OString &  aMessage,
const Priority  aPriority 
)

◆ notifyFinished()

void Transmitter::notifyFinished ( )

Definition at line 57 of file Transmitter.cxx.

References mFinishRequested, mMutex, and mProcessingRequired.

◆ run()

void SAL_CALL Transmitter::run ( )
overrideprivatevirtual

Member Data Documentation

◆ mFinishRequested

bool sd::Transmitter::mFinishRequested
private

Used to indicate that we're done and the transmitter loop should exit.

All access must be guarded my mMutex.

Definition at line 46 of file Transmitter.hxx.

Referenced by notifyFinished(), and run().

◆ mHighPriority

std::queue<OString> sd::Transmitter::mHighPriority
private

Queue for high priority messages. All access must be guarded my mMutex.

Definition at line 50 of file Transmitter.hxx.

Referenced by addMessage(), and run().

◆ mLowPriority

std::queue<OString> sd::Transmitter::mLowPriority
private

Queue for low priority messages. All access must be guarded my mMutex.

Definition at line 48 of file Transmitter.hxx.

Referenced by addMessage(), and run().

◆ mMutex

::osl::Mutex sd::Transmitter::mMutex
private

Definition at line 41 of file Transmitter.hxx.

Referenced by addMessage(), notifyFinished(), and run().

◆ mProcessingRequired

::osl::Condition sd::Transmitter::mProcessingRequired
private

Definition at line 39 of file Transmitter.hxx.

Referenced by addMessage(), notifyFinished(), and run().

◆ pStreamSocket

::sd::IBluetoothSocket* sd::Transmitter::pStreamSocket
private

Definition at line 37 of file Transmitter.hxx.

Referenced by run().


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