Esempio n. 1
0
void TCUFPE::showCamera() {
	InvokeRequest cardRequest;
	cardRequest.setTarget("sys.camera.card");
	cardRequest.setAction("bb.action.CAPTURE");
	cardRequest.setData("photo");
	InvokeTargetReply* reply = m_iManager->invoke(cardRequest);
	reply->setParent(this);

	connect(m_iManager,
			SIGNAL(childCardDone(const bb::system::CardDoneMessage &)), this,
			SLOT(onCameraCardDone(const bb::system::CardDoneMessage &)));
	qDebug() << "waiting for you";
}
Esempio n. 2
0
void ApplicationUI::invokeEmail(QString email)
{
	InvokeManager manager;
	InvokeRequest request;

	// Setup what to show and in what target.
	request.setTarget("sys.pim.uib.email.hybridcomposer");
	request.setAction("bb.action.OPEN, bb.action.SENDEMAIL");
	request.setUri("mailto:"+email);
	InvokeTargetReply *targetReply = manager.invoke(request);
	//setting the parent to "this" will make the manager live on after this function is destroyed
	manager.setParent(this);

	if (targetReply == NULL) {
		qDebug() << "InvokeTargetReply is NULL: targetReply = " << targetReply;
	} else {
		targetReply->setParent(this);
	}
}
Esempio n. 3
0
void
NSRFileSharer::invokeUri (const QString& uri, const QString& target, const QString& action)
{
	InvokeManager		invokeManager;
	InvokeRequest		invokeRequest;
	InvokeTargetReply	*invokeReply;

	invokeRequest.setUri (QUrl (uri));
	invokeRequest.setAction (action);
	invokeRequest.setTarget (target);

	invokeReply = invokeManager.invoke (invokeRequest);

	if (invokeReply != NULL) {
		invokeReply->setParent (this);
		bool ok = connect (invokeReply, SIGNAL (finished ()), invokeReply, SLOT (deleteLater ()));
		Q_UNUSED (ok);
		Q_ASSERT (ok);
	}
}
void PhotoBomberApp::showPhotoInCard(const QString fileName)
{
    // Create InvokeManager and InvokeRequest objects to able to invoke a card with a viewer that will show the
    // latest bomber photo.
    bb::system::InvokeManager manager;
    bb::system::InvokeRequest request;

    // Setup what to show and in what target.
    request.setUri(QUrl::fromLocalFile(fileName));
    request.setTarget("sys.pictures.card.previewer");
    request.setAction("bb.action.VIEW");
    InvokeTargetReply *targetReply = manager.invoke(request);
    //setting the parent to "this" will make the manager live on after this function is destroyed
    manager.setParent(this);

    if (targetReply == NULL) {
        qDebug() << "InvokeTargetReply is NULL: targetReply = " << targetReply;
    } else {
        targetReply->setParent(this);
    }
}