PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llurldispatcher.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 59 lines | 14 code | 6 blank | 39 comment | 0 complexity | e45a60f59bed8843275bee250681995a MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llurldispatcher.h
  3. * @brief Central registry for all SL URL handlers
  4. *
  5. * $LicenseInfo:firstyear=2010&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LLURLDISPATCHER_H
  27. #define LLURLDISPATCHER_H
  28. class LLMediaCtrl;
  29. class LLURLDispatcher
  30. {
  31. public:
  32. static bool dispatch(const std::string& slurl,
  33. const std::string& nav_type,
  34. LLMediaCtrl* web,
  35. bool trusted_browser);
  36. // At startup time and on clicks in internal web browsers,
  37. // teleport, open map, or run requested command.
  38. // @param url
  39. // secondlife://RegionName/123/45/67/
  40. // secondlife:///app/agent/3d6181b0-6a4b-97ef-18d8-722652995cf1/show
  41. // sl://app/foo/bar
  42. // @param nav_type
  43. // type of navigation type (see LLQtWebKit::LLWebPage::acceptNavigationRequest)
  44. // @param web
  45. // Pointer to LLMediaCtrl sending URL, can be NULL
  46. // @param trusted_browser
  47. // True if coming inside the app AND from a brower instance
  48. // that navigates to trusted (Linden Lab) pages.
  49. // Returns true if someone handled the URL.
  50. static bool dispatchRightClick(const std::string& slurl);
  51. static bool dispatchFromTextEditor(const std::string& slurl);
  52. };
  53. #endif