• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

qca

QCA::ConsoleReference

QCA::ConsoleReference Class Reference
[QCA user API]

Manager for a Console. More...

#include <QtCrypto>

Inheritance diagram for QCA::ConsoleReference:
Inheritance graph
[legend]

List of all members.

Public Types

enum  SecurityMode { SecurityDisabled, SecurityEnabled }

Signals

void bytesWritten (int bytes)
void inputClosed ()
void outputClosed ()
void readyRead ()

Public Member Functions

 ConsoleReference (QObject *parent=0)
 ~ConsoleReference ()
int bytesAvailable () const
int bytesToWrite () const
void closeOutput ()
Console * console () const
QByteArray read (int bytes=-1)
SecureArray readSecure (int bytes=-1)
SecurityMode securityMode () const
bool start (Console *console, SecurityMode mode=SecurityDisabled)
void stop ()
void write (const QByteArray &a)
void writeSecure (const SecureArray &a)

Detailed Description

Manager for a Console.

Note:
Only one ConsoleReference object can be active at a time

Definition at line 684 of file qca_support.h.


Member Enumeration Documentation

enum QCA::ConsoleReference::SecurityMode

The security setting to use for the Console being managed.

Enumerator:
SecurityDisabled 
SecurityEnabled 

Definition at line 691 of file qca_support.h.


Constructor & Destructor Documentation

QCA::ConsoleReference::ConsoleReference ( QObject *  parent = 0  ) 

Standard constructor.

Parameters:
parent the parent object for this object

Definition at line 613 of file console.cpp.

QCA::ConsoleReference::~ConsoleReference (  ) 

Definition at line 619 of file console.cpp.


Member Function Documentation

int QCA::ConsoleReference::bytesAvailable (  )  const

The number of bytes available to read from the Console being managed.

Definition at line 727 of file console.cpp.

int QCA::ConsoleReference::bytesToWrite (  )  const

The number of bytes remaining to be written to the Console being managed.

Definition at line 732 of file console.cpp.

void QCA::ConsoleReference::bytesWritten ( int  bytes  )  [signal]

Emitted when bytes are written to the Console.

Parameters:
bytes the number of bytes that were written
See also:
bytesAvailable()
void QCA::ConsoleReference::closeOutput (  ) 

Close the write channel.

You only need to call this if writing is enabled on the Console being managed.

Definition at line 722 of file console.cpp.

Console * QCA::ConsoleReference::console (  )  const

The Console object managed by this object.

See also:
start() to set the Console to be managed

Definition at line 692 of file console.cpp.

void QCA::ConsoleReference::inputClosed (  )  [signal]

Emitted when the console input is closed.

void QCA::ConsoleReference::outputClosed (  )  [signal]

Emitted when the console output is closed.

QByteArray QCA::ConsoleReference::read ( int  bytes = -1  ) 

Read data from the Console.

Parameters:
bytes the number of bytes to read. The default is to read all available bytes
See also:
readSecure() for a method suitable for reading sensitive data.

Definition at line 702 of file console.cpp.

SecureArray QCA::ConsoleReference::readSecure ( int  bytes = -1  ) 

Read secure data from the Console.

Parameters:
bytes the number of bytes to read. The default is to read all available bytes
See also:
read() which is suitable for non-sensitive data

Definition at line 712 of file console.cpp.

void QCA::ConsoleReference::readyRead (  )  [signal]

Emitted when there are bytes available to read from the Console being managed.

ConsoleReference::SecurityMode QCA::ConsoleReference::securityMode (  )  const

The security mode setting for the Console object managed by this object.

See also:
start() to set the SecurityMode

Definition at line 697 of file console.cpp.

bool QCA::ConsoleReference::start ( Console *  console,
SecurityMode  mode = SecurityDisabled 
)

Set the Console object to be managed, and start processing.

You typically want to use Console::ttyInstance() or Console::stdioInstance() to obtain the required Console reference.

Parameters:
console reference to the Console to be managed
mode the SecurityMode to use for this Console.
See also:
QCA::Console for more information on how to handle the console aspects of your application or library code.

Definition at line 625 of file console.cpp.

void QCA::ConsoleReference::stop (  ) 

Stop processing, and release the Console.

Definition at line 675 of file console.cpp.

void QCA::ConsoleReference::write ( const QByteArray &  a  ) 

Write data to the Console.

Parameters:
a the array of data to write to the Console
See also:
writeSecure() for a method suitable for writing sensitive data.

Definition at line 707 of file console.cpp.

void QCA::ConsoleReference::writeSecure ( const SecureArray &  a  ) 

Write secure data to the Console.

Parameters:
a the array of data to write to the Console
See also:
write() which is suitable for non-sensitive data

Definition at line 717 of file console.cpp.


The documentation for this class was generated from the following files:
  • qca_support.h
  • console.cpp

qca

Skip menu "qca"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal