PageRenderTime 24ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llplugin/llpluginclassmediaowner.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 90 lines | 49 code | 14 blank | 27 comment | 0 complexity | b5bc1589efdd6f395b1d520857b0726c MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpluginclassmediaowner.h
  3. * @brief LLPluginClassMedia handles interaction with a plugin which knows about the "media" message class.
  4. *
  5. * @cond
  6. * $LicenseInfo:firstyear=2008&license=viewerlgpl$
  7. * Second Life Viewer Source Code
  8. * Copyright (C) 2010, Linden Research, Inc.
  9. *
  10. * This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation;
  13. * version 2.1 of the License only.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with this library; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. *
  24. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  25. * $/LicenseInfo$
  26. * @endcond
  27. */
  28. #ifndef LL_LLPLUGINCLASSMEDIAOWNER_H
  29. #define LL_LLPLUGINCLASSMEDIAOWNER_H
  30. #include "llpluginprocessparent.h"
  31. #include "llrect.h"
  32. #include <queue>
  33. class LLPluginClassMedia;
  34. class LLPluginCookieStore;
  35. class LLPluginClassMediaOwner
  36. {
  37. public:
  38. typedef enum
  39. {
  40. MEDIA_EVENT_CONTENT_UPDATED, // contents/dirty rect have updated
  41. MEDIA_EVENT_TIME_DURATION_UPDATED, // current time and/or duration have updated
  42. MEDIA_EVENT_SIZE_CHANGED, // media size has changed
  43. MEDIA_EVENT_CURSOR_CHANGED, // plugin has requested a cursor change
  44. MEDIA_EVENT_NAVIGATE_BEGIN, // browser has begun navigation
  45. MEDIA_EVENT_NAVIGATE_COMPLETE, // browser has finished navigation
  46. MEDIA_EVENT_PROGRESS_UPDATED, // browser has updated loading progress
  47. MEDIA_EVENT_STATUS_TEXT_CHANGED, // browser has updated the status text
  48. MEDIA_EVENT_NAME_CHANGED, // browser has updated the name of the media (typically <title> tag)
  49. MEDIA_EVENT_LOCATION_CHANGED, // browser location (URL) has changed (maybe due to internal navagation/frames/etc)
  50. MEDIA_EVENT_NAVIGATE_ERROR_PAGE, // browser navigated to a page that resulted in an HTTP error
  51. MEDIA_EVENT_CLICK_LINK_HREF, // I'm not entirely sure what the semantics of these two are
  52. MEDIA_EVENT_CLICK_LINK_NOFOLLOW,
  53. MEDIA_EVENT_CLOSE_REQUEST, // The plugin requested its window be closed (currently hooked up to javascript window.close in webkit)
  54. MEDIA_EVENT_PICK_FILE_REQUEST, // The plugin wants the user to pick a file
  55. MEDIA_EVENT_GEOMETRY_CHANGE, // The plugin requested its window geometry be changed (per the javascript window interface)
  56. MEDIA_EVENT_PLUGIN_FAILED_LAUNCH, // The plugin failed to launch
  57. MEDIA_EVENT_PLUGIN_FAILED, // The plugin died unexpectedly
  58. MEDIA_EVENT_AUTH_REQUEST, // The plugin wants to display an auth dialog
  59. MEDIA_EVENT_DEBUG_MESSAGE, // plugin sending back debug information for host to process
  60. MEDIA_EVENT_LINK_HOVERED // Got a "link hovered" event from the plugin
  61. } EMediaEvent;
  62. typedef enum
  63. {
  64. MEDIA_NONE, // Uninitialized -- no useful state
  65. MEDIA_LOADING, // loading or navigating
  66. MEDIA_LOADED, // navigation/preroll complete
  67. MEDIA_ERROR, // navigation/preroll failed
  68. MEDIA_PLAYING, // playing (only for time-based media)
  69. MEDIA_PAUSED, // paused (only for time-based media)
  70. MEDIA_DONE // finished playing (only for time-based media)
  71. } EMediaStatus;
  72. virtual ~LLPluginClassMediaOwner() {};
  73. virtual void handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent /*event*/) {};
  74. virtual void handleCookieSet(LLPluginClassMedia* /*self*/, const std::string &/*cookie*/) {};
  75. };
  76. #endif // LL_LLPLUGINCLASSMEDIAOWNER_H