aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llsrv.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:11 -0500
committerJacek Antonelli2008-08-15 23:45:11 -0500
commit215f423cbe18fe9ca14a26caef918d303bad28ff (patch)
tree0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llsrv.h
parentSecond Life viewer sources 1.18.3.5-RC (diff)
downloadmeta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to 'linden/indra/newview/llsrv.h')
-rw-r--r--linden/indra/newview/llsrv.h48
1 files changed, 4 insertions, 44 deletions
diff --git a/linden/indra/newview/llsrv.h b/linden/indra/newview/llsrv.h
index 9417664..28bc36a 100644
--- a/linden/indra/newview/llsrv.h
+++ b/linden/indra/newview/llsrv.h
@@ -2,7 +2,9 @@
2 * @file llsrv.h 2 * @file llsrv.h
3 * @brief Wrapper for DNS SRV record lookups 3 * @brief Wrapper for DNS SRV record lookups
4 * 4 *
5 * Copyright (c) 2007-2007, Linden Research, Inc. 5 * $LicenseInfo:firstyear=2007&license=viewergpl$
6 *
7 * Copyright (c) 2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
8 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -24,57 +26,15 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#ifndef LL_LLSRV_H 32#ifndef LL_LLSRV_H
30#define LL_LLSRV_H 33#define LL_LLSRV_H
31 34
32class LLSRV;
33
34class LLSRVRecord
35{
36 friend class LLSRV;
37
38protected:
39 U16 mPriority;
40 U16 mWeight;
41 std::string mTarget;
42 U16 mPort;
43
44public:
45 LLSRVRecord(U16 priority, U16 weight, const std::string& target,
46 U16 port) :
47 mPriority(priority),
48 mWeight(weight),
49 mTarget(target),
50 mPort(port) {
51 }
52
53 U16 priority() const { return mPriority; }
54 U16 weight() const { return mWeight; }
55 const std::string& target() const { return mTarget; }
56 U16 port() const { return mPort; }
57
58 struct ComparePriorityLowest
59 {
60 bool operator()(const LLSRVRecord& lhs, const LLSRVRecord& rhs)
61 {
62 return lhs.mPriority < rhs.mPriority;
63 }
64 };
65};
66
67class LLSRV 35class LLSRV
68{ 36{
69protected:
70#ifndef LL_WINDOWS
71 static std::vector<LLSRVRecord> parseResponse(const unsigned char *response,
72 int resp_len);
73#endif
74 static std::vector<LLSRVRecord> reorder(std::vector<LLSRVRecord>& recs);
75
76public: 37public:
77 static std::vector<LLSRVRecord> query(const std::string& name);
78 static std::vector<std::string> rewriteURI(const std::string& uri); 38 static std::vector<std::string> rewriteURI(const std::string& uri);
79}; 39};
80 40