Created
September 28, 2012 23:19
-
-
Save 40/3802560 to your computer and use it in GitHub Desktop.
Bound Invocation Sample PDF File BB10 Cascades
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| InvokaManager *iManager = new InvokeManager(this); | |
| InvokeRequest iRequest; | |
| iRequest.setTarget("com.example.MYTARGET"); | |
| iRequest.setAction("bb.action.OPEN"); | |
| iRequest.setMimeType("application/pdf"); | |
| iRequest.setUri("file:///.../..../sample.pdf"); | |
| InvokeTargetReply *iReply = iManager->invoke(iRequest); | |
| // connect signals and slots | |
| QObject::connect(iReply, SIGNAL(finished()), this, SLOT(myInvokeReplySlot())); | |
| // this myInvokeReplySlot allows you to see if invocation succeeded or failed | |
| void myInvokeReplySlot(){ | |
| switch(iReply->error()){ | |
| case InvokeReplyError::NoTarget: cout << "Error: no target" << endl; break; | |
| case InvokeReplyError::BadRequest: cout << "Error: bad request" << endl; break; | |
| case InvokeReplyError::Internal: cout << "Error: internal" << endl; break; | |
| default: cout << "Invoke Succeeded" << endl; break; | |
| } | |
| delete iReply | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment