29 #include "wimpmessagelistener.h"
33 class URIResultHandler;
46 URI(
const std::string &
uri);
49 void uri(
const std::string &new_uri);
58 enum State {NotDispatched, Dispatched, DispatchError, WaitingForResult, Claimed, NotClaimed};
59 State state()
const {
return _state;}
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
Class to take a URI and dispatch it to the Wimp for processing.
Definition: uri.h:44
void uri(const std::string &new_uri)
Reset the URI.
Definition: uri.cc:63
Handler to check if a URI was successfully launched.
Definition: uri.h:78
static bool uri_handler_started()
Check if the uri_handler has been started.
Definition: uri.cc:243
void set_result_handler(URIResultHandler *handler)
Set the object to handle the result status of a dispatch or check call.
Definition: uri.cc:182
virtual void uri_result(URI &uri, bool claimed)=0
Called once the Wimp has attempted to launch the URI dispatcher.
Listener to handle WimpRecordedMessages (event code 18)
Definition: wimpmessagelistener.h:270
bool check()
Check if an application is open that can process the URI.
Definition: uri.cc:145
URI(const std::string &uri)
Create a URI object to dispatch a URI.
Definition: uri.cc:47
static bool ensure_uri_handler()
Ensure the URI handler is started.
Definition: uri.cc:216
virtual ~URI()
When the object is destroyed the result handler is cancelled.
Definition: uri.cc:77
Wimp message received event.
Definition: wimpmessagelistener.h:210
bool dispatch()
Dispatch the URI.
Definition: uri.cc:108
static int version()
Get the URI version.
Definition: uri.cc:90