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