lldbstrings.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. /**
  2. * @file lldbstrings.h
  3. * @brief Database String Lengths.
  4. *
  5. * $LicenseInfo:firstyear=2002&license=viewergpl$
  6. *
  7. * Copyright (c) 2002-2009, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_LLDBSTRINGS_H
  33. #define LL_LLDBSTRINGS_H
  34. /**
  35. * Defines the length of strings that are stored in the database (and
  36. * the size of the buffer large enough to hold each one)
  37. */
  38. // asset.name varchar(63)
  39. // -also-
  40. // user_inventory_item.name varchar(63)
  41. // -also-
  42. // user_inventory_folder.name varchar(63) was CAT_NAME_SIZE
  43. // Must be >= DB_FULL_NAME_STR_LEN so that calling cards work
  44. constexpr S32 DB_INV_ITEM_NAME_STR_LEN = 63; // was MAX_ASSET_NAME_LENGTH
  45. constexpr S32 DB_INV_ITEM_NAME_BUF_SIZE = 64; // was ITEM_NAME_SIZE
  46. // asset.description varchar(127)
  47. // -also-
  48. // user_inventory_item.description varchar(127)
  49. constexpr S32 DB_INV_ITEM_DESC_STR_LEN = 127; // was MAX_ASSET_DESCRIPTION_LENGTH
  50. constexpr S32 DB_INV_ITEM_DESC_BUF_SIZE = 128; // was ITEM_DESC_SIZE
  51. // groups.name varchar(35)
  52. constexpr S32 DB_GROUP_NAME_STR_LEN = 35;
  53. constexpr S32 DB_GROUP_NAME_BUF_SIZE = 36;
  54. constexpr S32 DB_GROUP_NAME_MIN_LEN = 4;
  55. //group_roles.name
  56. constexpr U32 DB_GROUP_ROLE_NAME_STR_LEN = 20;
  57. constexpr U32 DB_GROUP_ROLE_NAME_BUF_SIZE = DB_GROUP_ROLE_NAME_STR_LEN + 1;
  58. //group_roles.title
  59. constexpr U32 DB_GROUP_ROLE_TITLE_STR_LEN = 20;
  60. constexpr U32 DB_GROUP_ROLE_TITLE_BUF_SIZE = DB_GROUP_ROLE_TITLE_STR_LEN + 1;
  61. // group.charter text
  62. constexpr S32 DB_GROUP_CHARTER_STR_LEN = 511;
  63. constexpr S32 DB_GROUP_CHARTER_BUF_SIZE = 512;
  64. // group.officer_title varchar(20)
  65. // -also-
  66. // group.member_title varchar(20)
  67. constexpr S32 DB_GROUP_TITLE_STR_LEN = 20;
  68. constexpr S32 DB_GROUP_TITLE_BUF_SIZE = 21;
  69. // Since chat and im both dump into the database text message log,
  70. // they derive their max size from the same constant.
  71. constexpr S32 MAX_MSG_STR_LEN = 1023;
  72. constexpr S32 MAX_MSG_BUF_SIZE = 1024;
  73. // instant_message.message text
  74. constexpr S32 DB_IM_MSG_STR_LEN = MAX_MSG_STR_LEN;
  75. constexpr S32 DB_IM_MSG_BUF_SIZE = MAX_MSG_BUF_SIZE;
  76. // groupnotices
  77. constexpr S32 DB_GROUP_NOTICE_SUBJ_STR_LEN = 63;
  78. constexpr S32 DB_GROUP_NOTICE_SUBJ_STR_SIZE = 64;
  79. constexpr S32 DB_GROUP_NOTICE_MSG_STR_LEN = MAX_MSG_STR_LEN - DB_GROUP_NOTICE_SUBJ_STR_LEN;
  80. constexpr S32 DB_GROUP_NOTICE_MSG_STR_SIZE = MAX_MSG_BUF_SIZE - DB_GROUP_NOTICE_SUBJ_STR_SIZE;
  81. // log_text_message.message text
  82. constexpr S32 DB_CHAT_MSG_STR_LEN = MAX_MSG_STR_LEN;
  83. constexpr S32 DB_CHAT_MSG_BUF_SIZE = MAX_MSG_BUF_SIZE;
  84. // money_stipend.description varchar(254)
  85. constexpr S32 DB_STIPEND_DESC_STR_LEN = 254;
  86. constexpr S32 DB_STIPEND_DESC_BUF_SIZE = 255;
  87. // script_email_message.from_email varchar(78)
  88. constexpr S32 DB_EMAIL_FROM_STR_LEN = 78;
  89. constexpr S32 DB_EMAIL_FROM_BUF_SIZE = 79;
  90. // script_email_message.subject varchar(72)
  91. constexpr S32 DB_EMAIL_SUBJECT_STR_LEN = 72;
  92. constexpr S32 DB_EMAIL_SUBJECT_BUF_SIZE = 73;
  93. // system_globals.motd varchar(254)
  94. constexpr S32 DB_MOTD_STR_LEN = 254;
  95. constexpr S32 DB_MOTD_BUF_SIZE = 255;
  96. // Must be <= user_inventory_item.name so that calling cards work
  97. // First name + " " + last name...or a system assigned "from" name
  98. // instant_message.from_agent_name varchar(63)
  99. // -also-
  100. // user_mute.mute_agent_name varchar(63)
  101. constexpr S32 DB_FULL_NAME_STR_LEN = 63;
  102. constexpr S32 DB_FULL_NAME_BUF_SIZE = 64; // was USER_NAME_SIZE
  103. // user.username varchar(31)
  104. constexpr S32 DB_FIRST_NAME_STR_LEN = 31;
  105. constexpr S32 DB_FIRST_NAME_BUF_SIZE = 32; // was MAX_FIRST_NAME
  106. // user_last_name.name varchar(31)
  107. constexpr S32 DB_LAST_NAME_STR_LEN = 31;
  108. constexpr S32 DB_LAST_NAME_BUF_SIZE = 32; // was MAX_LAST_NAME
  109. // user.password varchar(100)
  110. constexpr S32 DB_USER_PASSWORD_STR_LEN = 100;
  111. constexpr S32 DB_USER_PASSWORD_BUF_SIZE = 101; // was MAX_PASSWORD
  112. // user.email varchar(254)
  113. constexpr S32 DB_USER_EMAIL_ADDR_STR_LEN = 254;
  114. constexpr S32 DB_USER_EMAIL_ADDR_BUF_SIZE = 255;
  115. // user.about text
  116. constexpr S32 DB_USER_ABOUT_STR_LEN = 511;
  117. constexpr S32 DB_USER_ABOUT_BUF_SIZE = 512;
  118. // user.fl_about_text text
  119. // Must be 255 not 256 as gets packed into message Variable 1
  120. constexpr S32 DB_USER_FL_ABOUT_STR_LEN = 254;
  121. constexpr S32 DB_USER_FL_ABOUT_BUF_SIZE = 255;
  122. // user.profile_url text
  123. // Must be 255 not 256 as gets packed into message Variable 1
  124. constexpr S32 DB_USER_PROFILE_URL_STR_LEN = 254;
  125. constexpr S32 DB_USER_PROFILE_URL_BUF_SIZE = 255;
  126. // user.want_to varchar(254)
  127. constexpr S32 DB_USER_WANT_TO_STR_LEN = 254;
  128. constexpr S32 DB_USER_WANT_TO_BUF_SIZE = 255;
  129. // user.skills varchar(254)
  130. constexpr S32 DB_USER_SKILLS_STR_LEN = 254;
  131. constexpr S32 DB_USER_SKILLS_BUF_SIZE = 255;
  132. // user_nv.name varchar(128)
  133. constexpr S32 DB_NV_NAME_STR_LEN = 128;
  134. constexpr S32 DB_NV_NAME_BUF_SIZE = 129;
  135. // user_start_location.location_name varchar(254)
  136. constexpr S32 DB_START_LOCATION_STR_LEN = 254;
  137. constexpr S32 DB_START_LOCATION_BUF_SIZE = 255;
  138. // money_tax_assessment.sim varchar(100)
  139. //constexpr S32 DB_SIM_NAME_STR_LEN = 100;
  140. //constexpr S32 DB_SIM_NAME_BUF_SIZE = 101;
  141. // born on date date
  142. constexpr S32 DB_BORN_STR_LEN = 15;
  143. constexpr S32 DB_BORN_BUF_SIZE = 16;
  144. // place.name
  145. constexpr S32 DB_PLACE_NAME_LEN = 63;
  146. constexpr S32 DB_PLACE_NAME_SIZE = 64;
  147. constexpr S32 DB_PARCEL_NAME_LEN = 63;
  148. constexpr S32 DB_PARCEL_NAME_SIZE = 64;
  149. // place.desc
  150. constexpr S32 DB_PLACE_DESC_LEN = 255;
  151. constexpr S32 DB_PLACE_DESC_SIZE = 256;
  152. constexpr S32 DB_PARCEL_DESC_LEN = 255;
  153. constexpr S32 DB_PARCEL_DESC_SIZE = 256;
  154. constexpr S32 DB_PARCEL_MUSIC_URL_LEN = 255;
  155. constexpr S32 DB_PARCEL_MEDIA_URL_LEN = 255;
  156. constexpr S32 DB_PARCEL_MUSIC_URL_SIZE = 256;
  157. // Date time that is easily human readable
  158. constexpr S32 DB_DATETIME_STR_LEN = 35;
  159. constexpr S32 DB_DATETIME_BUF_SIZE = 36;
  160. // Date time that is not easily human readable
  161. constexpr S32 DB_TERSE_DATETIME_STR_LEN = 15;
  162. constexpr S32 DB_TERSE_DATETIME_BUF_SIZE = 16;
  163. // indra.simulator constants
  164. constexpr S32 DB_SIM_NAME_STR_LEN = 35;
  165. constexpr S32 DB_SIM_NAME_BUF_SIZE = 36;
  166. constexpr S32 DB_HOST_NAME_STR_LEN = 100;
  167. constexpr S32 DB_HOST_NAME_BUF_SIZE = 101;
  168. constexpr S32 DB_ESTATE_NAME_STR_LEN = 63;
  169. constexpr S32 DB_ESTATE_NAME_BUF_SIZE = DB_ESTATE_NAME_STR_LEN + 1;
  170. // user_note.note
  171. constexpr S32 DB_USER_NOTE_LEN = 1023;
  172. constexpr S32 DB_USER_NOTE_SIZE = 1024;
  173. // pick.name
  174. constexpr S32 DB_PICK_NAME_LEN = 63;
  175. constexpr S32 DB_PICK_NAME_SIZE = 64;
  176. // pick.desc
  177. constexpr S32 DB_PICK_DESC_LEN = 1023;
  178. constexpr S32 DB_PICK_DESC_SIZE = 1024;
  179. #endif // LL_LLDBSTRINGS_H