WAC::ServiceIPCClient Class Reference

#include <mw/wac/wacserviceipcclient.h>

Link against: wacserviceipcclient.lib

class WAC::ServiceIPCClient : public QObject, public QObject

Inherits from

  • WAC::ServiceIPCClient
    Protected Attributes
    ServiceFwIPC *m_asyncIPC
    ServiceFwIPC *m_broadcastIPC
    ServiceFwIPC *m_syncIPC
    Public Member Functions
    ServiceIPCClient(QObject *, const TServiceIPCBackends &)
    virtual ~ServiceIPCClient()
    boolconnect(const QString &)
    voiddisconnect()
    QByteArray readAll()
    voidsendAsync(const QString &, const QByteArray &)
    boolsendSync(const QString &, const QByteArray &)
    qint32 sessionId()
    boolstartServer(const QString &, const QString &)
    Public Signals
    voiderror(int)
    voidhandleMessage(QByteArray)
    voidreadAsync(QByteArray)
    voidreadyRead()
    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()

    Detailed Description

    This class is an extension to the current ServiceIPCClient interface with the additional functionality of receiving messages from the server

    Member Attribute Documentation

    m_asyncIPC

    ServiceFwIPC *m_asyncIPC[protected]

    m_broadcastIPC

    ServiceFwIPC *m_broadcastIPC[protected]

    m_syncIPC

    ServiceFwIPC *m_syncIPC[protected]

    Constructor & Destructor Documentation

    ServiceIPCClient ( QObject *, const TServiceIPCBackends & )

    ServiceIPCClient(QObject *aParent,
    const TServiceIPCBackends &aBackend = EDefaultIPC
    )[explicit]

    Constructor

    Parameters
    aParentParent to this QObject
    aBackendIPC backend to use

    ~ServiceIPCClient ( )

    ~ServiceIPCClient()[virtual]

    Destructor

    Member Function Documentation

    connect ( const QString & )

    boolconnect(const QString &aServerName)

    Connect to the server

    Parameters
    aServerNamename of the server to connect to
    Return Value
    true if connected, false if not

    disconnect ( )

    voiddisconnect()

    Disconnect from the server

    Return Value
    void

    error ( int )

    voiderror(intaError)[signal]
    Signal emitted to handle any errors
    Note:

    : For local socket implementation, the error can be interpreted as QLocalSocket::LocalSocketError

    Parameters
    aErrorerror code
    Return Value
    void

    handleMessage ( QByteArray )

    voidhandleMessage(QByteArrayaMessage)[signal]

    readAll ( )

    QByteArray readAll()

    Reads all data pending in the buffer. For Sync version this will wait until all of the data is available.

    Return Value
    QByteArray of results

    readAsync ( QByteArray )

    voidreadAsync(QByteArrayipcResult)[signal]

    readyRead ( )

    voidreadyRead()[signal]

    Handle when a reply has been received for async requests Emitted when the entire data packet has been received

    Return Value
    void

    sendAsync ( const QString &, const QByteArray & )

    voidsendAsync(const QString &aRequestType,
    const QByteArray &aData
    )
    Send a request asynchronously
    Note:

    Errors will be emitted via errors() signal

    Parameters
    aRequestTypename of the request
    aDatadata to send
    Return Value
    void

    sendSync ( const QString &, const QByteArray & )

    boolsendSync(const QString &aRequestType,
    const QByteArray &aData
    )

    Send a request synchronously

    Parameters
    aRequestTypename of the request
    aDatadata to send
    Return Value
    true if sent successful, otherwise false

    sessionId ( )

    qint32 sessionId()[inline]

    startServer ( const QString &, const QString & )

    boolstartServer(const QString &aServerName,
    const QString &aExeName
    )

    Starts the service

    Parameters
    aServerNamename of the server
    aExeNameexecutable of the server
    Return Value
    true if connected