WAC::ServiceFwIPC Class Reference

#include <mw/wac/wacserviceipc.h>

Link against: wacserviceipcclient.lib

class WAC::ServiceFwIPC : public QObject, public QObject

Inherits from

  • WAC::ServiceFwIPC
    Protected Attributes
    ServiceFwIPCPrivate *d
    boolm_AsyncRequestPending
    Public Member Enumerations
    enumServiceIPCErrors { EConnectionError, EConnectionClosed, EServerNotFound, EIPCError, EUnknownError }
    Public Member Functions
    ServiceFwIPC(QObject *, const TServiceIPCBackends &)
    virtual ~ServiceFwIPC()
    boolconnect(const QString &)
    voiddisconnect()
    boolgetSessionId(int &)
    QByteArray readAll()
    boolrequestPending()
    voidsendAsync(const QString &, const QByteArray &)
    boolsendSync(const QString &, const QByteArray &)
    boolsetSessionId(int)
    boolstartServer(const QString &, const QString &)
    Public Signals
    voiderror(int)
    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

    Public interface class for IPC operations

    Member Attribute Documentation

    d

    ServiceFwIPCPrivate *d[protected]

    m_AsyncRequestPending

    boolm_AsyncRequestPending[protected]

    Member Enumeration Documentation

    Enum ServiceIPCErrors

    ServiceFwIPC::ServiceIPCErrors.

    This enum describes the errors that may be returned by the IPC.

    EnumeratorValueDescription
    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

    Constructor & Destructor Documentation

    ServiceFwIPC ( QObject *, const TServiceIPCBackends & )

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

    Constructor

    Parameters
    aParentParent to this QObject
    aBackendIPC backend to use

    ~ServiceFwIPC ( )

    ~ServiceFwIPC()[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

    getSessionId ( int & )

    boolgetSessionId(int &aSessionId)

    Retrieve the session id synchronously

    Parameters
    aSessionIdname of the request
    Return Value
    true if retrieved successfully, otherwise false

    readAll ( )

    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

    Return Value
    QByteArray of results

    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

    requestPending ( )

    boolrequestPending()

    Check if an async request is already pending

    Return Value
    true if an async request is pending false otherwise

    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

    setSessionId ( int )

    boolsetSessionId(intaSessionId)

    Set the session id synchronously

    Parameters
    aSessionIdname of the request
    Return Value
    true if set successfully, otherwise false

    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