当前位置: 首页>>代码示例>>C++>>正文


C++ InvokeRequest::action方法代码示例

本文整理汇总了C++中InvokeRequest::action方法的典型用法代码示例。如果您正苦于以下问题:C++ InvokeRequest::action方法的具体用法?C++ InvokeRequest::action怎么用?C++ InvokeRequest::action使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在InvokeRequest的用法示例。


在下文中一共展示了InvokeRequest::action方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onInvoked

void App::onInvoked(const InvokeRequest &request)
{
    if (m_configurationService.hasConfiguration()) {
        // The underlying PushService instance might not have been
        // initialized when an invoke first comes in
        // Make sure that we initialize it here if it hasn't been already
        // It requires an application ID (for consumer applications) so we have to check
        // that configuration settings have already been stored
        m_pushNotificationService.initializePushService();

        if (request.action().compare(BB_PUSH_INVOCATION_ACTION) == 0) {
            qDebug() << "Received push action";
            // Received an incoming push
            // Extract it from the invoke request and then process it
            PushPayload payload(request);
            if (payload.isValid()) {
                pushNotificationHandler(payload);
            }
        } else if (request.action().compare(BB_OPEN_INVOCATION_ACTION) == 0){
            qDebug() << "Received open action";
            // Received an invoke request to open an existing push (ie. from a notification in the BlackBerry Hub)
            // The payload from the open invoke is the seqnum for the push in the database
            openPush(request.data().toInt());
        }
    }
}
开发者ID:BGmot,项目名称:Cascades-Samples,代码行数:26,代码来源:app.cpp

示例2: handleInvoke

void PgcRouterApp::handleInvoke(const InvokeRequest& request) {
	// Copy data from incoming invocation request to properties
	m_source =
			QString::fromLatin1("%1 (%2)").arg(request.source().installId()).arg(
					request.source().groupId());
	m_target = request.target();
	m_action = request.action();
	m_mimeType = request.mimeType();
	m_uri = request.uri().toString();
	m_data = QString::fromUtf8(request.data());

	QUrl uri = request.uri();

	QFile file(uri.toLocalFile());

	if (m_target == "com.destinywireless.app.pgcrouter") {

	} else if (m_target == "com.destinywireless.app.pgcsender") {

	} else if (m_target == "com.destinywireless.card.formeditor") {

	} else if (m_target == "com.destinywireless.card.formviewer") {

	} else if (m_target == "com.destinywireless.card.attachphoto") {

	}

	// Signal that the properties have changed
	emit requestChanged();
}
开发者ID:rsjudge17,项目名称:dw.bb.router,代码行数:30,代码来源:pgcrouterapp.cpp

示例3: handleInvoke

//! [1]
void App::handleInvoke(const InvokeRequest& request)
{
    // Copy data from incoming invocation request to properties
    m_source = QString::fromLatin1("%1 (%2)").arg(request.source().installId()).arg(request.source().groupId());
    m_target = request.target();
    m_action = request.action();
    m_mimeType = request.mimeType();
    m_uri = request.uri().toString();
    m_data = QString::fromUtf8(request.data());

    m_backButtonVisible = false;

    if (m_target == "com.example.bb10samples.invocation.openimage1") {
        m_title = tr("Open Image 1");
    } else if (m_target == "com.example.bb10samples.invocation.openimage2") {
        m_title = tr("Open Image 2");
    } else if (m_target == "com.example.bb10samples.invocation.card.previewer") {
        m_title = tr("Previewer");
        m_backButtonVisible = true;
    } else if (m_target == "com.example.bb10samples.invocation.card.composer") {
        m_title = tr("Composer");
    } else if (m_target == "com.example.bb10samples.invocation.card.picker") {
        m_title = tr("Picker");
    }

    // Signal that the properties have changed
    emit requestChanged();
}
开发者ID:Ataya09,项目名称:Cascades-Samples,代码行数:29,代码来源:app.cpp

示例4: onInvoked

void App::onInvoked(const InvokeRequest &request)
{
	if (request.action().compare(BB_OPEN_INVOCATION_ACTION) == 0){
		qDebug() << "Received open action";
		// Received an invoke request to open an existing push (ie. from a notification in the BlackBerry Hub)
		// The payload from the open invoke is the seqnum for the push in the database
		openPush(request.data().toInt());
	}
}
开发者ID:13natty,项目名称:Cascades-Samples,代码行数:9,代码来源:app.cpp

示例5: handleInvoke

// triggered if Application was invoked by a client
void OpenDataSpace::handleInvoke(const InvokeRequest& request) {
	// TODO
	qDebug() << "Invoke Request";
	qDebug() << "Invoke Request Action:" << request.action();
	qDebug() << "Invoke Request Mime:" << request.mimeType();
	qDebug() << "Invoke Request URI:" << request.uri();
	qDebug() << "Invoke Request Data:" << request.data();
	m_invokationTarget = request.target();
	m_invokationSource = QString::fromLatin1("%1 (%2)").arg(
			request.source().installId()).arg(request.source().groupId());
	qDebug() << "Invoke Target ID: " << m_invokationTarget << " from Source: "
			<< m_invokationSource;
	// Invoked as Application
	if (m_invokationTarget == "io.ods.bb10.invoke") {
		m_isCard = false;
		qDebug() << "Invoked";
	}
	// invoked as embedded Card (Previewer) from OPEN or SHARE
	else if (m_invokationTarget == "io.ods.bb10.card.upload.previewer") {
		m_isCard = true;
		qDebug() << "Invoked for UploadCard as Previewer";
	}
	// invoked as embedded Card (Composer) from OPEN
	else if (m_invokationTarget == "io.ods.bb10.upload.composer") {
		m_isCard = true;
		qDebug() << "Invoked for UploadCard as Composer";
	}
	// do some preparing-stuff for a invoked Card
	// reset values (can come from pool)
	// set some infos
	// tell the Card that its a new invocation
	if (m_isCard) {
		AbstractPane *p = Application::instance()->scene();
		bool ok = false;
		// if there's a URI we take the URI
		// else we take the data
		if (request.uri().isEmpty()) {
			ok = p->setProperty("filePath", request.data());
		} else {
			ok = p->setProperty("filePath", request.uri());
		}
		if (!ok) {
			qDebug() << "Cannot set filePath";
		}
		// start a new Card Game ;-)
		// setting newCard true causes testing if LogIn was needed before upload files
		ok = p->setProperty("newCard", true);
		if (ok) {
			qDebug() << "set newCard to true";
		} else {
			qDebug() << "cannot set newCard";
		}
	} else {
		// do what needed if Invoked, per ex. switch to Upload TAB
	}
}
开发者ID:osawyerr,项目名称:opendataspace-cascades,代码行数:57,代码来源:OpenDataSpace.cpp

示例6: onInvoked

void ApplicationUI::onInvoked(const InvokeRequest &request)
{

    qDebug() << "Received push action";

    if (request.action().compare(BB_PUSH_INVOCATION_ACTION) == 0) {

        // Received an incoming push
        // Extract it from the invoke request and then process it
        PushPayload payload(request);
        if (payload.isValid()) {
            //qDebug() << payload;
            pushNotificationHandler(payload);
        }
    } else if (request.action().compare(BB_OPEN_INVOCATION_ACTION) == 0){
        qDebug() << "Received open action";
        // Received an invoke request to open an existing push (ie. from a notification in the BlackBerry Hub)
        // The payload from the open invoke is the seqnum for the push in the database
        //openPush(request.data().toInt());
    }

}
开发者ID:ngoluan,项目名称:FlippIt-BB10,代码行数:22,代码来源:applicationui.cpp

示例7: handleInvoke

void MCMNotification::handleInvoke(const InvokeRequest &request) {

	Utils::log("Invocation received");

	// In this case we don't care about the invocation unless it is of type Push
	if (request.action().compare("bb.action.PUSH") != 0) {
		return;
	}
	PushPayload payload(request);
	if (payload.isValid()) {
		if (payload.isAckRequired()) {
			m_pushService->acceptPush(payload.id());
		}
		Utils::log("<html><em><b>Push Received</b></em><br/>Payload: <br/> " + payload.data() + "</html>");
		//notification -> notify();
	}
}
开发者ID:MyMalcom,项目名称:malcom-lib-bb10,代码行数:17,代码来源:MCMNotification.cpp

示例8: onInvoked

void App::onInvoked(const InvokeRequest &request)
{
    if (m_configurationService.hasConfiguration()) {
        // The underlying PushService instance might not have been
        // initialized when an invoke first comes in
        // Make sure that we initialize it here if it hasn't been already
        // It requires an application ID (for consumer applications) so we have to check
        // that configuration settings have already been stored
        m_pushNotificationService.initializePushService();

        if (request.action().compare(BB_PUSH_INVOCATION_ACTION) == 0) {
            PushPayload payload(request);
            if (payload.isValid()) {
                pushNotificationHandler(payload);
            }
        }
    }
}
开发者ID:ProLove365,项目名称:Cascades-Samples,代码行数:18,代码来源:app.cpp


注:本文中的InvokeRequest::action方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。