diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-11-22 09:49:05 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-11-22 09:49:05 -0500 |
commit | 4b0d2f8209f496f90e2c13643b0307a86797bdb2 (patch) | |
tree | 5d520cbd416b5f8a7624239a2a1b1b6e8c55f3bb /indra/llui/llurlaction.h | |
parent | 147b14089916bd2cbb078b0bc47c76458ab31e79 (diff) | |
parent | 1dd24cfcf85f4807410bb8d5320a692e2d7e121c (diff) |
merge
Diffstat (limited to 'indra/llui/llurlaction.h')
-rw-r--r-- | indra/llui/llurlaction.h | 21 |
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 |