PageRenderTime 26ms CodeModel.GetById 10ms app.highlight 11ms RepoModel.GetById 2ms 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
 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
27#ifndef LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H
28#define LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H
29
30#include "llpanel.h"
31
32class LLCheckBoxCtrl;
33class LLScrollListCtrl;
34class LLTextBox;
35class LLFloaterMediaSettings;
36
37class LLPanelMediaSettingsSecurity : public LLPanel
38{
39public:
40	LLPanelMediaSettingsSecurity();
41	~LLPanelMediaSettingsSecurity();
42	
43	BOOL postBuild();
44	virtual void draw();	
45	
46	// XXX TODO: put these into a common parent class?
47	// Hook that the floater calls before applying changes from the panel
48	void preApply();
49	// Function that asks the panel to fill in values associated with the panel
50	// 'include_tentative' means fill in tentative values as well, otherwise do not
51	void getValues(LLSD &fill_me_in, bool include_tentative = true);
52	// Hook that the floater calls after applying changes to the panel
53	void postApply();
54	
55	static void initValues( void* userdata, const LLSD& media_settings, bool editable);
56	static void clearValues( void* userdata, bool editable);
57	void addWhiteListEntry( const std::string& url );
58	void setParent( LLFloaterMediaSettings* parent );
59	bool urlPassesWhiteList( const std::string& test_url );
60	const std::string makeValidUrl( const std::string& src_url );
61
62	void updateWhitelistEnableStatus();	
63
64protected:
65	LLFloaterMediaSettings* mParent;
66	
67private:
68	enum ColumnIndex 
69	{
70		ICON_COLUMN = 0,
71		ENTRY_COLUMN = 1,
72	};
73
74	LLCheckBoxCtrl* mEnableWhiteList;
75	LLScrollListCtrl* mWhiteListList;
76	LLTextBox* mHomeUrlFailsWhiteListText;
77
78	static void onBtnAdd(void*);
79	static void onBtnDel(void*);
80};
81
82#endif  // LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H