PageRenderTime 27ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llpanelmediasettingssecurity.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 82 lines | 39 code | 13 blank | 30 comment | 0 complexity | 042349793b0d86eef7c5faf4f06ca752 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpanelmediasettingssecurity.h
  3. * @brief LLPanelMediaSettingsSecurity class definition
  4. *
  5. * $LicenseInfo:firstyear=2007&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 LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H
  27. #define LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H
  28. #include "llpanel.h"
  29. class LLCheckBoxCtrl;
  30. class LLScrollListCtrl;
  31. class LLTextBox;
  32. class LLFloaterMediaSettings;
  33. class LLPanelMediaSettingsSecurity : public LLPanel
  34. {
  35. public:
  36. LLPanelMediaSettingsSecurity();
  37. ~LLPanelMediaSettingsSecurity();
  38. BOOL postBuild();
  39. virtual void draw();
  40. // XXX TODO: put these into a common parent class?
  41. // Hook that the floater calls before applying changes from the panel
  42. void preApply();
  43. // Function that asks the panel to fill in values associated with the panel
  44. // 'include_tentative' means fill in tentative values as well, otherwise do not
  45. void getValues(LLSD &fill_me_in, bool include_tentative = true);
  46. // Hook that the floater calls after applying changes to the panel
  47. void postApply();
  48. static void initValues( void* userdata, const LLSD& media_settings, bool editable);
  49. static void clearValues( void* userdata, bool editable);
  50. void addWhiteListEntry( const std::string& url );
  51. void setParent( LLFloaterMediaSettings* parent );
  52. bool urlPassesWhiteList( const std::string& test_url );
  53. const std::string makeValidUrl( const std::string& src_url );
  54. void updateWhitelistEnableStatus();
  55. protected:
  56. LLFloaterMediaSettings* mParent;
  57. private:
  58. enum ColumnIndex
  59. {
  60. ICON_COLUMN = 0,
  61. ENTRY_COLUMN = 1,
  62. };
  63. LLCheckBoxCtrl* mEnableWhiteList;
  64. LLScrollListCtrl* mWhiteListList;
  65. LLTextBox* mHomeUrlFailsWhiteListText;
  66. static void onBtnAdd(void*);
  67. static void onBtnDel(void*);
  68. };
  69. #endif // LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H