summaryrefslogtreecommitdiff
path: root/indra/llui/llurlaction.h
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2011-12-13 17:36:29 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2011-12-13 17:36:29 -0500
commite4f1f611a4736e4b0b78c0d61c3c5f576fec93d0 (patch)
tree87aeed34bc9378648e1b8729bacf8462b4d9ec2d /indra/llui/llurlaction.h
parent20bc02d2544320a5ad99c61b8d012608319e3161 (diff)
parentd8aa31d10a89aa826cc549594c083a054a2ad967 (diff)
merged .hgtags
Diffstat (limited to 'indra/llui/llurlaction.h')
-rw-r--r--indra/llui/llurlaction.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h
index 0132dbaaf0..c34960b826 100644
--- a/indra/llui/llurlaction.h
+++ b/indra/llui/llurlaction.h
@@ -29,6 +29,7 @@
#define LL_LLURLACTION_H
#include <string>
+#include <boost/function.hpp>
///
/// The LLUrlAction class provides a number of static functions that
@@ -77,17 +78,21 @@ public:
static void showProfile(std::string url);
/// specify the callbacks to enable this class's functionality
- static void setOpenURLCallback(void (*cb) (const std::string& url));
- static void setOpenURLInternalCallback(void (*cb) (const std::string& url));
- static void setOpenURLExternalCallback(void (*cb) (const std::string& url));
- static void setExecuteSLURLCallback(bool (*cb) (const std::string& url));
+ typedef boost::function<void (const std::string&)> url_callback_t;
+ typedef boost::function<bool(const std::string& url)> execute_url_callback_t;
+
+ static void setOpenURLCallback(url_callback_t cb);
+ static void setOpenURLInternalCallback(url_callback_t cb);
+ static void setOpenURLExternalCallback(url_callback_t cb);
+ static void setExecuteSLURLCallback(execute_url_callback_t cb);
private:
// callbacks for operations we can perform on Urls
- static void (*sOpenURLCallback) (const std::string& url);
- static void (*sOpenURLInternalCallback) (const std::string& url);
- static void (*sOpenURLExternalCallback) (const std::string& url);
- static bool (*sExecuteSLURLCallback) (const std::string& url);
+ static url_callback_t sOpenURLCallback;
+ static url_callback_t sOpenURLInternalCallback;
+ static url_callback_t sOpenURLExternalCallback;
+
+ static execute_url_callback_t sExecuteSLURLCallback;
};
#endif