void PgcRouterApp::cardDone(const QString& msg) {
	// Assemble message
	CardDoneMessage message;
	message.setData(msg);
	message.setDataType("text/plain");
	message.setReason(tr("Success!"));

	// Send message
	m_invokeManager->sendCardDone(message);
}
Beispiel #2
0
void App::onInvoke(const bb::system::InvokeRequest& invoke){
	invokedApp->playOnServer(invoke.uri().toString());

	// close card
	CardDoneMessage message;
	message.setData(tr("Card: I am done. yay!"));
	message.setDataType("text/plain");
	message.setReason(tr("Success!"));
	invokeManager->sendCardDone(message);
}
void Card::close_card()
{
    CardDoneMessage message;
    message.setData(tr(""));
    message.setDataType("text/plain");
    message.setReason(tr("Success!"));

    _invoke_manager->sendCardDone(message);

    emit closed_card();
}
Beispiel #4
0
void App::cardDone()
{
    // Assemble message
    CardDoneMessage message;
    message.setData(tr("Card: I am done. yay!"));
    message.setDataType("text/plain");
    message.setReason(tr("Success!"));

    // Send message
    m_invokeManager->sendCardDone(message);
}
/**
 * the Card couldn't be processed successfully
 * so we're sending with reason cancel
 * and add data to describe why
 */
void ApplicationUI::cardCanceled(const QString data) {
	qDebug() << "cardDone: assemble message";
	// Assemble message
	CardDoneMessage message;
	message.setData(data);
	message.setDataType("text/plain");
	message.setReason("cancel");
	// Send message
	qDebug() << "cardDone: sending message via IvokeManager data: "
			<< message.data() << " reason: " << message.reason();
	mInvokeManager->sendCardDone(message);

}
/**
 * the Card was processed with success
 */
void ApplicationUI::cardDone() {
	qDebug() << "cardDone: assemble message";
	// Assemble message
	CardDoneMessage message;
	message.setData(tr(":)"));
	message.setDataType("text/plain");
	message.setReason("save");
	// Send message
	qDebug() << "cardDone: sending message via IvokeManager data: "
			<< message.data() << " reason: " << message.reason();
	mInvokeManager->sendCardDone(message);

}
void BarcodeScannerApp::onNewBarcodeDetected(QString barcode) {
	qDebug() << "+++++++++ Barcode detected: " << barcode << endl;
	player->setSourceUrl(
			QDir::currentPath() + "/app/native/assets/"
					+ "sounds/boopdoop.mp3");
	player->play();

	if (_invoked) {
		qDebug() << "+++++++++ Sending done message" << endl;
		CardDoneMessage message;
		message.setData(barcode);
		message.setDataType("text/plain");
		message.setReason("Barcode scanned!");
		barcodeDecoder->stopScanning();
		_invokeManager->sendCardDone(message);
	}
}