PageRenderTime 35ms CodeModel.GetById 18ms app.highlight 13ms RepoModel.GetById 2ms app.codeStats 0ms

/indra/llmessage/lldbstrings.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 226 lines | 95 code | 44 blank | 87 comment | 0 complexity | b388643e2340fd95bc81af56b364532c MD5 | raw file
  1/** 
  2 * @file lldbstrings.h
  3 * @brief Database String Lengths.
  4 *
  5 * $LicenseInfo:firstyear=2002&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_LLDBSTRINGS_H
 28#define LL_LLDBSTRINGS_H
 29
 30/**
 31 * Defines the length of strings that are stored in the database (and
 32 * the size of the buffer large enough to hold each one)
 33 */
 34
 35// asset.name							varchar(63)
 36// -also-
 37// user_inventory_item.name				varchar(63)
 38// -also-
 39// user_inventory_folder.name			varchar(63)  was CAT_NAME_SIZE
 40// Must be >= DB_FULL_NAME_STR_LEN so that calling cards work
 41const S32 DB_INV_ITEM_NAME_STR_LEN		= 63;  // was MAX_ASSET_NAME_LENGTH
 42const S32 DB_INV_ITEM_NAME_BUF_SIZE		= 64;  // was ITEM_NAME_SIZE
 43
 44// asset.description					varchar(127)
 45// -also-
 46// user_inventory_item.description		varchar(127)
 47const S32 DB_INV_ITEM_DESC_STR_LEN		= 127; // was MAX_ASSET_DESCRIPTION_LENGTH
 48const S32 DB_INV_ITEM_DESC_BUF_SIZE		= 128; // was ITEM_DESC_SIZE
 49
 50// groups.name							varchar(35)
 51const S32 DB_GROUP_NAME_STR_LEN			= 35;
 52const S32 DB_GROUP_NAME_BUF_SIZE		= 36;
 53const S32 DB_GROUP_NAME_MIN_LEN			= 4;
 54
 55//group_roles.name
 56const U32 DB_GROUP_ROLE_NAME_STR_LEN     = 20;
 57const U32 DB_GROUP_ROLE_NAME_BUF_SIZE    = DB_GROUP_ROLE_NAME_STR_LEN + 1;
 58
 59//group_roles.title
 60const U32 DB_GROUP_ROLE_TITLE_STR_LEN    = 20;
 61const U32 DB_GROUP_ROLE_TITLE_BUF_SIZE   = DB_GROUP_ROLE_TITLE_STR_LEN + 1;
 62
 63
 64// group.charter						text
 65const S32 DB_GROUP_CHARTER_STR_LEN		= 511;
 66const S32 DB_GROUP_CHARTER_BUF_SIZE		= 512;
 67
 68// group.officer_title					varchar(20)
 69// -also-
 70// group.member_title					varchar(20)
 71const S32 DB_GROUP_TITLE_STR_LEN		= 20;
 72const S32 DB_GROUP_TITLE_BUF_SIZE		= 21;
 73
 74// Since chat and im both dump into the database text message log,
 75// they derive their max size from the same constant.
 76const S32 MAX_MSG_STR_LEN = 1023;
 77const S32 MAX_MSG_BUF_SIZE = 1024;
 78
 79// instant_message.message				text
 80const S32 DB_IM_MSG_STR_LEN	 			= MAX_MSG_STR_LEN;
 81const S32 DB_IM_MSG_BUF_SIZE 			= MAX_MSG_BUF_SIZE;	
 82
 83// groupnotices
 84const S32 DB_GROUP_NOTICE_SUBJ_STR_LEN	= 63;
 85const S32 DB_GROUP_NOTICE_SUBJ_STR_SIZE	= 64;
 86const S32 DB_GROUP_NOTICE_MSG_STR_LEN	= MAX_MSG_STR_LEN - DB_GROUP_NOTICE_SUBJ_STR_LEN;
 87const S32 DB_GROUP_NOTICE_MSG_STR_SIZE	= MAX_MSG_BUF_SIZE - DB_GROUP_NOTICE_SUBJ_STR_SIZE;
 88
 89// log_text_message.message				text
 90const S32 DB_CHAT_MSG_STR_LEN			= MAX_MSG_STR_LEN;
 91const S32 DB_CHAT_MSG_BUF_SIZE 			= MAX_MSG_BUF_SIZE;
 92
 93// money_stipend.description			varchar(254)
 94const S32 DB_STIPEND_DESC_STR_LEN		= 254;
 95const S32 DB_STIPEND_DESC_BUF_SIZE 		= 255;
 96
 97// script_email_message.from_email		varchar(78)
 98const S32 DB_EMAIL_FROM_STR_LEN			= 78;
 99const S32 DB_EMAIL_FROM_BUF_SIZE		= 79;
100	
101// script_email_message.subject			varchar(72)
102const S32 DB_EMAIL_SUBJECT_STR_LEN		= 72;
103const S32 DB_EMAIL_SUBJECT_BUF_SIZE		= 73;
104
105// system_globals.motd					varchar(254)
106const S32 DB_MOTD_STR_LEN				= 254;
107const S32 DB_MOTD_BUF_SIZE				= 255;
108
109// Must be <= user_inventory_item.name	so that calling cards work
110// First name + " " + last name...or a system assigned "from" name
111// instant_message.from_agent_name		varchar(63)
112// -also-
113// user_mute.mute_agent_name			varchar(63)
114const S32 DB_FULL_NAME_STR_LEN			= 63;
115const S32 DB_FULL_NAME_BUF_SIZE			= 64;  // was USER_NAME_SIZE
116
117// user.username						varchar(31)
118const S32 DB_FIRST_NAME_STR_LEN			= 31;
119const S32 DB_FIRST_NAME_BUF_SIZE		= 32; // was MAX_FIRST_NAME
120
121// user_last_name.name					varchar(31)
122const S32 DB_LAST_NAME_STR_LEN			= 31;
123const S32 DB_LAST_NAME_BUF_SIZE			= 32; // was MAX_LAST_NAME
124
125// user.password						varchar(100)
126const S32 DB_USER_PASSWORD_STR_LEN		= 100; 
127const S32 DB_USER_PASSWORD_BUF_SIZE		= 101; // was MAX_PASSWORD
128
129// user.email							varchar(254)
130const S32 DB_USER_EMAIL_ADDR_STR_LEN	= 254;
131const S32 DB_USER_EMAIL_ADDR_BUF_SIZE	= 255;
132
133// user.about							text
134const S32 DB_USER_ABOUT_STR_LEN			= 511;
135const S32 DB_USER_ABOUT_BUF_SIZE		= 512;
136
137// user.fl_about_text					text
138// Must be 255 not 256 as gets packed into message Variable 1
139const S32 DB_USER_FL_ABOUT_STR_LEN		= 254;
140const S32 DB_USER_FL_ABOUT_BUF_SIZE		= 255;
141
142// user.profile_url					text
143// Must be 255 not 256 as gets packed into message Variable 1
144const S32 DB_USER_PROFILE_URL_STR_LEN	= 254;
145const S32 DB_USER_PROFILE_URL_BUF_SIZE	= 255;
146
147// user.want_to							varchar(254)
148const S32 DB_USER_WANT_TO_STR_LEN		= 254;
149const S32 DB_USER_WANT_TO_BUF_SIZE		= 255;
150
151// user.skills							varchar(254)
152const S32 DB_USER_SKILLS_STR_LEN		= 254;
153const S32 DB_USER_SKILLS_BUF_SIZE		= 255;
154
155// user_nv.name							varchar(128)
156const S32 DB_NV_NAME_STR_LEN			= 128;
157const S32 DB_NV_NAME_BUF_SIZE			= 129;
158
159// votes.vote_text						varchar(254)
160const S32 DB_VOTE_TEXT_STR_LEN			= 254;
161const S32 DB_VOTE_TEXT_BUF_SIZE			= 255;
162
163// vpte type text						varchar(9)
164const S32 DB_VOTE_TYPE_STR_LEN			= 9;
165const S32 DB_VOTE_TYPE_BUF_SIZE			= 10;
166
167// vote result text
168const S32 DB_VOTE_RESULT_BUF_LEN		= 8;
169const S32 DB_VOTE_RESULT_BUF_SIZE		= 9;
170
171// user_start_location.location_name	varchar(254)
172const S32 DB_START_LOCATION_STR_LEN		= 254;
173const S32 DB_START_LOCATION_BUF_SIZE	= 255;
174
175// money_tax_assessment.sim				varchar(100)
176//const S32 DB_SIM_NAME_STR_LEN			= 100;
177//const S32 DB_SIM_NAME_BUF_SIZE			= 101;
178
179// born on date							date
180const S32 DB_BORN_STR_LEN				= 15;
181const S32 DB_BORN_BUF_SIZE				= 16;
182
183// place.name
184const S32 DB_PLACE_NAME_LEN				= 63;
185const S32 DB_PLACE_NAME_SIZE			= 64;
186const S32 DB_PARCEL_NAME_LEN			= 63;
187const S32 DB_PARCEL_NAME_SIZE			= 64;
188
189// place.desc
190const S32 DB_PLACE_DESC_LEN				= 255;
191const S32 DB_PLACE_DESC_SIZE			= 256;
192const S32 DB_PARCEL_DESC_LEN			= 255;
193const S32 DB_PARCEL_DESC_SIZE			= 256;
194const S32 DB_PARCEL_MUSIC_URL_LEN		= 255;
195const S32 DB_PARCEL_MEDIA_URL_LEN		= 255;
196const S32 DB_PARCEL_MUSIC_URL_SIZE		= 256;
197
198// date time that is easily human readable
199const S32 DB_DATETIME_STR_LEN			= 35;
200const S32 DB_DATETIME_BUF_SIZE			= 36;
201
202// date time that isn't easily human readable
203const S32 DB_TERSE_DATETIME_STR_LEN		= 15;
204const S32 DB_TERSE_DATETIME_BUF_SIZE	= 16;
205
206// indra.simulator constants
207const S32 DB_SIM_NAME_STR_LEN			= 35;
208const S32 DB_SIM_NAME_BUF_SIZE			= 36;
209const S32 DB_HOST_NAME_STR_LEN			= 100;
210const S32 DB_HOST_NAME_BUF_SIZE			= 101;
211const S32 DB_ESTATE_NAME_STR_LEN		= 63;
212const S32 DB_ESTATE_NAME_BUF_SIZE			= DB_ESTATE_NAME_STR_LEN + 1;
213
214// user_note.note
215const S32 DB_USER_NOTE_LEN				= 1023;
216const S32 DB_USER_NOTE_SIZE				= 1024;
217
218// pick.name
219const S32 DB_PICK_NAME_LEN				= 63;
220const S32 DB_PICK_NAME_SIZE				= 64;
221
222// pick.desc
223const S32 DB_PICK_DESC_LEN				= 1023;
224const S32 DB_PICK_DESC_SIZE				= 1024;
225
226#endif  // LL_LLDBSTRINGS_H