aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:07 -0500
committerJacek Antonelli2008-08-15 23:45:07 -0500
commit8465910c79b8e746e04fd581cca2d60399e569b9 (patch)
treef43fec3e83c46e0d6190dca923d6fb268b52ffdd /linden/indra/llcommon
parentSecond Life viewer sources 1.18.2.1 (diff)
downloadmeta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.zip
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.gz
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.bz2
meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.xz
Second Life viewer sources 1.18.3.2-RC
Diffstat (limited to 'linden/indra/llcommon')
-rw-r--r--linden/indra/llcommon/indra_constants.h1
-rw-r--r--linden/indra/llcommon/linden_common.h1
-rw-r--r--linden/indra/llcommon/llcommon.vcproj8
-rw-r--r--linden/indra/llcommon/llevent.cpp1
-rw-r--r--linden/indra/llcommon/llextendedstatus.h69
-rw-r--r--linden/indra/llcommon/lllivefile.cpp7
-rw-r--r--linden/indra/llcommon/lllslconstants.h11
-rw-r--r--linden/indra/llcommon/llmetrics.cpp2
-rw-r--r--linden/indra/llcommon/llsys.cpp81
-rw-r--r--linden/indra/llcommon/llsys.h26
-rw-r--r--linden/indra/llcommon/llthread.h2
-rw-r--r--linden/indra/llcommon/lltimer.cpp16
-rw-r--r--linden/indra/llcommon/lltimer.h5
-rw-r--r--linden/indra/llcommon/lluri.cpp111
-rw-r--r--linden/indra/llcommon/llversionserver.h (renamed from linden/indra/llcommon/llversion.h)11
-rw-r--r--linden/indra/llcommon/llversionviewer.h39
16 files changed, 244 insertions, 147 deletions
diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h
index 21635b5..bd591c5 100644
--- a/linden/indra/llcommon/indra_constants.h
+++ b/linden/indra/llcommon/indra_constants.h
@@ -136,6 +136,7 @@ const MASK MASK_ALT = 0x0002;
136const MASK MASK_SHIFT = 0x0004; 136const MASK MASK_SHIFT = 0x0004;
137const MASK MASK_NORMALKEYS = 0x0007; // A real mask - only get the bits for normal modifier keys 137const MASK MASK_NORMALKEYS = 0x0007; // A real mask - only get the bits for normal modifier keys
138const MASK MASK_MAC_CONTROL = 0x0008; // Un-mapped Ctrl key on Macs, not used on Windows 138const MASK MASK_MAC_CONTROL = 0x0008; // Un-mapped Ctrl key on Macs, not used on Windows
139const MASK MASK_MODIFIERS = MASK_CONTROL|MASK_ALT|MASK_SHIFT|MASK_MAC_CONTROL;
139 140
140// Special keys go into >128 141// Special keys go into >128
141const KEY KEY_SPECIAL = 0x80; // special keys start here 142const KEY KEY_SPECIAL = 0x80; // special keys start here
diff --git a/linden/indra/llcommon/linden_common.h b/linden/indra/llcommon/linden_common.h
index 5a6018a..24a346c 100644
--- a/linden/indra/llcommon/linden_common.h
+++ b/linden/indra/llcommon/linden_common.h
@@ -50,6 +50,7 @@
50#include "stdtypes.h" 50#include "stdtypes.h"
51#include "lldefs.h" 51#include "lldefs.h"
52#include "llerror.h" 52#include "llerror.h"
53#include "llextendedstatus.h"
53#include "llformat.h" 54#include "llformat.h"
54#include "llstring.h" 55#include "llstring.h"
55#include "lltimer.h" 56#include "lltimer.h"
diff --git a/linden/indra/llcommon/llcommon.vcproj b/linden/indra/llcommon/llcommon.vcproj
index 5557f94..70006e0 100644
--- a/linden/indra/llcommon/llcommon.vcproj
+++ b/linden/indra/llcommon/llcommon.vcproj
@@ -385,6 +385,9 @@
385 RelativePath=".\llevent.h"> 385 RelativePath=".\llevent.h">
386 </File> 386 </File>
387 <File 387 <File
388 RelativePath=".\llextendedstatus.h">
389 </File>
390 <File
388 RelativePath=".\llfasttimer.h"> 391 RelativePath=".\llfasttimer.h">
389 </File> 392 </File>
390 <File 393 <File
@@ -523,7 +526,10 @@
523 RelativePath=".\lluuidhashmap.h"> 526 RelativePath=".\lluuidhashmap.h">
524 </File> 527 </File>
525 <File 528 <File
526 RelativePath=".\llversion.h"> 529 RelativePath=".\llversionserver.h">
530 </File>
531 <File
532 RelativePath=".\llversionviewer.h">
527 </File> 533 </File>
528 <File 534 <File
529 RelativePath=".\llworkerthread.h"> 535 RelativePath=".\llworkerthread.h">
diff --git a/linden/indra/llcommon/llevent.cpp b/linden/indra/llcommon/llevent.cpp
index a6c4ef0..9c736c8 100644
--- a/linden/indra/llcommon/llevent.cpp
+++ b/linden/indra/llcommon/llevent.cpp
@@ -238,6 +238,7 @@ LLEventDispatcher::~LLEventDispatcher()
238 if (impl) 238 if (impl)
239 { 239 {
240 delete impl; 240 delete impl;
241 impl = NULL;
241 } 242 }
242} 243}
243 244
diff --git a/linden/indra/llcommon/llextendedstatus.h b/linden/indra/llcommon/llextendedstatus.h
new file mode 100644
index 0000000..a1c998f
--- /dev/null
+++ b/linden/indra/llcommon/llextendedstatus.h
@@ -0,0 +1,69 @@
1/**
2 * @file llextendedstatus.h
3 * @date August 2007
4 * @brief extended status codes for curl/vfs/resident asset storage and delivery
5 *
6 * Copyright (c) 2007-2007, Linden Research, Inc.
7 *
8 * Second Life Viewer Source Code
9 * The source code in this file ("Source Code") is provided by Linden Lab
10 * to you under the terms of the GNU General Public License, version 2.0
11 * ("GPL"), unless you have obtained a separate licensing agreement
12 * ("Other License"), formally executed by you and Linden Lab. Terms of
13 * the GPL can be found in doc/GPL-license.txt in this distribution, or
14 * online at http://secondlife.com/developers/opensource/gplv2
15 *
16 * There are special exceptions to the terms and conditions of the GPL as
17 * it is applied to this Source Code. View the full text of the exception
18 * in the file doc/FLOSS-exception.txt in this software distribution, or
19 * online at http://secondlife.com/developers/opensource/flossexception
20 *
21 * By copying, modifying or distributing this software, you acknowledge
22 * that you have read and understood your obligations described above,
23 * and agree to abide by those obligations.
24 *
25 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
26 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27 * COMPLETENESS OR PERFORMANCE.
28 */
29
30#ifndef LL_LLEXTENDEDSTATUS_H
31#define LL_LLEXTENDEDSTATUS_H
32
33
34typedef S32 LLExtStat;
35
36
37// Status provider groups - Top bits indicate which status type it is
38// Zero is common status code (next section)
39const LLExtStat LL_EXSTAT_CURL_RESULT = 1L<<30; // serviced by curl - use 1L if we really implement the below
40const LLExtStat LL_EXSTAT_RES_RESULT = 2L<<30; // serviced by resident copy
41const LLExtStat LL_EXSTAT_VFS_RESULT = 3L<<30; // serviced by vfs
42
43
44// Common Status Codes
45//
46const LLExtStat LL_EXSTAT_NONE = 0x00000; // No extra info here - sorry!
47const LLExtStat LL_EXSTAT_NULL_UUID = 0x10001; // null asset ID
48const LLExtStat LL_EXSTAT_NO_UPSTREAM = 0x10002; // attempt to upload without a valid upstream method/provider
49const LLExtStat LL_EXSTAT_REQUEST_DROPPED = 0x10003; // request was dropped unserviced
50const LLExtStat LL_EXSTAT_NONEXISTENT_FILE = 0x10004; // trying to upload a file that doesn't exist
51const LLExtStat LL_EXSTAT_BLOCKED_FILE = 0x10005; // trying to upload a file that we can't open
52
53
54// curl status codes:
55//
56// Mask off LL_EXSTAT_CURL_RESULT for original result and
57// see: libraries/include/curl/curl.h
58
59
60// Memory-Resident status codes:
61// None at present
62
63
64// VFS status codes:
65const LLExtStat LL_EXSTAT_VFS_CACHED = LL_EXSTAT_VFS_RESULT | 0x0001;
66const LLExtStat LL_EXSTAT_VFS_CORRUPT = LL_EXSTAT_VFS_RESULT | 0x0002;
67
68
69#endif // LL_LLEXTENDEDSTATUS_H
diff --git a/linden/indra/llcommon/lllivefile.cpp b/linden/indra/llcommon/lllivefile.cpp
index f116a2a..17fe210 100644
--- a/linden/indra/llcommon/lllivefile.cpp
+++ b/linden/indra/llcommon/lllivefile.cpp
@@ -146,8 +146,11 @@ namespace
146 : LLEventTimer(refresh), mLiveFile(f) 146 : LLEventTimer(refresh), mLiveFile(f)
147 { } 147 { }
148 148
149 void tick() 149 BOOL tick()
150 { mLiveFile.checkAndReload(); } 150 {
151 mLiveFile.checkAndReload();
152 return FALSE;
153 }
151 154
152 private: 155 private:
153 LLLiveFile& mLiveFile; 156 LLLiveFile& mLiveFile;
diff --git a/linden/indra/llcommon/lllslconstants.h b/linden/indra/llcommon/lllslconstants.h
index afe4a9e..151c7a2 100644
--- a/linden/indra/llcommon/lllslconstants.h
+++ b/linden/indra/llcommon/lllslconstants.h
@@ -166,4 +166,15 @@ const S32 STRING_TRIM_HEAD = 0x01;
166const S32 STRING_TRIM_TAIL = 0x02; 166const S32 STRING_TRIM_TAIL = 0x02;
167const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL; 167const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL;
168 168
169// llGetObjectDetails
170const S32 OBJECT_UNKOWN_DETAIL = -1;
171const S32 OBJECT_NAME = 1;
172const S32 OBJECT_DESC = 2;
173const S32 OBJECT_POS = 3;
174const S32 OBJECT_ROT = 4;
175const S32 OBJECT_VELOCITY = 5;
176const S32 OBJECT_OWNER = 6;
177const S32 OBJECT_GROUP = 7;
178const S32 OBJECT_CREATOR = 8;
179
169#endif 180#endif
diff --git a/linden/indra/llcommon/llmetrics.cpp b/linden/indra/llcommon/llmetrics.cpp
index 583f840..74bd13d 100644
--- a/linden/indra/llcommon/llmetrics.cpp
+++ b/linden/indra/llcommon/llmetrics.cpp
@@ -67,7 +67,7 @@ void LLMetricsImpl::recordEventDetails(const std::string& location,
67 metrics["location"] = location; 67 metrics["location"] = location;
68 metrics["stats"] = stats; 68 metrics["stats"] = stats;
69 69
70 llinfos << "LLMETRICS: " << LLSDOStreamer<LLSDNotationFormatter>(metrics) << llendl; 70 llinfos << "LLMETRICS: " << LLSDNotationStreamer(metrics) << llendl;
71} 71}
72 72
73// Store this: 73// Store this:
diff --git a/linden/indra/llcommon/llsys.cpp b/linden/indra/llcommon/llsys.cpp
index 25749e1..95b6b55 100644
--- a/linden/indra/llcommon/llsys.cpp
+++ b/linden/indra/llcommon/llsys.cpp
@@ -46,6 +46,7 @@
46#elif LL_DARWIN 46#elif LL_DARWIN
47# include <sys/sysctl.h> 47# include <sys/sysctl.h>
48# include <sys/utsname.h> 48# include <sys/utsname.h>
49# include <stdint.h>
49#elif LL_LINUX 50#elif LL_LINUX
50# include <sys/utsname.h> 51# include <sys/utsname.h>
51# include <unistd.h> 52# include <unistd.h>
@@ -482,57 +483,97 @@ LLMemoryInfo::LLMemoryInfo()
482{ 483{
483} 484}
484 485
485U32 LLMemoryInfo::getPhysicalMemory() const 486#if LL_WINDOWS
487static U32 LLMemoryAdjustKBResult(U32 inKB)
488{
489 // Moved this here from llfloaterabout.cpp
490
491 //! \bug
492 // For some reason, the reported amount of memory is always wrong.
493 // The original adjustment assumes it's always off by one meg, however
494 // errors of as much as 2520 KB have been observed in the value
495 // returned from the GetMemoryStatusEx function. Here we keep the
496 // original adjustment from llfoaterabout.cpp until this can be
497 // fixed somehow.
498 inKB += 1024;
499
500 return inKB;
501}
502#endif
503
504U32 LLMemoryInfo::getPhysicalMemoryKB() const
486{ 505{
487#if LL_WINDOWS 506#if LL_WINDOWS
488 MEMORYSTATUS state; 507 MEMORYSTATUSEX state;
489 state.dwLength = sizeof(state); 508 state.dwLength = sizeof(state);
490 GlobalMemoryStatus(&state); 509 GlobalMemoryStatusEx(&state);
491 510
492 return (U32)state.dwTotalPhys; 511 return LLMemoryAdjustKBResult((U32)(state.ullTotalPhys >> 10));
493 512
494#elif LL_DARWIN 513#elif LL_DARWIN
495 // This might work on Linux as well. Someone check... 514 // This might work on Linux as well. Someone check...
496 unsigned int phys = 0; 515 uint64_t phys = 0;
497 int mib[2] = { CTL_HW, HW_PHYSMEM }; 516 int mib[2] = { CTL_HW, HW_MEMSIZE };
498 517
499 size_t len = sizeof(phys); 518 size_t len = sizeof(phys);
500 sysctl(mib, 2, &phys, &len, NULL, 0); 519 sysctl(mib, 2, &phys, &len, NULL, 0);
501 520
502 return phys; 521 return (U32)(phys >> 10);
522
503#elif LL_LINUX 523#elif LL_LINUX
524 U64 phys = 0;
525 phys = (U64)(getpagesize()) * (U64)(get_phys_pages());
526 return (U32)(phys >> 10);
504 527
505 return getpagesize() * get_phys_pages();
506#elif LL_SOLARIS 528#elif LL_SOLARIS
507 return getpagesize() * sysconf(_SC_PHYS_PAGES); 529 U64 phys = 0;
530 phys = (U64)(getpagesize()) * (U64)(sysconf(_SC_PHYS_PAGES));
531 return (U32)(phys >> 10);
532
508#else 533#else
509 return 0; 534 return 0;
510 535
511#endif 536#endif
512} 537}
513 538
539U32 LLMemoryInfo::getPhysicalMemoryClamped() const
540{
541 // Return the total physical memory in bytes, but clamp it
542 // to no more than U32_MAX
543
544 U32 phys_kb = getPhysicalMemoryKB();
545 if (phys_kb >= 4194304 /* 4GB in KB */)
546 {
547 return U32_MAX;
548 }
549 else
550 {
551 return phys_kb << 10;
552 }
553}
554
514void LLMemoryInfo::stream(std::ostream& s) const 555void LLMemoryInfo::stream(std::ostream& s) const
515{ 556{
516#if LL_WINDOWS 557#if LL_WINDOWS
517 MEMORYSTATUS state; 558 MEMORYSTATUSEX state;
518 state.dwLength = sizeof(state); 559 state.dwLength = sizeof(state);
519 GlobalMemoryStatus(&state); 560 GlobalMemoryStatusEx(&state);
520 561
521 s << "Percent Memory use: " << (U32)state.dwMemoryLoad << '%' << std::endl; 562 s << "Percent Memory use: " << (U32)state.dwMemoryLoad << '%' << std::endl;
522 s << "Total Physical Kb: " << (U32)state.dwTotalPhys/1024 << std::endl; 563 s << "Total Physical KB: " << (U32)(state.ullTotalPhys/1024) << std::endl;
523 s << "Avail Physical Kb: " << (U32)state.dwAvailPhys/1024 << std::endl; 564 s << "Avail Physical KB: " << (U32)(state.ullAvailPhys/1024) << std::endl;
524 s << "Total page Kb: " << (U32)state.dwTotalPageFile/1024 << std::endl; 565 s << "Total page KB: " << (U32)(state.ullTotalPageFile/1024) << std::endl;
525 s << "Avail page Kb: " << (U32)state.dwAvailPageFile/1024 << std::endl; 566 s << "Avail page KB: " << (U32)(state.ullAvailPageFile/1024) << std::endl;
526 s << "Total Virtual Kb: " << (U32)state.dwTotalVirtual/1024 << std::endl; 567 s << "Total Virtual KB: " << (U32)(state.ullTotalVirtual/1024) << std::endl;
527 s << "Avail Virtual Kb: " << (U32)state.dwAvailVirtual/1024 << std::endl; 568 s << "Avail Virtual KB: " << (U32)(state.ullAvailVirtual/1024) << std::endl;
528#elif LL_DARWIN 569#elif LL_DARWIN
529 U64 phys = 0; 570 uint64_t phys = 0;
530 571
531 size_t len = sizeof(phys); 572 size_t len = sizeof(phys);
532 573
533 if(sysctlbyname("hw.memsize", &phys, &len, NULL, 0) == 0) 574 if(sysctlbyname("hw.memsize", &phys, &len, NULL, 0) == 0)
534 { 575 {
535 s << "Total Physical Kb: " << phys/1024 << std::endl; 576 s << "Total Physical KB: " << phys/1024 << std::endl;
536 } 577 }
537 else 578 else
538 { 579 {
@@ -543,7 +584,7 @@ void LLMemoryInfo::stream(std::ostream& s) const
543 584
544 phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024); 585 phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024);
545 586
546 s << "Total Physical Kb: " << phys << std::endl; 587 s << "Total Physical KB: " << phys << std::endl;
547#else 588#else
548 // *NOTE: This works on linux. What will it do on other systems? 589 // *NOTE: This works on linux. What will it do on other systems?
549 FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb"); 590 FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb");
diff --git a/linden/indra/llcommon/llsys.h b/linden/indra/llcommon/llsys.h
index 416bd54..66a3465 100644
--- a/linden/indra/llcommon/llsys.h
+++ b/linden/indra/llcommon/llsys.h
@@ -89,13 +89,31 @@ private:
89 std::string mCPUString; 89 std::string mCPUString;
90}; 90};
91 91
92//=============================================================================
93//
94// CLASS LLMemoryInfo
95
92class LLMemoryInfo 96class LLMemoryInfo
97
98/*! @brief Class to query the memory subsystem
99
100 @details
101 Here's how you use an LLMemoryInfo:
102
103 LLMemoryInfo info;
104<br> llinfos << info << llendl;
105*/
93{ 106{
94public: 107public:
95 LLMemoryInfo(); 108 LLMemoryInfo(); ///< Default constructor
96 void stream(std::ostream& s) const; 109 void stream(std::ostream& s) const; ///< output text info to s
97 110
98 U32 getPhysicalMemory() const; 111 U32 getPhysicalMemoryKB() const; ///< Memory size in KiloBytes
112
113 /*! Memory size in bytes, if total memory is >= 4GB then U32_MAX will
114 ** be returned.
115 */
116 U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes
99}; 117};
100 118
101 119
diff --git a/linden/indra/llcommon/llthread.h b/linden/indra/llcommon/llthread.h
index c863322..d700592 100644
--- a/linden/indra/llcommon/llthread.h
+++ b/linden/indra/llcommon/llthread.h
@@ -220,7 +220,7 @@ public:
220 if (0 == res) 220 if (0 == res)
221 { 221 {
222 delete this; 222 delete this;
223 res = 0; 223 return 0;
224 } 224 }
225 return res; 225 return res;
226 } 226 }
diff --git a/linden/indra/llcommon/lltimer.cpp b/linden/indra/llcommon/lltimer.cpp
index 6077063..177f1de 100644
--- a/linden/indra/llcommon/lltimer.cpp
+++ b/linden/indra/llcommon/lltimer.cpp
@@ -525,13 +525,27 @@ LLEventTimer::~LLEventTimer()
525 525
526void LLEventTimer::updateClass() 526void LLEventTimer::updateClass()
527{ 527{
528 std::list<LLEventTimer*> completed_timers;
528 for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); ) 529 for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); )
529 { 530 {
530 LLEventTimer* timer = *iter++; 531 LLEventTimer* timer = *iter++;
531 F32 et = timer->mEventTimer.getElapsedTimeF32(); 532 F32 et = timer->mEventTimer.getElapsedTimeF32();
532 if (et > timer->mPeriod) { 533 if (et > timer->mPeriod) {
533 timer->mEventTimer.reset(); 534 timer->mEventTimer.reset();
534 timer->tick(); 535 if ( timer->tick() )
536 {
537 completed_timers.push_back( timer );
538 }
539 }
540 }
541
542 if ( completed_timers.size() > 0 )
543 {
544 for (std::list<LLEventTimer*>::iterator completed_iter = completed_timers.begin();
545 completed_iter != completed_timers.end();
546 completed_iter++ )
547 {
548 delete *completed_iter;
535 } 549 }
536 } 550 }
537} 551}
diff --git a/linden/indra/llcommon/lltimer.h b/linden/indra/llcommon/lltimer.h
index 37917d0..35f0a7b 100644
--- a/linden/indra/llcommon/lltimer.h
+++ b/linden/indra/llcommon/lltimer.h
@@ -142,11 +142,12 @@ void secondsToTimecodeString(F32 current_time, char *tcstring);
142class LLEventTimer 142class LLEventTimer
143{ 143{
144public: 144public:
145 LLEventTimer(F32 period); // period is the amount of time between each call to tick() 145 LLEventTimer(F32 period); // period is the amount of time between each call to tick() in seconds
146 virtual ~LLEventTimer(); 146 virtual ~LLEventTimer();
147 147
148 //function to be called at the supplied frequency 148 //function to be called at the supplied frequency
149 virtual void tick() = 0; 149 // Normally return FALSE; TRUE will delete the timer after the function returns.
150 virtual BOOL tick() = 0;
150 151
151 static void updateClass(); 152 static void updateClass();
152 153
diff --git a/linden/indra/llcommon/lluri.cpp b/linden/indra/llcommon/lluri.cpp
index 43d2147..892ac02 100644
--- a/linden/indra/llcommon/lluri.cpp
+++ b/linden/indra/llcommon/lluri.cpp
@@ -319,117 +319,6 @@ LLURI LLURI::buildHTTP(const std::string& host,
319 return LLURI::buildHTTP(llformat("%s:%u", host.c_str(), port), path, query); 319 return LLURI::buildHTTP(llformat("%s:%u", host.c_str(), port), path, query);
320} 320}
321 321
322namespace {
323 LLURI buildBackboneURL(LLApp* app,
324 const std::string& p1 = "",
325 const std::string& p2 = "",
326 const std::string& p3 = "")
327 {
328 std::string host = "localhost:12040";
329
330 if (app)
331 {
332 host = app->getOption("backbone-host-port").asString();
333 }
334
335 LLSD path = LLSD::emptyArray();
336 if (!p1.empty()) path.append(p1);
337 if (!p2.empty()) path.append(p2);
338 if (!p3.empty()) path.append(p3);
339
340 return LLURI::buildHTTP(host, path);
341 }
342}
343
344#if LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS
345// static
346LLURI LLURI::buildBulkAgentNamesURI(LLApp* app)
347{
348 std::string host = "localhost:12040";
349
350 if (app)
351 {
352 host = app->getOption("backbone-host-port").asString();
353 }
354
355 LLSD path = LLSD::emptyArray();
356 path.append("agent");
357 path.append("names");
358
359 return buildHTTP(host, path);
360}
361
362// static
363LLURI LLURI::buildBulkAgentNamesURI(LLApp* app)
364{
365 std::string host = "localhost:12040";
366
367 if (app)
368 {
369 host = app->getOption("backbone-host-port").asString();
370 }
371
372 LLSD path = LLSD::emptyArray();
373 path.append("agent");
374 path.append("names");
375
376 return buildHTTP(host, path);
377}
378
379// static
380LLURI LLURI::buildAgentSessionURI(const LLUUID& agent_id, LLApp* app)
381{
382 return buildBackboneURL(app, "agent", agent_id.asString(), "session");
383}
384
385// static
386LLURI LLURI::buildAgentNameURI(const LLUUID& agent_id, LLApp* app)
387{
388 std::string host = "localhost:12040";
389
390 if (app)
391 {
392 host = app->getOption("backbone-host-port").asString();
393 }
394
395 LLSD path = LLSD::emptyArray();
396 path.append("agent");
397 path.append(agent_id);
398 path.append("name");
399
400 return buildHTTP(host, path);
401}
402
403// static
404LLURI LLURI::buildAgentNameURI(const LLUUID& agent_id, LLApp* app)
405{
406 std::string host = "localhost:12040";
407
408 if (app)
409 {
410 host = app->getOption("backbone-host-port").asString();
411 }
412
413 LLSD path = LLSD::emptyArray();
414 path.append("agent");
415 path.append(agent_id);
416 path.append("name");
417
418 return buildHTTP(host, path);
419}
420
421// static
422LLURI LLURI::buildAgentLoginInfoURI(const LLUUID& agent_id, const std::string& dataserver)
423{
424 LLSD path = LLSD::emptyArray();
425 path.append("agent");
426 path.append(agent_id);
427 path.append("logininfo");
428
429 return buildHTTP(dataserver, path);
430}
431#endif // LL_ENABLE_JANKY_DEPRECATED_WEB_SERVICE_CALLS
432
433std::string LLURI::asString() const 322std::string LLURI::asString() const
434{ 323{
435 if (mScheme.empty()) 324 if (mScheme.empty())
diff --git a/linden/indra/llcommon/llversion.h b/linden/indra/llcommon/llversionserver.h
index 00c3039..0680501 100644
--- a/linden/indra/llcommon/llversion.h
+++ b/linden/indra/llcommon/llversionserver.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file llversion.h 2 * @file llversionserver.h
3 * @brief 3 * @brief
4 * 4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc. 5 * Copyright (c) 2002-2007, Linden Research, Inc.
@@ -26,12 +26,15 @@
26 * COMPLETENESS OR PERFORMANCE. 26 * COMPLETENESS OR PERFORMANCE.
27 */ 27 */
28 28
29#ifndef LL_LLVERSION_H 29#ifndef LL_LLVERSIONSERVER_H
30#define LL_LLVERSION_H 30#define LL_LLVERSIONSERVER_H
31 31
32const S32 LL_VERSION_MAJOR = 1; 32const S32 LL_VERSION_MAJOR = 1;
33const S32 LL_VERSION_MINOR = 18; 33const S32 LL_VERSION_MINOR = 18;
34const S32 LL_VERSION_PATCH = 2; 34const S32 LL_VERSION_PATCH = 2;
35const S32 LL_VERSION_BUILD = 1; 35const S32 LL_VERSION_BUILD = 0;
36
37const char * const LL_CHANNEL = "Second Life Server";
38
36 39
37#endif 40#endif
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h
new file mode 100644
index 0000000..8c001e0
--- /dev/null
+++ b/linden/indra/llcommon/llversionviewer.h
@@ -0,0 +1,39 @@
1/**
2 * @file llversionviewer.h
3 * @brief
4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 *
7 * Second Life Viewer Source Code
8 * The source code in this file ("Source Code") is provided by Linden Lab
9 * to you under the terms of the GNU General Public License, version 2.0
10 * ("GPL"), unless you have obtained a separate licensing agreement
11 * ("Other License"), formally executed by you and Linden Lab. Terms of
12 * the GPL can be found in doc/GPL-license.txt in this distribution, or
13 * online at http://secondlife.com/developers/opensource/gplv2
14 *
15 * There are special exceptions to the terms and conditions of the GPL as
16 * it is applied to this Source Code. View the full text of the exception
17 * in the file doc/FLOSS-exception.txt in this software distribution, or
18 * online at http://secondlife.com/developers/opensource/flossexception
19 *
20 * By copying, modifying or distributing this software, you acknowledge
21 * that you have read and understood your obligations described above,
22 * and agree to abide by those obligations.
23 *
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE.
27 */
28
29#ifndef LL_LLVERSIONVIEWER_H
30#define LL_LLVERSIONVIEWER_H
31
32const S32 LL_VERSION_MAJOR = 1;
33const S32 LL_VERSION_MINOR = 18;
34const S32 LL_VERSION_PATCH = 3;
35const S32 LL_VERSION_BUILD = 2;
36
37const char * const LL_CHANNEL = "Second Life Release";
38
39#endif