PageRenderTime 124ms CodeModel.GetById 86ms app.highlight 31ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/llinventory/llparcelflags.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 132 lines | 81 code | 10 blank | 41 comment | 0 complexity | 07d10565e04742528fe518b14edac197 MD5 | raw file
  1/** 
  2 * @file llparcelflags.h
  3 *
  4 * $LicenseInfo:firstyear=2002&license=viewerlgpl$
  5 * Second Life Viewer Source Code
  6 * Copyright (C) 2010, Linden Research, Inc.
  7 * 
  8 * This library is free software; you can redistribute it and/or
  9 * modify it under the terms of the GNU Lesser General Public
 10 * License as published by the Free Software Foundation;
 11 * version 2.1 of the License only.
 12 * 
 13 * This library is distributed in the hope that it will be useful,
 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 16 * Lesser General Public License for more details.
 17 * 
 18 * You should have received a copy of the GNU Lesser General Public
 19 * License along with this library; if not, write to the Free Software
 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 21 * 
 22 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 23 * $/LicenseInfo$
 24 */
 25
 26#ifndef LL_LLPARCEL_FLAGS_H
 27#define LL_LLPARCEL_FLAGS_H
 28
 29//---------------------------------------------------------------------------
 30// Parcel Flags (PF) constants
 31//---------------------------------------------------------------------------
 32const U32 PF_ALLOW_FLY			= 1 << 0;// Can start flying
 33const U32 PF_ALLOW_OTHER_SCRIPTS= 1 << 1;// Scripts by others can run.
 34const U32 PF_FOR_SALE			= 1 << 2;// Can buy this land
 35const U32 PF_FOR_SALE_OBJECTS	= 1 << 7;// Can buy all objects on this land
 36const U32 PF_ALLOW_LANDMARK		= 1 << 3;
 37const U32 PF_ALLOW_TERRAFORM	= 1 << 4;
 38const U32 PF_ALLOW_DAMAGE		= 1 << 5;
 39const U32 PF_CREATE_OBJECTS		= 1 << 6;
 40// 7 is moved above
 41const U32 PF_USE_ACCESS_GROUP	= 1 << 8;
 42const U32 PF_USE_ACCESS_LIST	= 1 << 9;
 43const U32 PF_USE_BAN_LIST		= 1 << 10;
 44const U32 PF_USE_PASS_LIST		= 1 << 11;
 45const U32 PF_SHOW_DIRECTORY		= 1 << 12;
 46const U32 PF_ALLOW_DEED_TO_GROUP		= 1 << 13;
 47const U32 PF_CONTRIBUTE_WITH_DEED		= 1 << 14;
 48const U32 PF_SOUND_LOCAL				= 1 << 15;	// Hear sounds in this parcel only
 49const U32 PF_SELL_PARCEL_OBJECTS		= 1 << 16;	// Objects on land are included as part of the land when the land is sold
 50const U32 PF_ALLOW_PUBLISH				= 1 << 17;	// Allow publishing of parcel information on the web
 51const U32 PF_MATURE_PUBLISH				= 1 << 18;	// The information on this parcel is mature
 52const U32 PF_URL_WEB_PAGE				= 1 << 19;	// The "media URL" is an HTML page
 53const U32 PF_URL_RAW_HTML				= 1 << 20;	// The "media URL" is a raw HTML string like <H1>Foo</H1>
 54const U32 PF_RESTRICT_PUSHOBJECT		= 1 << 21;	// Restrict push object to either on agent or on scripts owned by parcel owner
 55const U32 PF_DENY_ANONYMOUS				= 1 << 22;	// Deny all non identified/transacted accounts
 56// const U32 PF_DENY_IDENTIFIED			= 1 << 23;	// Deny identified accounts
 57// const U32 PF_DENY_TRANSACTED			= 1 << 24;	// Deny identified accounts
 58const U32 PF_ALLOW_GROUP_SCRIPTS		= 1 << 25;	// Allow scripts owned by group
 59const U32 PF_CREATE_GROUP_OBJECTS		= 1 << 26;	// Allow object creation by group members or objects
 60const U32 PF_ALLOW_ALL_OBJECT_ENTRY		= 1 << 27;	// Allow all objects to enter a parcel
 61const U32 PF_ALLOW_GROUP_OBJECT_ENTRY	= 1 << 28;	// Only allow group (and owner) objects to enter the parcel
 62const U32 PF_ALLOW_VOICE_CHAT			= 1 << 29;	// Allow residents to use voice chat on this parcel
 63const U32 PF_USE_ESTATE_VOICE_CHAN      = 1 << 30;
 64const U32 PF_DENY_AGEUNVERIFIED         = 1 << 31;  // Prevent residents who aren't age-verified 
 65// NOTE: At one point we have used all of the bits.
 66// We have deprecated two of them in 1.19.0 which *could* be reused,
 67// but only after we are certain there are no simstates using those bits.
 68
 69//const U32 PF_RESERVED			= 1U << 31;
 70
 71// If any of these are true the parcel is restricting access in some maner.
 72const U32 PF_USE_RESTRICTED_ACCESS = PF_USE_ACCESS_GROUP
 73										| PF_USE_ACCESS_LIST
 74										| PF_USE_BAN_LIST
 75										| PF_USE_PASS_LIST
 76										| PF_DENY_ANONYMOUS
 77										| PF_DENY_AGEUNVERIFIED;
 78const U32 PF_NONE = 0x00000000;
 79const U32 PF_ALL  = 0xFFFFFFFF;
 80const U32 PF_DEFAULT =  PF_ALLOW_FLY
 81						| PF_ALLOW_OTHER_SCRIPTS
 82						| PF_ALLOW_GROUP_SCRIPTS
 83						| PF_ALLOW_LANDMARK
 84						| PF_CREATE_OBJECTS
 85						| PF_CREATE_GROUP_OBJECTS
 86						| PF_USE_BAN_LIST
 87						| PF_ALLOW_ALL_OBJECT_ENTRY
 88						| PF_ALLOW_GROUP_OBJECT_ENTRY
 89                        | PF_ALLOW_VOICE_CHAT
 90                        | PF_USE_ESTATE_VOICE_CHAN;
 91
 92// Access list flags
 93const U32 AL_ACCESS  = (1 << 0);
 94const U32 AL_BAN     = (1 << 1);
 95//const U32 AL_RENTER  = (1 << 2);
 96
 97// Block access return values. BA_ALLOWED is the only success case
 98// since some code in the simulator relies on that assumption. All
 99// other BA_ values should be reasons why you are not allowed.
100const S32 BA_ALLOWED = 0;
101const S32 BA_NOT_IN_GROUP = 1;
102const S32 BA_NOT_ON_LIST = 2;
103const S32 BA_BANNED = 3;
104const S32 BA_NO_ACCESS_LEVEL = 4;
105const S32 BA_NOT_AGE_VERIFIED = 5;
106
107// ParcelRelease flags
108const U32 PR_NONE		= 0x0;
109const U32 PR_GOD_FORCE	= (1 << 0);
110
111enum EObjectCategory
112{
113	OC_INVALID = -1,
114	OC_NONE = 0,
115	OC_TOTAL = 0,	// yes zero, like OC_NONE
116	OC_OWNER,
117	OC_GROUP,
118	OC_OTHER,
119	OC_SELECTED,
120	OC_TEMP,
121	OC_COUNT
122};
123
124const S32 PARCEL_DETAILS_NAME = 0;
125const S32 PARCEL_DETAILS_DESC = 1;
126const S32 PARCEL_DETAILS_OWNER = 2;
127const S32 PARCEL_DETAILS_GROUP = 3;
128const S32 PARCEL_DETAILS_AREA = 4;
129const S32 PARCEL_DETAILS_ID = 5;
130const S32 PARCEL_DETAILS_SEE_AVATARS = 6;
131
132#endif