Exemplo n.º 1
0
void ObjectEndPoint::newPackageReady()
{
    //client and service side
#ifdef QT_SFW_ENDPOINT_DEBUG
    qDebug() << "ObjectEndPoint::newPackageReady: Start ..." ;
#endif 
    
    // The monitor keeps track of this ObjectEndPoint so that it doesn't get deleted while in progress.    
#ifdef Q_OS_SYMBIAN
    ObjectEndPointMonitor aOem(this);
#endif //End Q_OS_SYMBIAN
    while(dispatch->packageAvailable())
    {
        QServicePackage p = dispatch->nextPackage();
        if (!p.isValid())
            continue;

        switch(p.d->packageType) {
            case QServicePackage::ObjectCreation:
                objectRequest(p);
                break;
            case QServicePackage::MethodCall:
                methodCall(p);
                break;
            case QServicePackage::PropertyCall:
                propertyCall(p);
                break;
            default:
                qWarning() << "Unknown package type received.";
        }
    }
#ifdef QT_SFW_ENDPOINT_DEBUG
	qDebug() << "ObjectEndPoint::newPackageReady: End" ;
#endif 
}
/*!
    Received a new package from the DBus client-server controller.
    Once an object request is handled there is only direct communication to the DBus object so
    no other package types should be received on this layer.
*/
void ObjectEndPoint::newPackageReady()
{
    // Client and service side
    while(dispatch->packageAvailable())
    {
        QServicePackage p = dispatch->nextPackage();
        if (!p.isValid())
            continue;

        if (p.d->packageType == QServicePackage::ObjectCreation) {
            objectRequest(p);
        } else {
            qWarning() << "Unknown package type received.";
        }
    }
}
Exemplo n.º 3
0
/*!
    Received a new package from the DBus client-server controller.
    Once an object request is handled there is only direct communication to the DBus object so
    no other package types should be received on this layer.
*/
void ObjectEndPoint::newPackageReady()
{
    // Client and service side
    while (dispatch->packageAvailable())
    {
        // must call get getSecurityCredentials everytime you call nextPackage
        QServiceClientCredentials creds;
        dispatch->getSecurityCredentials(creds);
        QServicePackage p = dispatch->nextPackage();
        if (!p.isValid())
            continue;

        if (p.d->packageType == QServicePackage::ObjectCreation) {
            objectRequest(p, creds);
        } else {
            qWarning() << "Unknown package type received.";
        }
    }
}