#include <mw/wac/wacserviceipc.h>
Link against: wacserviceipcclient.lib
class WAC::ServiceFwIPC : public QObject, public QObject |
Protected Attributes | |
---|---|
ServiceFwIPCPrivate * | d |
bool | m_AsyncRequestPending |
Public Member Enumerations | |
---|---|
enum | ServiceIPCErrors { EConnectionError, EConnectionClosed, EServerNotFound, EIPCError, EUnknownError } |
Public Member Functions | |
---|---|
ServiceFwIPC(QObject *, const TServiceIPCBackends &) | |
virtual | ~ServiceFwIPC() |
bool | connect(const QString &) |
void | disconnect() |
bool | getSessionId(int &) |
QByteArray | readAll() |
bool | requestPending() |
void | sendAsync(const QString &, const QByteArray &) |
bool | sendSync(const QString &, const QByteArray &) |
bool | setSessionId(int) |
bool | startServer(const QString &, const QString &) |
Public Signals | |
---|---|
void | error(int) |
void | readyRead() |
Inherited Attributes | |
---|---|
QObject::d_ptr | |
QObject::objectName | |
QObject::staticQtMetaObject |
Inherited Functions | |
---|---|
QObject::QObject(QObjectPrivate &,QObject *) | |
QObject::blockSignals(bool) | |
QObject::childEvent(QChildEvent *) | |
QObject::children()const | |
QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const | |
QObject::connectNotify(const char *) | |
QObject::customEvent(QEvent *) | |
QObject::deleteLater | |
QObject::destroyed | |
QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &) | |
QObject::disconnect(const QObject *,const char *) | |
QObject::disconnect(const QObject *,const char *,const QObject *,const char *) | |
QObject::disconnect(const char *,const QObject *,const char *) | |
QObject::disconnectNotify(const char *) | |
QObject::dumpObjectInfo() | |
QObject::dumpObjectTree() | |
QObject::dynamicPropertyNames()const | |
QObject::event(QEvent *) | |
QObject::eventFilter(QObject *,QEvent *) | |
QObject::findChild(const QString &)const | |
QObject::findChildren(const QRegExp &)const | |
QObject::findChildren(const QString &)const | |
QObject::inherits(const char *)const | |
QObject::installEventFilter(QObject *) | |
QObject::isWidgetType()const | |
QObject::killTimer(int) | |
QObject::moveToThread(QThread *) | |
QObject::objectName()const | |
QObject::parent()const | |
QObject::property(const char *)const | |
QObject::receivers(const char *)const | |
QObject::registerUserData() | |
QObject::removeEventFilter(QObject *) | |
QObject::sender()const | |
QObject::senderSignalIndex()const | |
QObject::setObjectName(const QString &) | |
QObject::setParent(QObject *) | |
QObject::setProperty(const char *,const QVariant &) | |
QObject::setUserData(uint,QObjectUserData *) | |
QObject::signalsBlocked()const | |
QObject::startTimer(int) | |
QObject::thread()const | |
QObject::timerEvent(QTimerEvent *) | |
QObject::userData(uint)const | |
QObject::~QObject() |
Public interface class for IPC operations
ServiceFwIPCPrivate * | d | [protected] |
bool | m_AsyncRequestPending | [protected] |
ServiceFwIPC::ServiceIPCErrors.
This enum describes the errors that may be returned by the IPC.
Enumerator | Value | Description |
---|---|---|
EConnectionError | -5000 |
Error in IPC Connection |
EConnectionClosed |
IPC Connection is closed | |
EServerNotFound |
Can not find server | |
EIPCError |
Known IPC error defined by SDK | |
EUnknownError |
Unknown IPC error |
ServiceFwIPC | ( | QObject * | aParent, |
const TServiceIPCBackends & | aBackend = EDefaultIPC | ||
) | [explicit] |
Constructor
Parameters | |
---|---|
aParent | Parent to this QObject |
aBackend | IPC backend to use |
bool | connect | ( | const QString & | aServerName | ) |
Connect to the server
Parameters | |
---|---|
aServerName | name of the server to connect to |
void | error | ( | int | aError | ) | [signal] |
: For local socket implementation, the error can be interpreted as QLocalSocket::LocalSocketError
Parameters | |
---|---|
aError | error code |
bool | getSessionId | ( | int & | aSessionId | ) |
Retrieve the session id synchronously
Parameters | |
---|---|
aSessionId | name of the request |
QByteArray | readAll | ( | ) |
Reads all data pending in the buffer. For Sync version this will wait until all of the data is available. For Async version it will return the currently read buffer. Use only after readyRead() signal is emitted. However partial data can be read
void | readyRead | ( | ) | [signal] |
Handle when a reply has been received for async requests Emitted when the entire data packet has been received
bool | requestPending | ( | ) |
Check if an async request is already pending
void | sendAsync | ( | const QString & | aRequestType, |
const QByteArray & | aData | |||
) |
Errors will be emitted via errors() signal
Parameters | |
---|---|
aRequestType | name of the request |
aData | data to send |
bool | sendSync | ( | const QString & | aRequestType, |
const QByteArray & | aData | |||
) |
Send a request synchronously
Parameters | |
---|---|
aRequestType | name of the request |
aData | data to send |