Merge branch 'AltCompilers' of git://github.com/LightDrake/SingularityViewer

Conflicts:
	indra/newview/skins/default/xui/en-us/strings.xml
This commit is contained in:
Siana Gearz
2012-08-09 03:04:13 +02:00
41 changed files with 3358 additions and 2289 deletions

View File

@@ -148,7 +148,7 @@ const char *LLAssetType::lookup(LLAssetType::EType asset_type)
}
// static
LLAssetType::EType LLAssetType::lookup( const char* name )
LLAssetType::EType LLAssetType::lookup(const char* name)
{
return lookup(ll_safe_string(name));
}
@@ -186,7 +186,7 @@ const char *LLAssetType::lookupHumanReadable(LLAssetType::EType asset_type)
}
// static
LLAssetType::EType LLAssetType::lookupHumanReadable( const char* name )
LLAssetType::EType LLAssetType::lookupHumanReadable(const char* name)
{
return lookupHumanReadable(ll_safe_string(name));
}
@@ -208,12 +208,9 @@ LLAssetType::EType LLAssetType::lookupHumanReadable(const std::string& readable_
return AT_NONE;
}
//NOTE: LLAssetType::lookupDragAndDropType & LLAssetType::generateDescriptionFor moved to newview/llviewerassettype.h
// static
bool LLAssetType::lookupCanLink(EType asset_type)
{
//Check that enabling all these other types as linkable doesn't break things.
const LLAssetDictionary *dict = LLAssetDictionary::getInstance();
const AssetEntry *entry = dict->lookup(asset_type);
if (entry)
@@ -221,9 +218,6 @@ bool LLAssetType::lookupCanLink(EType asset_type)
return entry->mCanLink;
}
return false;
/*return (asset_type == AT_CLOTHING || asset_type == AT_OBJECT || asset_type == AT_CATEGORY ||
asset_type == AT_BODYPART || asset_type == AT_GESTURE);*/
}
// static
@@ -268,4 +262,3 @@ bool LLAssetType::lookupIsAssetIDKnowable(EType asset_type)
}
return false;
}

View File

@@ -35,7 +35,7 @@
#include <boost/shared_ptr.hpp>
#include "llerror.h"
#include "lltypeinfolookup.h"
#include "llstl.h"
namespace LLInitParam
{
@@ -212,14 +212,6 @@ namespace LLInitParam
public:
struct CompareTypeID
{
bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
{
return lhs->before(*rhs);
}
};
typedef std::vector<std::pair<std::string, bool> > name_stack_t;
typedef std::pair<name_stack_t::iterator, name_stack_t::iterator> name_stack_range_t;
typedef std::vector<std::string> possible_values_t;
@@ -228,9 +220,9 @@ namespace LLInitParam
typedef bool (*parser_write_func_t)(Parser& parser, const void*, name_stack_t&);
typedef boost::function<void (name_stack_t&, S32, S32, const possible_values_t*)> parser_inspect_func_t;
typedef LLTypeInfoLookup<parser_read_func_t> parser_read_func_map_t;
typedef LLTypeInfoLookup<parser_write_func_t> parser_write_func_map_t;
typedef LLTypeInfoLookup<parser_inspect_func_t> parser_inspect_func_map_t;
typedef std::map<const std::type_info*, parser_read_func_t> parser_read_func_map_t;
typedef std::map<const std::type_info*, parser_write_func_t> parser_write_func_map_t;
typedef std::map<const std::type_info*, parser_inspect_func_t> parser_inspect_func_map_t;
Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map)
: mParseSilently(false),

View File

@@ -174,6 +174,7 @@ public:
F64 averageCount = curr.count + prevCount * (1.0 - timeInCurrent);
return averageCount;
}
// call each time the key wants use
State noteAction(const T& id, S32 weight = 1)
{

View File

@@ -73,6 +73,15 @@ const S32 LSL_PRIM_TEXGEN = 22;
const S32 LSL_PRIM_POINT_LIGHT = 23;
const S32 LSL_PRIM_CAST_SHADOWS = 24;
const S32 LSL_PRIM_GLOW = 25;
const S32 LSL_PRIM_TEXT = 26;
const S32 LSL_PRIM_NAME = 27;
const S32 LSL_PRIM_DESC = 28;
const S32 LSL_PRIM_ROT_LOCAL = 29;
const S32 LSL_PRIM_PHYSICS_SHAPE_TYPE = 30;
const S32 LSL_PRIM_OMEGA = 32;
const S32 LSL_PRIM_POS_LOCAL = 33;
const S32 LSL_PRIM_LINK_TARGET = 34;
const S32 LSL_PRIM_SLICE = 35;
const S32 LSL_PRIM_TYPE_BOX = 0;
const S32 LSL_PRIM_TYPE_CYLINDER= 1;
@@ -132,6 +141,15 @@ const S32 LSL_PRIM_SCULPT_TYPE_MASK = 7;
const S32 LSL_PRIM_SCULPT_FLAG_INVERT = 64;
const S32 LSL_PRIM_SCULPT_FLAG_MIRROR = 128;
const S32 LSL_PRIM_PHYSICS_SHAPE_PRIM = 0;
const S32 LSL_PRIM_PHYSICS_SHAPE_NONE = 1;
const S32 LSL_PRIM_PHYSICS_SHAPE_CONVEX = 2;
const S32 LSL_DENSITY = 1;
const S32 LSL_FRICTION = 2;
const S32 LSL_RESTITUTION = 4;
const S32 LSL_GRAVITY_MULTIPLIER = 8;
const S32 LSL_ALL_SIDES = -1;
const S32 LSL_LINK_ROOT = 1;
const S32 LSL_LINK_FIRST_CHILD = 2;
@@ -189,6 +207,13 @@ const S32 OBJECT_RUNNING_SCRIPT_COUNT = 9;
const S32 OBJECT_TOTAL_SCRIPT_COUNT = 10;
const S32 OBJECT_SCRIPT_MEMORY = 11;
const S32 OBJECT_SCRIPT_TIME = 12;
const S32 OBJECT_PRIM_EQUIVALENCE = 13;
const S32 OBJECT_SERVER_COST = 14;
const S32 OBJECT_STREAMING_COST = 15;
const S32 OBJECT_PHYSICS_COST = 16;
// llTextBox() magic token string - yes it's a hack.
char const* const TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!";
// changed() event flags
const U32 CHANGED_NONE = 0x0;
@@ -216,4 +241,156 @@ const U32 LSL_STATUS_INTERNAL_ERROR = 1999;
// Start per-function errors below, starting at 2000:
const U32 LSL_STATUS_WHITELIST_FAILED = 2001;
// Memory profiling support
const S32 LSL_PROFILE_SCRIPT_NONE = 0;
const S32 LSL_PROFILE_SCRIPT_MEMORY = 1;
// HTTP responses contents type
const S32 LSL_CONTENT_TYPE_TEXT = 0;
const S32 LSL_CONTENT_TYPE_HTML = 1;
// Ray casting
const S32 LSL_RCERR_UNKNOWN = -1;
const S32 LSL_RCERR_SIM_PERF_LOW = -2;
const S32 LSL_RCERR_CAST_TIME_EXCEEDED = -3;
const S32 LSL_RC_REJECT_TYPES = 0;
const S32 LSL_RC_DETECT_PHANTOM = 1;
const S32 LSL_RC_DATA_FLAGS = 2;
const S32 LSL_RC_MAX_HITS = 3;
const S32 LSL_RC_REJECT_AGENTS = 1;
const S32 LSL_RC_REJECT_PHYSICAL = 2;
const S32 LSL_RC_REJECT_NONPHYSICAL = 4;
const S32 LSL_RC_REJECT_LAND = 8;
const S32 LSL_RC_GET_NORMAL = 1;
const S32 LSL_RC_GET_ROOT_KEY = 2;
const S32 LSL_RC_GET_LINK_NUM = 4;
// Estate management
const S32 LSL_ESTATE_ACCESS_ALLOWED_AGENT_ADD = 4;
const S32 LSL_ESTATE_ACCESS_ALLOWED_AGENT_REMOVE = 8;
const S32 LSL_ESTATE_ACCESS_ALLOWED_GROUP_ADD = 16;
const S32 LSL_ESTATE_ACCESS_ALLOWED_GROUP_REMOVE = 32;
const S32 LSL_ESTATE_ACCESS_BANNED_AGENT_ADD = 64;
const S32 LSL_ESTATE_ACCESS_BANNED_AGENT_REMOVE = 128;
// Key Frame Motion:
const S32 LSL_KFM_COMMAND = 0;
const S32 LSL_KFM_MODE = 1;
const S32 LSL_KFM_DATA = 2;
const S32 LSL_KFM_FORWARD = 0;
const S32 LSL_KFM_LOOP = 1;
const S32 LSL_KFM_PING_PONG = 2;
const S32 LSL_KFM_REVERSE = 3;
const S32 LSL_KFM_ROTATION = 1;
const S32 LSL_KFM_TRANSLATION = 2;
const S32 LSL_KFM_CMD_PLAY = 0;
const S32 LSL_KFM_CMD_STOP = 1;
const S32 LSL_KFM_CMD_PAUSE = 2;
// Second Life Server/12 12.04.30.255166 constants for llGetAgentList
const S32 AGENT_LIST_PARCEL = 1;
const S32 AGENT_LIST_PARCEL_OWNER = 2;
const S32 AGENT_LIST_REGION = 4;
// --- SL Constants ABOVE this line ---
// --- OpenSim / Aurora-Sim constants Below ---
// OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs)
// Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs)
const S32 CHANGED_ANIMATION = 16384;
const S32 PARCEL_DETAILS_CLAIMDATE = 10; // used by OpenSim osSetParcelDetails
const S32 STATS_TIME_DILATION = 0;
const S32 STATS_SIM_FPS = 1;
const S32 STATS_PHYSICS_FPS = 2;
const S32 STATS_AGENT_UPDATES = 3;
const S32 STATS_ROOT_AGENTS = 4;
const S32 STATS_CHILD_AGENTS = 5;
const S32 STATS_TOTAL_PRIMS = 6;
const S32 STATS_ACTIVE_PRIMS = 7;
const S32 STATS_FRAME_MS = 8;
const S32 STATS_NET_MS = 9;
const S32 STATS_PHYSICS_MS = 10;
const S32 STATS_IMAGE_MS = 11;
const S32 STATS_OTHER_MS = 12;
const S32 STATS_IN_PACKETS_PER_SECOND = 13;
const S32 STATS_OUT_PACKETS_PER_SECOND = 14;
const S32 STATS_UNACKED_BYTES = 15;
const S32 STATS_AGENT_MS = 16;
const S32 STATS_PENDING_DOWNLOADS = 17;
const S32 STATS_PENDING_UPLOADS = 18;
const S32 STATS_ACTIVE_SCRIPTS = 19;
const S32 STATS_SCRIPT_LPS = 20;
// osNPC
const S32 OS_NPC_FLY = 0;
const S32 OS_NPC_NO_FLY = 1;
const S32 OS_NPC_LAND_AT_TARGET = 2;
const S32 OS_NPC_SIT_NOW = 0;
const U32 OS_NPC_CREATOR_OWNED = 0x1;
const U32 OS_NPC_NOT_OWNED = 0x2;
const U32 OS_NPC_SENSE_AS_AGENT = 0x4;
const U32 OS_NPC_RUNNING = 4;
// Lightshare / Windlight
const S32 WL_WATER_COLOR = 0;
const S32 WL_WATER_FOG_DENSITY_EXPONENT = 1;
const S32 WL_UNDERWATER_FOG_MODIFIER = 2;
const S32 WL_REFLECTION_WAVELET_SCALE = 3;
const S32 WL_FRESNEL_SCALE = 4;
const S32 WL_FRESNEL_OFFSET = 5;
const S32 WL_REFRACT_SCALE_ABOVE = 6;
const S32 WL_REFRACT_SCALE_BELOW = 7;
const S32 WL_BLUR_MULTIPLIER = 8;
const S32 WL_BIG_WAVE_DIRECTION = 9;
const S32 WL_LITTLE_WAVE_DIRECTION = 10;
const S32 WL_NORMAL_MAP_TEXTURE = 11;
const S32 WL_HORIZON = 12;
const S32 WL_HAZE_HORIZON = 13;
const S32 WL_BLUE_DENSITY = 14;
const S32 WL_HAZE_DENSITY = 15;
const S32 WL_DENSITY_MULTIPLIER = 16;
const S32 WL_DISTANCE_MULTIPLIER = 17;
const S32 WL_MAX_ALTITUDE = 18;
const S32 WL_SUN_MOON_COLOR = 19;
const S32 WL_AMBIENT = 20;
const S32 WL_EAST_ANGLE = 21;
const S32 WL_SUN_GLOW_FOCUS = 22;
const S32 WL_SUN_GLOW_SIZE = 23;
const S32 WL_SCENE_GAMMA = 24;
const S32 WL_STAR_BRIGHTNESS = 25;
const S32 WL_CLOUD_COLOR = 26;
const S32 WL_CLOUD_XY_DENSITY = 27;
const S32 WL_CLOUD_COVERAGE = 28;
const S32 WL_CLOUD_SCALE = 29;
const S32 WL_CLOUD_DETAIL_XY_DENSITY = 30;
const S32 WL_CLOUD_SCROLL_X = 31;
const S32 WL_CLOUD_SCROLL_Y = 32;
const S32 WL_CLOUD_SCROLL_Y_LOCK = 33;
const S32 WL_CLOUD_SCROLL_X_LOCK = 34;
const S32 WL_DRAW_CLASSIC_CLOUDS = 35;
const S32 WL_SUN_MOON_POSITION = 36;
// Aurora-Sim Constants (\Aurora\AuroraDotNetEngine\APIs\AA_Constants.cs) -->
const S32 BOT_FOLLOW_FLAG_NONE = 0;
const S32 BOT_FOLLOW_FLAG_INDEFINITELY = 1;
const S32 BOT_FOLLOW_WALK = 0;
const S32 BOT_FOLLOW_RUN = 1;
const S32 BOT_FOLLOW_FLY = 2;
const S32 BOT_FOLLOW_TELEPORT = 3;
const S32 BOT_FOLLOW_WAIT = 4;
const S32 BOT_FOLLOW_TRIGGER_HERE_EVENT = 1;
const S32 BOT_FOLLOW_FLAG_FORCEDIRECTPATH = 4;
// string constants from Aurora-Sim
char const* const ENABLE_GRAVITY = "enable_gravity";
char const* const GRAVITY_FORCE_X = "gravity_force_x";
char const* const GRAVITY_FORCE_Y = "gravity_force_y";
char const* const GRAVITY_FORCE_Z = "gravity_force_z";
char const* const ADD_GRAVITY_POINT = "add_gravity_point";
char const* const ADD_GRAVITY_FORCE = "add_gravity_force";
char const* const START_TIME_REVERSAL_SAVING = "start_time_reversal_saving";
char const* const STOP_TIME_REVERSAL_SAVING = "stop_time_reversal_saving";
char const* const START_TIME_REVERSAL = "start_time_reversal";
char const* const STOP_TIME_REVERSAL = "stop_time_reversal";
#endif

View File

@@ -376,24 +376,24 @@ private:
// uses the MSVC compiler intrinsics __cpuid() and __rdtsc().
// Delays for the specified amount of milliseconds
static void _Delay(unsigned int ms)
static void _Delay(unsigned int ms)
{
LARGE_INTEGER freq, c1, c2;
__int64 x;
LARGE_INTEGER freq, c1, c2;
__int64 x;
// Get High-Res Timer frequency
// Get High-Res Timer frequency
if (!QueryPerformanceFrequency(&freq))
return;
// Convert ms to High-Res Timer value
x = freq.QuadPart/1000*ms;
// Get first snapshot of High-Res Timer value
// Get first snapshot of High-Res Timer value
QueryPerformanceCounter(&c1);
do
{
// Get second snapshot
QueryPerformanceCounter(&c2);
// Get second snapshot
QueryPerformanceCounter(&c2);
}while(c2.QuadPart-c1.QuadPart < x);
// Loop while (second-first < x)
}

View File

@@ -52,5 +52,4 @@ private:
LLProcessorInfoImpl* mImpl;
};
#endif
#endif // LLPROCESSOR_H

View File

@@ -39,7 +39,7 @@
#include <vector>
#include <set>
#include <deque>
#include "stdtypes.h" // llcommon/stdtypes.h, needed for S32 and U32.
#include <typeinfo>
// Use to compare the first element only of a pair
// e.g. typedef std::set<std::pair<int, Data*>, compare_pair<int, Data*> > some_pair_set_t;
@@ -477,4 +477,54 @@ llbind2nd(const _Operation& __oper, const _Tp& __x)
return llbinder2nd<_Operation>(__oper, _Arg2_type(__x));
}
/**
* Compare std::type_info* pointers a la std::less. We break this out as a
* separate function for use in two different std::less specializations.
*/
inline
bool before(const std::type_info* lhs, const std::type_info* rhs)
{
#if LL_LINUX && defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
// If we're building on Linux with gcc, and it's either gcc 3.x or
// 4.{0,1,2,3}, then we have to use a workaround. Note that we use gcc on
// Mac too, and some people build with gcc on Windows (cygwin or mingw).
// On Linux, different load modules may produce different type_info*
// pointers for the same type. Have to compare name strings to get good
// results.
return strcmp(lhs->name(), rhs->name()) < 0;
#else // not Linux, or gcc 4.4+
// Just use before(), as we normally would
return lhs->before(*rhs);
#endif
}
/**
* Specialize std::less<std::type_info*> to use std::type_info::before().
* See MAINT-1175. It is NEVER a good idea to directly compare std::type_info*
* because, on Linux, you might get different std::type_info* pointers for the
* same type (from different load modules)!
*/
namespace std
{
template <>
struct less<const std::type_info*>:
public std::binary_function<const std::type_info*, const std::type_info*, bool>
{
bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
{
return before(lhs, rhs);
}
};
template <>
struct less<std::type_info*>:
public std::binary_function<std::type_info*, std::type_info*, bool>
{
bool operator()(std::type_info* lhs, std::type_info* rhs) const
{
return before(lhs, rhs);
}
};
} // std
#endif // LL_LLSTL_H

View File

@@ -12,9 +12,49 @@
#if ! defined(LL_LLTYPEINFOLOOKUP_H)
#define LL_LLTYPEINFOLOOKUP_H
#include "llsortedvector.h"
#include <boost/unordered_map.hpp>
#include <boost/functional/hash.hpp>
#include <boost/optional.hpp>
#include <functional> // std::binary_function
#include <typeinfo>
/**
* The following helper classes are based on the Boost.Unordered documentation:
* http://www.boost.org/doc/libs/1_45_0/doc/html/unordered/hash_equality.html
*/
/**
* Compute hash for a string passed as const char*
*/
struct const_char_star_hash: public std::unary_function<const char*, std::size_t>
{
std::size_t operator()(const char* str) const
{
std::size_t seed = 0;
for ( ; *str; ++str)
{
boost::hash_combine(seed, *str);
}
return seed;
}
};
/**
* Compute equality for strings passed as const char*
*
* I (nat) suspect that this is where the default behavior breaks for the
* const char* values returned from std::type_info::name(). If you compare the
* two const char* pointer values, as a naive, unspecialized implementation
* will surely do, they'll compare unequal.
*/
struct const_char_star_equal: public std::binary_function<const char*, const char*, bool>
{
bool operator()(const char* lhs, const char* rhs) const
{
return strcmp(lhs, rhs) == 0;
}
};
/**
* LLTypeInfoLookup is specifically designed for use cases for which you might
* consider std::map<std::type_info*, VALUE>. We have several such data
@@ -23,88 +63,55 @@
* different load modules will produce different std::type_info*.
* LLTypeInfoLookup contains a workaround to address this issue.
*
* Specifically, when we don't find the passed std::type_info*,
* LLTypeInfoLookup performs a linear search over registered entries to
* compare name() strings. Presuming that this succeeds, we cache the new
* (previously unrecognized) std::type_info* to speed future lookups.
*
* This worst-case fallback search (linear search with string comparison)
* should only happen the first time we look up a given type from a particular
* load module other than the one from which we initially registered types.
* (However, a lookup which wouldn't succeed anyway will always have
* worst-case performance.) This class is probably best used with less than a
* few dozen different types.
* The API deliberately diverges from std::map in several respects:
* * It avoids iterators, not only begin()/end() but also as return values
* from insert() and find(). This bypasses transform_iterator overhead.
* * Since we literally use compile-time types as keys, the essential insert()
* and find() methods accept the key type as a @em template parameter,
* accepting and returning value_type as a normal runtime value. This is to
* permit future optimization (e.g. compile-time type hashing) without
* changing the API.
*/
template <typename VALUE>
class LLTypeInfoLookup
{
// Use this for our underlying implementation: lookup by
// std::type_info::name() string. This is one of the rare cases in which I
// dare use const char* directly, rather than std::string, because I'm
// sure that every value returned by std::type_info::name() is static.
// HOWEVER, specify our own hash + equality functors: naively comparing
// distinct const char* values won't work.
typedef boost::unordered_map<const char*, VALUE,
const_char_star_hash, const_char_star_equal> impl_map_type;
public:
typedef LLTypeInfoLookup<VALUE> self;
typedef LLSortedVector<const std::type_info*, VALUE> vector_type;
typedef typename vector_type::key_type key_type;
typedef typename vector_type::mapped_type mapped_type;
typedef typename vector_type::value_type value_type;
typedef typename vector_type::iterator iterator;
typedef typename vector_type::const_iterator const_iterator;
typedef VALUE value_type;
LLTypeInfoLookup() {}
iterator begin() { return mVector.begin(); }
iterator end() { return mVector.end(); }
const_iterator begin() const { return mVector.begin(); }
const_iterator end() const { return mVector.end(); }
bool empty() const { return mVector.empty(); }
std::size_t size() const { return mVector.size(); }
bool empty() const { return mMap.empty(); }
std::size_t size() const { return mMap.size(); }
std::pair<iterator, bool> insert(const std::type_info* key, const VALUE& value)
template <typename KEY>
bool insert(const value_type& value)
{
return insert(value_type(key, value));
// Obtain and store the std::type_info::name() string as the key.
// Return just the bool from std::map::insert()'s return pair.
return mMap.insert(typename impl_map_type::value_type(typeid(KEY).name(), value)).second;
}
std::pair<iterator, bool> insert(const value_type& pair)
template <typename KEY>
boost::optional<value_type> find() const
{
return mVector.insert(pair);
}
// const find() forwards to non-const find(): this can alter mVector!
const_iterator find(const std::type_info* key) const
{
return const_cast<self*>(this)->find(key);
}
// non-const find() caches previously-unknown type_info* to speed future
// lookups.
iterator find(const std::type_info* key)
{
iterator found = mVector.find(key);
if (found != mVector.end())
{
// If LLSortedVector::find() found, great, we're done.
return found;
}
// Here we didn't find the passed type_info*. On Linux, though, even
// for the same type, typeid(sametype) produces a different type_info*
// when used in different load modules. So the fact that we didn't
// find the type_info* we seek doesn't mean this type isn't
// registered. Scan for matching name() string.
for (typename vector_type::iterator ti(mVector.begin()), tend(mVector.end());
ti != tend; ++ti)
{
if (std::string(ti->first->name()) == key->name())
{
// This unrecognized 'key' is for the same type as ti->first.
// To speed future lookups, insert a new entry that lets us
// look up ti->second using this same 'key'.
return insert(key, ti->second).first;
}
}
// We simply have never seen a type with this type_info* from any load
// module.
return mVector.end();
// Use the std::type_info::name() string as the key.
typename impl_map_type::const_iterator found = mMap.find(typeid(KEY).name());
if (found == mMap.end())
return boost::optional<value_type>();
return found->second;
}
private:
vector_type mVector;
impl_map_type mMap;
};
#endif /* ! defined(LL_LLTYPEINFOLOOKUP_H) */

View File

@@ -33,9 +33,9 @@
// We can't use WIN32_LEAN_AND_MEAN here, needs lots of includes.
#if LL_WINDOWS
# undef WIN32_LEAN_AND_MEAN
# include <winsock2.h>
# include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#endif
#include "lldefs.h"
@@ -452,7 +452,8 @@ static void get_random_bytes(void *buf, int nbytes)
return;
}
#if LL_WINDOWS
#if LL_WINDOWS
typedef struct _ASTAT_
{
ADAPTER_STATUS adapt;
@@ -460,58 +461,44 @@ typedef struct _ASTAT_
}ASTAT, * PASTAT;
// static
S32 LLUUID::getNodeID(unsigned char *node_id)
S32 LLUUID::getNodeID(unsigned char *node_id)
{
ASTAT Adapter;
NCB Ncb;
UCHAR uRetCode;
LANA_ENUM lenum;
int i;
int retval = 0;
ASTAT Adapter;
NCB Ncb;
UCHAR uRetCode;
LANA_ENUM lenum;
int i;
int retval = 0;
memset( &Ncb, 0, sizeof(Ncb) );
Ncb.ncb_command = NCBENUM;
Ncb.ncb_buffer = (UCHAR *)&lenum;
Ncb.ncb_length = sizeof(lenum);
uRetCode = Netbios( &Ncb );
// printf( "The NCBENUM return code is: 0x%x \n", uRetCode );
memset( &Ncb, 0, sizeof(Ncb) );
Ncb.ncb_command = NCBENUM;
Ncb.ncb_buffer = (UCHAR *)&lenum;
Ncb.ncb_length = sizeof(lenum);
uRetCode = Netbios( &Ncb );
for(i=0; i < lenum.length ;i++)
{
memset( &Ncb, 0, sizeof(Ncb) );
Ncb.ncb_command = NCBRESET;
Ncb.ncb_lana_num = lenum.lana[i];
for(i=0; i < lenum.length ;i++)
{
memset( &Ncb, 0, sizeof(Ncb) );
Ncb.ncb_command = NCBRESET;
Ncb.ncb_lana_num = lenum.lana[i];
uRetCode = Netbios( &Ncb );
// printf( "The NCBRESET on LANA %d return code is: 0x%x \n",
// lenum.lana[i], uRetCode );
uRetCode = Netbios( &Ncb );
memset( &Ncb, 0, sizeof (Ncb) );
Ncb.ncb_command = NCBASTAT;
Ncb.ncb_lana_num = lenum.lana[i];
memset( &Ncb, 0, sizeof (Ncb) );
Ncb.ncb_command = NCBASTAT;
Ncb.ncb_lana_num = lenum.lana[i];
strcpy( (char *)Ncb.ncb_callname, "* " ); /* Flawfinder: ignore */
Ncb.ncb_buffer = (unsigned char *)&Adapter;
Ncb.ncb_length = sizeof(Adapter);
strcpy( (char *)Ncb.ncb_callname, "* " ); /* Flawfinder: ignore */
Ncb.ncb_buffer = (unsigned char *)&Adapter;
Ncb.ncb_length = sizeof(Adapter);
uRetCode = Netbios( &Ncb );
// printf( "The NCBASTAT on LANA %d return code is: 0x%x \n",
// lenum.lana[i], uRetCode );
if ( uRetCode == 0 )
{
// printf( "The Ethernet Number on LANA %d is: %02x%02x%02x%02x%02x%02x\n",
// lenum.lana[i],
// Adapter.adapt.adapter_address[0],
// Adapter.adapt.adapter_address[1],
// Adapter.adapt.adapter_address[2],
// Adapter.adapt.adapter_address[3],
// Adapter.adapt.adapter_address[4],
// Adapter.adapt.adapter_address[5] );
uRetCode = Netbios( &Ncb );
if ( uRetCode == 0 )
{
memcpy(node_id,Adapter.adapt.adapter_address,6); /* Flawfinder: ignore */
retval = 1;
}
}
}
}
return retval;
}

View File

@@ -132,6 +132,7 @@ public:
U8 mData[UUID_BYTES];
};
typedef std::vector<LLUUID> uuid_vec_t;
// Construct

View File

@@ -239,7 +239,7 @@ public:
std::string getHoverText() const { return mHoverText; };
std::string getHoverLink() const { return mHoverLink; };
std::string getMediaName() const { return mMediaName; };
const std::string& getMediaName() const { return mMediaName; };
std::string getMediaDescription() const { return mMediaDescription; };
// Crash the plugin. If you use this outside of a testbed, you will be punished.

View File

@@ -571,7 +571,7 @@ void LLPostProcess::setSelectedEffectValue(std::string const & setting, LLSD& va
S32 elem=0;
if(sscanf(setting.c_str(),"%255[^[][%d]", buf, &elem) == 2)
{
mSelectedEffectInfo[(char*)buf][elem] = value;
mSelectedEffectInfo[std::string(buf)][elem] = value;
}
else
{

View File

@@ -478,7 +478,7 @@ public:
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect); // Display mToolTipMsg if no child handles it.
/*virtual*/ const std::string& getName() const;
/*virtual*/ const std::string& getName() const;
/*virtual*/ void onMouseCaptureLost();
/*virtual*/ BOOL hasMouseCapture();
/*virtual*/ BOOL isView(); // Hack to support LLFocusMgr

View File

@@ -254,6 +254,10 @@ extern "C" { int yyerror(const char *fmt, ...); }
"OBJECT_TOTAL_SCRIPT_COUNT" { count(); yylval.ival = OBJECT_TOTAL_SCRIPT_COUNT; return(INTEGER_CONSTANT); }
"OBJECT_SCRIPT_MEMORY" { count(); yylval.ival = OBJECT_SCRIPT_MEMORY; return(INTEGER_CONSTANT); }
"OBJECT_SCRIPT_TIME" { count(); yylval.ival = OBJECT_SCRIPT_TIME; return(INTEGER_CONSTANT); }
"OBJECT_PRIM_EQUIVALENCE" { count(); yylval.ival = OBJECT_PRIM_EQUIVALENCE; return(INTEGER_CONSTANT); }
"OBJECT_SERVER_COST" { count(); yylval.ival = OBJECT_SERVER_COST; return(INTEGER_CONSTANT); }
"OBJECT_STREAMING_COST" { count(); yylval.ival = OBJECT_STREAMING_COST; return(INTEGER_CONSTANT); }
"OBJECT_PHYSICS_COST" { count(); yylval.ival = OBJECT_SCRIPT_TIME; return(INTEGER_CONSTANT); }
"TYPE_INTEGER" { count(); yylval.ival = LST_INTEGER; return(INTEGER_CONSTANT); }
"TYPE_FLOAT" { count(); yylval.ival = LST_FLOATINGPOINT; return(INTEGER_CONSTANT); }
@@ -347,7 +351,6 @@ extern "C" { int yyerror(const char *fmt, ...); }
"REMOTE_DATA_REQUEST" { count(); yylval.ival = LSL_REMOTE_DATA_REQUEST; return(INTEGER_CONSTANT); }
"REMOTE_DATA_REPLY" { count(); yylval.ival = LSL_REMOTE_DATA_REPLY; return(INTEGER_CONSTANT); }
"PSYS_PART_FLAGS" { count(); yylval.ival = LLPS_PART_FLAGS; return(INTEGER_CONSTANT); }
"PSYS_PART_START_COLOR" { count(); yylval.ival = LLPS_PART_START_COLOR; return (INTEGER_CONSTANT); }
"PSYS_PART_START_ALPHA" { count(); yylval.ival = LLPS_PART_START_ALPHA; return (INTEGER_CONSTANT); }
@@ -357,7 +360,6 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PSYS_PART_END_SCALE" { count(); yylval.ival = LLPS_PART_END_SCALE; return (INTEGER_CONSTANT); }
"PSYS_PART_MAX_AGE" { count(); yylval.ival = LLPS_PART_MAX_AGE; return (INTEGER_CONSTANT); }
"PSYS_PART_WIND_MASK" { count(); yylval.ival = LLPartData::LL_PART_WIND_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_INTERP_COLOR_MASK" { count(); yylval.ival = LLPartData::LL_PART_INTERP_COLOR_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_INTERP_SCALE_MASK" { count(); yylval.ival = LLPartData::LL_PART_INTERP_SCALE_MASK; return(INTEGER_CONSTANT); }
@@ -368,7 +370,6 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PSYS_PART_EMISSIVE_MASK" { count(); yylval.ival = LLPartData::LL_PART_EMISSIVE_MASK; return(INTEGER_CONSTANT); }
"PSYS_PART_TARGET_LINEAR_MASK" { count(); yylval.ival = LLPartData::LL_PART_TARGET_LINEAR_MASK; return(INTEGER_CONSTANT); }
"PSYS_SRC_MAX_AGE" { count(); yylval.ival = LLPS_SRC_MAX_AGE; return(INTEGER_CONSTANT); }
"PSYS_SRC_PATTERN" { count(); yylval.ival = LLPS_SRC_PATTERN; return(INTEGER_CONSTANT); }
"PSYS_SRC_INNERANGLE" { count(); yylval.ival = LLPS_SRC_INNERANGLE; return(INTEGER_CONSTANT); }
@@ -393,7 +394,6 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PSYS_SRC_PATTERN_ANGLE_CONE" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE; return(INTEGER_CONSTANT); }
"PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY" { count(); yylval.ival = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_NONE" { count(); yylval.ival = VEHICLE_TYPE_NONE; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_SLED" { count(); yylval.ival = VEHICLE_TYPE_SLED; return(INTEGER_CONSTANT); }
"VEHICLE_TYPE_CAR" { count(); yylval.ival = VEHICLE_TYPE_CAR; return(INTEGER_CONSTANT); }
@@ -408,8 +408,6 @@ extern "C" { int yyerror(const char *fmt, ...); }
"VEHICLE_ANGULAR_MOTOR_DIRECTION" { count(); yylval.ival = VEHICLE_ANGULAR_MOTOR_DIRECTION; return(INTEGER_CONSTANT); }
"VEHICLE_LINEAR_MOTOR_OFFSET" { count(); yylval.ival = VEHICLE_LINEAR_MOTOR_OFFSET; return(INTEGER_CONSTANT); }
"VEHICLE_HOVER_HEIGHT" { count(); yylval.ival = VEHICLE_HOVER_HEIGHT; return(INTEGER_CONSTANT); }
"VEHICLE_HOVER_EFFICIENCY" { count(); yylval.ival = VEHICLE_HOVER_EFFICIENCY; return(INTEGER_CONSTANT); }
"VEHICLE_HOVER_TIMESCALE" { count(); yylval.ival = VEHICLE_HOVER_TIMESCALE; return(INTEGER_CONSTANT); }
@@ -444,8 +442,6 @@ extern "C" { int yyerror(const char *fmt, ...); }
"VEHICLE_FLAG_MOUSELOOK_BANK" { count(); yylval.ival = VEHICLE_FLAG_MOUSELOOK_BANK; return(INTEGER_CONSTANT); }
"VEHICLE_FLAG_CAMERA_DECOUPLED" { count(); yylval.ival = VEHICLE_FLAG_CAMERA_DECOUPLED; return(INTEGER_CONSTANT); }
"PRIM_TYPE" { count(); yylval.ival = LSL_PRIM_TYPE; return(INTEGER_CONSTANT); }
"PRIM_MATERIAL" { count(); yylval.ival = LSL_PRIM_MATERIAL; return(INTEGER_CONSTANT); }
"PRIM_PHYSICS" { count(); yylval.ival = LSL_PRIM_PHYSICS; return(INTEGER_CONSTANT); }
@@ -463,6 +459,15 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PRIM_FULLBRIGHT" { count(); yylval.ival = LSL_PRIM_FULLBRIGHT; return(INTEGER_CONSTANT); }
"PRIM_TEXGEN" { count(); yylval.ival = LSL_PRIM_TEXGEN; return(INTEGER_CONSTANT); }
"PRIM_GLOW" { count(); yylval.ival = LSL_PRIM_GLOW; return(INTEGER_CONSTANT); }
"PRIM_TEXT" { count(); yylval.ival = LSL_PRIM_TEXT; return(INTEGER_CONSTANT); }
"PRIM_NAME" { count(); yylval.ival = LSL_PRIM_NAME; return(INTEGER_CONSTANT); }
"PRIM_DESC" { count(); yylval.ival = LSL_PRIM_DESC; return(INTEGER_CONSTANT); }
"PRIM_ROT_LOCAL" { count(); yylval.ival = LSL_PRIM_ROT_LOCAL; return(INTEGER_CONSTANT); }
"PRIM_PHYSICS_SHAPE_TYPE" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_TYPE; return(INTEGER_CONSTANT); }
"PRIM_OMEGA" { count(); yylval.ival = LSL_PRIM_OMEGA; return(INTEGER_CONSTANT); }
"PRIM_POS_LOCAL" { count(); yylval.ival = LSL_PRIM_POS_LOCAL; return(INTEGER_CONSTANT); }
"PRIM_LINK_TARGET" { count(); yylval.ival = LSL_PRIM_LINK_TARGET; return(INTEGER_CONSTANT); }
"PRIM_SLICE" { count(); yylval.ival = LSL_PRIM_SLICE; return(INTEGER_CONSTANT); }
"PRIM_TYPE_BOX" { count(); yylval.ival = LSL_PRIM_TYPE_BOX; return(INTEGER_CONSTANT); }
"PRIM_TYPE_CYLINDER" { count(); yylval.ival = LSL_PRIM_TYPE_CYLINDER; return(INTEGER_CONSTANT); }
@@ -522,6 +527,15 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PRIM_SCULPT_FLAG_MIRROR" { count(); yylval.ival = LSL_PRIM_SCULPT_FLAG_MIRROR; return(INTEGER_CONSTANT); }
"PRIM_SCULPT_FLAG_INVERT" { count(); yylval.ival = LSL_PRIM_SCULPT_FLAG_INVERT; return(INTEGER_CONSTANT); }
"PRIM_PHYSICS_SHAPE_PRIM" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_PRIM; return(INTEGER_CONSTANT); }
"PRIM_PHYSICS_SHAPE_NONE" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_NONE; return(INTEGER_CONSTANT); }
"PRIM_PHYSICS_SHAPE_CONVEX" { count(); yylval.ival = LSL_PRIM_PHYSICS_SHAPE_CONVEX; return(INTEGER_CONSTANT); }
"DENSITY" { count(); yylval.ival = LSL_DENSITY; return(INTEGER_CONSTANT); }
"FRICTION" { count(); yylval.ival = LSL_FRICTION; return(INTEGER_CONSTANT); }
"RESTITUTION" { count(); yylval.ival = LSL_RESTITUTION; return(INTEGER_CONSTANT); }
"GRAVITY_MULTIPLIER" { count(); yylval.ival = LSL_GRAVITY_MULTIPLIER; return(INTEGER_CONSTANT); }
"MASK_BASE" { count(); yylval.ival = 0; return(INTEGER_CONSTANT); }
"MASK_OWNER" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
"MASK_GROUP" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); }
@@ -595,6 +609,7 @@ extern "C" { int yyerror(const char *fmt, ...); }
"HTTP_BODY_MAXLENGTH" { count(); yylval.ival = HTTP_BODY_MAXLENGTH; return(INTEGER_CONSTANT); }
"HTTP_BODY_TRUNCATED" { count(); yylval.ival = HTTP_BODY_TRUNCATED; return(INTEGER_CONSTANT); }
"HTTP_VERIFY_CERT" { count(); yylval.ival = HTTP_VERIFY_CERT; return(INTEGER_CONSTANT); }
"HTTP_VERBOSE_THROTTLE" { count(); yylval.ival = HTTP_VERBOSE_THROTTLE; return(INTEGER_CONSTANT); }
"PARCEL_COUNT_TOTAL" { count(); yylval.ival = OC_TOTAL; return(INTEGER_CONSTANT); }
"PARCEL_COUNT_OWNER" { count(); yylval.ival = OC_OWNER; return(INTEGER_CONSTANT); }
@@ -675,6 +690,54 @@ extern "C" { int yyerror(const char *fmt, ...); }
"STATUS_INTERNAL_ERROR" { count(); yylval.ival = LSL_STATUS_INTERNAL_ERROR; return(INTEGER_CONSTANT); }
"STATUS_WHITELIST_FAILED" { count(); yylval.ival = LSL_STATUS_WHITELIST_FAILED; return(INTEGER_CONSTANT); }
"PROFILE_SCRIPT_NONE" { count(); yylval.ival = LSL_PROFILE_SCRIPT_NONE; return(INTEGER_CONSTANT); }
"PROFILE_SCRIPT_MEMORY" { count(); yylval.ival = LSL_PROFILE_SCRIPT_MEMORY; return(INTEGER_CONSTANT); }
"CONTENT_TYPE_TEXT" { count(); yylval.ival = LSL_CONTENT_TYPE_TEXT; return(INTEGER_CONSTANT); }
"CONTENT_TYPE_HTML" { count(); yylval.ival = LSL_CONTENT_TYPE_HTML; return(INTEGER_CONSTANT); }
"RCERR_UNKNOWN" { count(); yylval.ival = LSL_RCERR_UNKNOWN; return(INTEGER_CONSTANT); }
"RCERR_SIM_PERF_LOW" { count(); yylval.ival = LSL_RCERR_SIM_PERF_LOW; return(INTEGER_CONSTANT); }
"RCERR_CAST_TIME_EXCEEDED" { count(); yylval.ival = LSL_RCERR_CAST_TIME_EXCEEDED; return(INTEGER_CONSTANT); }
"RC_REJECT_TYPES" { count(); yylval.ival = LSL_RC_REJECT_TYPES; return(INTEGER_CONSTANT); }
"RC_DETECT_PHANTOM" { count(); yylval.ival = LSL_RC_DETECT_PHANTOM; return(INTEGER_CONSTANT); }
"RC_DATA_FLAGS" { count(); yylval.ival = LSL_RC_DATA_FLAGS; return(INTEGER_CONSTANT); }
"RC_MAX_HITS" { count(); yylval.ival = LSL_RC_MAX_HITS; return(INTEGER_CONSTANT); }
"RC_REJECT_AGENTS" { count(); yylval.ival = LSL_RC_REJECT_AGENTS; return(INTEGER_CONSTANT); }
"RC_REJECT_PHYSICAL" { count(); yylval.ival = LSL_RC_REJECT_PHYSICAL; return(INTEGER_CONSTANT); }
"RC_REJECT_NONPHYSICAL" { count(); yylval.ival = LSL_RC_REJECT_NONPHYSICAL; return(INTEGER_CONSTANT); }
"RC_REJECT_LAND" { count(); yylval.ival = LSL_RC_REJECT_LAND; return(INTEGER_CONSTANT); }
"RC_GET_NORMAL" { count(); yylval.ival = LSL_RC_GET_NORMAL; return(INTEGER_CONSTANT); }
"RC_GET_ROOT_KEY" { count(); yylval.ival = LSL_RC_GET_ROOT_KEY; return(INTEGER_CONSTANT); }
"RC_GET_LINK_NUM" { count(); yylval.ival = LSL_RC_GET_LINK_NUM; return(INTEGER_CONSTANT); }
"ESTATE_ACCESS_ALLOWED_AGENT_ADD" { count(); yylval.ival = LSL_ESTATE_ACCESS_ALLOWED_AGENT_ADD; return(INTEGER_CONSTANT); }
"ESTATE_ACCESS_ALLOWED_AGENT_REMOVE" { count(); yylval.ival = LSL_ESTATE_ACCESS_ALLOWED_AGENT_REMOVE; return(INTEGER_CONSTANT); }
"ESTATE_ACCESS_ALLOWED_GROUP_ADD" { count(); yylval.ival = LSL_ESTATE_ACCESS_ALLOWED_GROUP_ADD; return(INTEGER_CONSTANT); }
"ESTATE_ACCESS_ALLOWED_GROUP_REMOVE" { count(); yylval.ival = LSL_ESTATE_ACCESS_ALLOWED_GROUP_REMOVE; return(INTEGER_CONSTANT); }
"ESTATE_ACCESS_BANNED_AGENT_ADD" { count(); yylval.ival = LSL_ESTATE_ACCESS_BANNED_AGENT_ADD; return(INTEGER_CONSTANT); }
"ESTATE_ACCESS_BANNED_AGENT_REMOVE" { count(); yylval.ival = LSL_ESTATE_ACCESS_BANNED_AGENT_REMOVE; return(INTEGER_CONSTANT); }
"KFM_COMMAND" { count(); yylval.ival = LSL_KFM_COMMAND; return(INTEGER_CONSTANT); }
"KFM_MODE" { count(); yylval.ival = LSL_KFM_MODE; return(INTEGER_CONSTANT); }
"KFM_DATA" { count(); yylval.ival = LSL_KFM_DATA; return(INTEGER_CONSTANT); }
"KFM_FORWARD" { count(); yylval.ival = LSL_KFM_FORWARD; return(INTEGER_CONSTANT); }
"KFM_LOOP" { count(); yylval.ival = LSL_KFM_LOOP; return(INTEGER_CONSTANT); }
"KFM_PING_PONG" { count(); yylval.ival = LSL_KFM_PING_PONG; return(INTEGER_CONSTANT); }
"KFM_REVERSE" { count(); yylval.ival = LSL_KFM_REVERSE; return(INTEGER_CONSTANT); }
"KFM_ROTATION" { count(); yylval.ival = LSL_KFM_ROTATION; return(INTEGER_CONSTANT); }
"KFM_TRANSLATION" { count(); yylval.ival = LSL_KFM_TRANSLATION; return(INTEGER_CONSTANT); }
"KFM_CMD_PLAY" { count(); yylval.ival = LSL_KFM_CMD_PLAY; return(INTEGER_CONSTANT); }
"KFM_CMD_STOP" { count(); yylval.ival = LSL_KFM_CMD_STOP; return(INTEGER_CONSTANT); }
"KFM_CMD_PAUSE" { count(); yylval.ival = LSL_KFM_CMD_PAUSE; return(INTEGER_CONSTANT); }
"AGENT_LIST_PARCEL" { count(); yylval.ival = 1; return(INTEGER_CONSTANT); }
"AGENT_LIST_PARCEL_OWNER" { count(); yylval.ival = 2; return(INTEGER_CONSTANT); }
"AGENT_LIST_REGION" { count(); yylval.ival = 4; return(INTEGER_CONSTANT); }
{L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }
{N}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }

View File

@@ -40,7 +40,8 @@ enum LLScriptHTTPRequestParameterKey
HTTP_METHOD,
HTTP_MIMETYPE,
HTTP_BODY_MAXLENGTH,
HTTP_VERIFY_CERT
HTTP_VERIFY_CERT,
HTTP_VERBOSE_THROTTLE
};
enum LLScriptHTTPResponseMetadataKey

View File

@@ -469,102 +469,109 @@ void LLScriptLibrary::init()
addFunction(10.f, 0.f, dummy_func, "llGetEnv", "s", "s");
addFunction(10.f, 0.f, dummy_func, "llRegionSayTo", NULL, "kis");
// energy, sleep, dummy_func, name, return type, parameters, help text, gods-only
// Adding missing (more recent) LSL functions.
addFunction(10.f, 0.f, dummy_func, "llCastRay", "l", "vvl");
addFunction(10.f, 0.f, dummy_func, "llGetSPMaxMemory", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llGetUsedMemory", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llGodLikeRezObject", NULL, "kv");
addFunction(10.f, 0.f, dummy_func, "llScriptProfiler", NULL, "i");
addFunction(10.f, 0.f, dummy_func, "llSetInventoryPermMask", NULL, "sii");
addFunction(10.f, 0.f, dummy_func, "llSetObjectPermMask", NULL, "ii");
// Even more recent
// Server v11.08.10.238207 new functions:
addFunction(10.f, 0.f, dummy_func, "llSetMemoryLimit", "i", "i");
addFunction(10.f, 0.f, dummy_func, "llGetMemoryLimit", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llSetLinkMedia", "i", "iil");
addFunction(10.f, 0.f, dummy_func, "llGetLinkMedia", "l", "iil");
addFunction(10.f, 0.f, dummy_func, "llClearLinkMedia", "i", "ii");
addFunction(10.f, 0.f, dummy_func, "llSetLinkCamera", NULL, "ivv");
addFunction(10.f, 0.f, dummy_func, "llSetContentType", NULL, "ki");
addFunction(10.f, 0.f, dummy_func, "llLinkSitTarget", NULL, "ivr");
addFunction(10.f, 0.f, dummy_func, "llLinkSitTarget", NULL, "ivq");
addFunction(10.f, 0.f, dummy_func, "llAvatarOnLinkSitTarget", "k", "i");
addFunction(10.f, 0.f, dummy_func, "llGetMassMKS", "f", NULL);
addFunction(10.f, 0.f, dummy_func, "llGetMemoryLimit", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llGetParcelMusicURL", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "llGetPhysicsMaterial", "l", NULL);
addFunction(10.f, 0.f, dummy_func, "llManageEstateAccess", "i", "ik");
addFunction(10.f, 0.f, dummy_func, "llSetAngularVelocity", NULL, "vi");
addFunction(10.f, 0.f, dummy_func, "llSetKeyframedMotion", NULL, "ll");
addFunction(10.f, 0.f, dummy_func, "llSetPhysicsMaterial", NULL, "iffff");
addFunction(10.f, 0.f, dummy_func, "llSetRegionPos", "i", "v");
addFunction(10.f, 0.f, dummy_func, "llSetVelocity", NULL, "vi");
// Server v11.09.09.240509 new functions:
addFunction(10.f, 0.f, dummy_func, "llCastRay", "l", "vvl");
addFunction(10.f, 0.f, dummy_func, "llGetMassMKS", "f", NULL);
addFunction(10.f, 0.f, dummy_func, "llSetPhysicsMaterial", NULL, "iffff");
addFunction(10.f, 0.f, dummy_func, "llGetPhysicsMaterial", "l", NULL);
// Server v11.10.18.243270 new functions:
addFunction(10.f, 0.f, dummy_func, "llManageEstateAccess", "i", "ik");
// Server RC magnum v11.10.31.244254 new function:
addFunction(10.f, 0.f, dummy_func, "llSetKeyframedMotion", NULL, "ll");
// Server RC Le Tigre v11.10.30.245889 new function:
addFunction(10.f, 0.f, dummy_func, "llTransferLindenDollars", "k", "ki");
// llGenerateKey officially implemented now added
addFunction(10.f, 0.f, dummy_func, "llGenerateKey", "k", NULL);
//Pathfinder functions. Current state: alpha, thus subject to change.
//This and the preceding line are to be removed in future revisions of this file.
// Server new function 2011-12-13:
addFunction(10.f, 0.f, dummy_func, "llGetParcelMusicURL", "s", NULL);
// Missing script functions as of 2011-12-13
addFunction(10.f, 0.f, dummy_func, "llScriptProfiler", NULL, "i");
addFunction(10.f, 0.f, dummy_func, "llGetSPMaxMemory", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llGetUsedMemory", "i", NULL);
addFunction(10.f, 0.f, dummy_func, "llSetAngularVelocity", NULL, "vi");
// Server 12.01.24.248357 new functions
addFunction(0.f, 0.f, dummy_func, "llSetRegionPos", "i", "v");
// Server 12.04.13.253827 new function
addFunction(0.f, 0.f, dummy_func, "llGetAgentList", "l", "il");
// Server RC Magnum 12.05.25.258071 new functions:
addFunction(0.f, 0.f, dummy_func, "llAttachToAvatarTemp", NULL, "i");
addFunction(0.f, 0.f, dummy_func, "llTeleportAgent", NULL, "ksvv");
addFunction(0.f, 0.f, dummy_func, "llTeleportAgentGlobalCoords", NULL, "kvvv");
// Pathfinding functions
addFunction(10.f, 0.f, dummy_func, "llCreateCharacter", NULL, "l");
addFunction(10.f, 0.f, dummy_func, "llDeleteCharacter", NULL, NULL);
addFunction(10.f, 0.f, dummy_func, "llEvade", NULL, "kl");
addFunction(10.f, 0.f, dummy_func, "llExecCharacterCmd", NULL, "il");
addFunction(10.f, 0.f, dummy_func, "llGetClosestNavPoint", "l", "vl");
addFunction(10.f, 0.f, dummy_func, "llFleeFrom", NULL, "vfl");
addFunction(10.f, 0.f, dummy_func, "llGetClosestNavPoint", NULL, "vl");
addFunction(10.f, 0.f, dummy_func, "llGetStaticPath", NULL, "vvfl");
addFunction(10.f, 0.f, dummy_func, "llNavigateTo", NULL, "vl");
addFunction(10.f, 0.f, dummy_func, "llPatrolPoints", NULL, "ll");
addFunction(10.f, 0.f, dummy_func, "llPursue", NULL, "kl");
addFunction(10.f, 0.f, dummy_func, "llUpdateCharacter", NULL, "l");
addFunction(10.f, 0.f, dummy_func, "llWanderWithin", NULL, "vfl");
addFunction(10.f, 0.f, dummy_func, "llWanderWithin", NULL, "vvl");
// REGARDING OSSL FUNCTIONS
// SL-LSL Functions to be added above this line
// ---------------------------------------------
// NOTE bytecode placement no longer applies, viewers do not compile scripts anymore (confirmed with LL, also noted by Phoenix/Firestorm team.)
// REGARDING NON SL-LSL FUNCTIONS (OSSL, aaFunctions, botFunctions)
// These additions should be posted underneath the llFunctions
// These functions pertain to OpenSimulator and are in no part applicable to SecondLife by Linden Labs
// The Current State of these functions are in flux and development is ongoing. Not all the functions are presently
// documented and therefore the description may be incomplete and require further attention.
// OpenSimulator is written in C# and not CPP therefore some values for example "double = float" etc. are different.
// OSSL corrections and syntax additions added + set in same order as found in OSSL_stub.cs of OpenSim Source (Updated PM October-21-2010
// based on OpenSimulator Ver. 0.7.x DEV/Master Git # a7acb650d400a280a7b9edabd304376dff9c81af - a7acb65-r/14142
// fully documented and therefore the description may be incomplete and require further attention.
// OpenSim & Aurora-Sim are written in C# and not CPP therefore some values for example "double = float" etc. are different.
//
// OSSL corrections and syntax additions added + set initially in same order as found in IOSSL_Api.cs of Aurora-Sim & OpenSim Source
// updates added @ end of each subsection for update timeline maint.
// Updates by WhiteStar Magic
// It should be noted though, that the order of OSSL functions is not important for correct functionality.
addFunction(10.f, 0.f, dummy_func, "osSetRegionWaterHeight", NULL, "f");
addFunction(10.f, 0.f, dummy_func, "osSetRegionSunSettings", NULL, "iif");
addFunction(10.f, 0.f, dummy_func, "osSetEstateSunSettings", NULL, "if");
addFunction(10.f, 0.f, dummy_func, "osGetCurrentSunHour", "f", NULL);
addFunction(10.f, 0.f, dummy_func, "osSunGetParam","f", "s"); // Deprecated. Use osGetSunParam instead
addFunction(10.f, 0.f, dummy_func, "osSunSetParam", "sf", NULL); // Deprecated. Use osSetSunParam instead
addFunction(10.f, 0.f, dummy_func, "osWindActiveModelPluginName", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osParcelJoin", NULL, "vv");
addFunction(10.f, 0.f, dummy_func, "osParcelSubdivide", NULL, "vv");
addFunction(10.f, 0.f, dummy_func, "osParcelSetDetails", NULL, "vv"); // Deprecated. Use osSetParcelDetails instead.
// addFunction(10.f, 0.f, dummy_func, "osWindParamSet", NULL, "ssf"); // This function was renamed before it was implemented. Leaving this in for now.
// addFunction(10.f, 0.f, dummy_func, "osWindParamGet", "f", "ss"); // This function was renamed before it was implemented. Leaving this in for now.
addFunction(10.f, 0.f, dummy_func, "osList2Double", "f", "li");
//
// OSSL Functions COMMON to OpenSim & Aurora-Sim
addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURL", NULL, "ksssi");
addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureData", NULL, "ksssi");
addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURLBlend", NULL, "ksssii");
addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureDataBlend", NULL, "ksssii");
addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureURLBlendFace", NULL, "ksssfiiii");
addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureData", NULL, "ksssi");
addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureDataBlend", NULL, "ksssii");
addFunction(10.f, 0.f, dummy_func, "osSetDynamicTextureDataBlendFace", NULL, "ksssfiiii");
addFunction(10.f, 0.f, dummy_func, "osTerrainGetHeight", "f", "ii"); // Deprecated. Use osGetTerrainHeight instead
addFunction(10.f, 0.f, dummy_func, "osTerrainSetHeight", NULL, "iif"); // Deprecated. Use osSetTerrainHeight instead
addFunction(10.f, 0.f, dummy_func, "osGetTerrainHeight", "f", "ii");
addFunction(10.f, 0.f, dummy_func, "osSetTerrainHeight", NULL, "iif");
addFunction(10.f, 0.f, dummy_func, "osTerrainFlush", NULL, NULL);
addFunction(10.f, 0.f, dummy_func, "osRegionRestart", "i", "f");
addFunction(10.f, 0.f, dummy_func, "osRegionNotice",NULL, "s");
addFunction(10.f, 0.f, dummy_func, "osConsoleCommand", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "osSetParcelMediaURL", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "osSetParcelSIPAddress", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "osSetPrimFloatOnWater", NULL, "i");
addFunction(10.f, 0.f, dummy_func, "osTeleportAgent", NULL, "ksvv");
addFunction(10.f, 0.f, dummy_func, "osSetParcelSIPAddress", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "osGetAgentIP", "s", "k");
addFunction(10.f, 0.f, dummy_func, "osGetAgents", "l", NULL);
addFunction(10.f, 0.f, dummy_func, "osTeleportAgent", NULL, "ksvv"); // Polymorphic
addFunction(10.f, 0.f, dummy_func, "osTeleportOwner", NULL, "svv"); // Polymorphic
addFunction(10.f, 0.f, dummy_func, "osAvatarPlayAnimation", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osAvatarStopAnimation", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osForceAttachToAvatar", NULL, "i"); // May.03.2012
addFunction(10.f, 0.f, dummy_func, "osForceDetachFromAvatar", NULL, NULL); // May.03.2012
addFunction(10.f, 0.f, dummy_func, "osMovePen", NULL, "sii");
addFunction(10.f, 0.f, dummy_func, "osDrawLine", NULL, "siiii");
addFunction(10.f, 0.f, dummy_func, "osDrawLine", NULL, "siiii"); // Polymorphic
addFunction(10.f, 0.f, dummy_func, "osDrawText", NULL, "ss");
addFunction(10.f, 0.f, dummy_func, "osDrawEllipse", NULL, "sii");
addFunction(10.f, 0.f, dummy_func, "osDrawRectangle", NULL, "sii");
@@ -574,14 +581,27 @@ void LLScriptLibrary::init()
addFunction(10.f, 0.f, dummy_func, "osSetFontSize", NULL, "si");
addFunction(10.f, 0.f, dummy_func, "osSetFontName", NULL, "ss");
addFunction(10.f, 0.f, dummy_func, "osSetPenSize", NULL, "si");
addFunction(10.f, 0.f, dummy_func, "osSetPenColor", NULL, "ss");
addFunction(10.f, 0.f, dummy_func, "osSetPenCap", NULL, "sss");
addFunction(10.f, 0.f, dummy_func, "osSetPenColour", NULL, "ss"); // Deprecated. Use osSetPenColor instead
addFunction(10.f, 0.f, dummy_func, "osDrawImage", NULL, "siis");
addFunction(10.f, 0.f, dummy_func, "osGetDrawStringSize", "v", "sssi");
addFunction(10.f, 0.f, dummy_func, "osSetStateEvents", NULL, "i");
addFunction(10.f, 0.f, dummy_func, "osList2Double", "f", "li");
addFunction(10.f, 0.f, dummy_func, "osSetRegionWaterHeight", NULL, "f");
addFunction(10.f, 0.f, dummy_func, "osSetRegionSunSettings", NULL, "iif");
addFunction(10.f, 0.f, dummy_func, "osSetEstateSunSettings", NULL, "if");
addFunction(10.f, 0.f, dummy_func, "osGetCurrentSunHour", "f", NULL);
addFunction(10.f, 0.f, dummy_func, "osGetSunParam","f", "s");
addFunction(10.f, 0.f, dummy_func, "osSetSunParam", "sf", NULL);
addFunction(10.f, 0.f, dummy_func, "osWindActiveModelPluginName", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osSetWindParam", NULL, "ssf");
addFunction(10.f, 0.f, dummy_func, "osGetWindParam", "f", "ss");
addFunction(10.f, 0.f, dummy_func, "osParcelJoin", NULL, "vv");
addFunction(10.f, 0.f, dummy_func, "osParcelSubdivide", NULL, "vv");
addFunction(10.f, 0.f, dummy_func, "osSetParcelDetails", NULL, "vl");
addFunction(10.f, 0.f, dummy_func, "osGetScriptEngineName", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osGetSimulatorVersion", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osParseJSON", "s", "s");
addFunction(10.f, 0.f, dummy_func, "osParseJSONNew", "s", "s"); // mar.5.2012
addFunction(10.f, 0.f, dummy_func, "osMessageObject", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osMakeNotecard", NULL, "sl");
addFunction(10.f, 0.f, dummy_func, "osGetNotecardLine", "s", "si");
@@ -592,16 +612,16 @@ void LLScriptLibrary::init()
addFunction(10.f, 0.f, dummy_func, "osGetGridNick", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osGetGridName", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osGetGridLoginURI", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osGetGridHomeURI","s",NULL); // mar.5.2012
addFunction(10.f, 0.f, dummy_func, "osGetGridGatekeeperURI", "s", "NULL"); //mar.11.2012
addFunction(10.f, 0.f, dummy_func, "osGetGridCustom","s","k"); // mar.5.2012
addFunction(10.f, 0.f, dummy_func, "osFormatString", "s", "sl");
addFunction(10.f, 0.f, dummy_func, "osMatchString", "l", "ssi");
addFunction(10.f, 0.f, dummy_func, "osReplaceString", "s", "sssi"); // mar.5.2012
addFunction(10.f, 0.f, dummy_func, "osLoadedCreationDate", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osLoadedCreationTime", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osLoadedCreationID", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osGetLinkPrimitiveParams", "l", "il");
addFunction(10.f, 0.f, dummy_func, "osNpcCreate", "k", "ssvk");
addFunction(10.f, 0.f, dummy_func, "osNpcMoveTo", NULL, "kv");
addFunction(10.f, 0.f, dummy_func, "osNpcSay", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcRemove", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "osGetMapTexture", "k", NULL);
addFunction(10.f, 0.f, dummy_func, "osGetRegionMapTexture", "k", "s");
addFunction(10.f, 0.f, dummy_func, "osGetRegionStats", "l", NULL);
@@ -613,52 +633,105 @@ void LLScriptLibrary::init()
addFunction(10.f, 0.f, dummy_func, "osGetPrimitiveParams", "l", "kl");
addFunction(10.f, 0.f, dummy_func, "osSetPrimitiveParams", NULL, "kl");
addFunction(10.f, 0.f, dummy_func, "osSetProjectionParams", NULL, "kikfff");
addFunction(10.f, 0.f, dummy_func, "osUnixTimeToTimestamp", "s", "i");
addFunction(10.f, 0.f, dummy_func, "osSetPenColor", NULL, "ss");
addFunction(10.f, 0.f, dummy_func, "osGetSunParam","f", "s");
addFunction(10.f, 0.f, dummy_func, "osSetSunParam", NULL, "sf");
addFunction(10.f, 0.f, dummy_func, "osSetParcelDetails", NULL, "vl");
addFunction(10.f, 0.f, dummy_func, "osGetTerrainHeight", "f", "ii");
addFunction(10.f, 0.f, dummy_func, "osSetTerrainHeight", NULL, "iif");
addFunction(10.f, 0.f, dummy_func, "osGetAvatarList", "l", NULL);
addFunction(10.f, 0.f, dummy_func, "osTeleportOwner", NULL, "svv");
addFunction(10.f, 0.f, dummy_func, "osGetWindParam","f", "ss");
addFunction(10.f, 0.f, dummy_func, "osSetWindParam", NULL, "ssf");
addFunction(10.f, 0.f, dummy_func, "osUnixTimeToTimestamp", "s", "i");
addFunction(10.f, 0.f, dummy_func, "osGetInventoryDesc", "s", "s"); //mar.17.2012
addFunction(10.f, 0.f, dummy_func, "osInviteToGroup", "i", "k"); // May.03.2012
addFunction(10.f, 0.f, dummy_func, "osEjectFromGroup", "i", "k"); // May.03.2012
addFunction(10.f, 0.f, dummy_func, "osSetTerrainTexture", NULL, "ik"); // May.03.2012
addFunction(10.f, 0.f, dummy_func, "osSetTerrainTextureHeight", NULL, "iff"); // May.03.2012
// LightShare functions
//
// OSSL Functions OpenSim Unique
addFunction(10.f, 0.f, dummy_func, "osSetStateEvents", NULL, "i");
addFunction(10.f, 0.f, dummy_func, "osIsNpc","i","k"); // mar.5.2012
addFunction(10.f, 0.f, dummy_func, "osNpcCreate", "k", "ssvk");
addFunction(10.f, 0.f, dummy_func, "osNpcSaveAppearance", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcLoadAppearance", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcGetPos","k","k");
addFunction(10.f, 0.f, dummy_func, "osNpcMoveTo", NULL, "kv");
addFunction(10.f, 0.f, dummy_func, "osNpcMoveToTarget", NULL, "kvi");
addFunction(10.f, 0.f, dummy_func, "osNpcGetOwner","k","k"); // mar.5.2012
addFunction(10.f, 0.f, dummy_func, "osNpcGetRot", "r", "k");
addFunction(10.f, 0.f, dummy_func, "osNpcSetRot", NULL, "kr");
addFunction(10.f, 0.f, dummy_func, "osNpcStopMoveToTarget", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "osNpcSay", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcSay", NULL, "kis"); // May.03.2012
addFunction(10.f, 0.f, dummy_func, "osNpcSit", NULL, "kki");
addFunction(10.f, 0.f, dummy_func, "osNpcStand", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "osNpcRemove", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "osNpcPlayAnimation",NULL,"ks"); // mar.5.2012
addFunction(10.f, 0.f, dummy_func, "osNpcStopAnimation",NULL,"ks"); // mar.5.2012
addFunction(10.f, 0.f, dummy_func, "osOwnerSaveAppearance", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "osAgentSaveAppearance", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcShout", NULL, "kis"); // May.03.2012
addFunction(10.f, 0.f, dummy_func, "osNpcWhisper", NULL, "kis"); // May.03.2012
//
// OSSL Functions Aurora-Sim Unique
addFunction(10.f, 0.f, dummy_func, "osReturnObject", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "osReturnObjects", NULL, "f");
addFunction(10.f, 0.f, dummy_func, "osShutDown", NULL, NULL);
addFunction(10.f, 0.f, dummy_func, "osAddAgentToGroup", NULL, "kss");
addFunction(10.f, 0.f, dummy_func, "osRezObject", NULL, "svvriiiii");
//
// LightShare functions (Careminster Variant)
addFunction(10.f, 0.f, dummy_func, "cmSetWindlightScene", "i", "l");
addFunction(10.f, 0.f, dummy_func, "cmSetWindlightSceneTargeted", "i", "lk");
addFunction(10.f, 0.f, dummy_func, "cmGetWindlightScene", "l", "l");
// LightShare functions - alternate versions
// don't ask me why they renamed 'em, but we need to include both versions -- MC
// LightShare functions - alternate versions (os & aa variant)
addFunction(10.f, 0.f, dummy_func, "lsSetWindlightScene", "i", "l");
addFunction(10.f, 0.f, dummy_func, "lsSetWindlightSceneTargeted", "i", "lk");
addFunction(10.f, 0.f, dummy_func, "lsGetWindlightScene", "l", "l");
// New OSSL functions 08-10-2011
addFunction(10.f, 0.f, dummy_func, "osNpcSaveAppearance", "k", "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcLoadAppearance", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcMoveToTarget", NULL, "kvi");
addFunction(10.f, 0.f, dummy_func, "osOwnerSaveAppearance", "k", "s");
// More new stuffs
addFunction(10.f, 0.f, dummy_func, "osNpcGetRot", "r", "k");
addFunction(10.f, 0.f, dummy_func, "osNpcSetRot", NULL, "kr");
addFunction(10.f, 0.f, dummy_func, "osAgentSaveAppearance", "k", "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcGetPos", "v", "k");
addFunction(10.f, 0.f, dummy_func, "osNpcStopMoveToTarget", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "osIsNpc", "i", "k");
addFunction(10.f, 0.f, dummy_func, "osNpcGetOwner", "k", "k");
addFunction(10.f, 0.f, dummy_func, "osGetGridCustom", "s", "s");
addFunction(10.f, 0.f, dummy_func, "osGetGridHomeURI", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "osNpcPlayAnimation", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osNpcSit", NULL, "kki");
addFunction(10.f, 0.f, dummy_func, "osNpcStand", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "osNpcStopAnimation", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "osSetRot", NULL, "kq");
//
// aaFunctions Aurora-Sim ONLY
addFunction(10.f, 0.f, dummy_func, "aaSetCloudDensity", NULL, "f");
addFunction(10.f, 0.f, dummy_func, "aaUpdateDatabase", NULL, "sss");
addFunction(10.f, 0.f, dummy_func, "aaQueryDatabase", "l", "ss");
addFunction(10.f, 0.f, dummy_func, "aaDeserializeXMLValues", "l", "s");
addFunction(10.f, 0.f, dummy_func, "aaDeserializeXMLKeys","l", "s");
addFunction(10.f, 0.f, dummy_func, "aaSetConeOfSilence", NULL, "f");
addFunction(10.f, 0.f, dummy_func, "aaSerializeXML", "s", "ll");
addFunction(10.f, 0.f, dummy_func, "aaGetTeam", "s", "k");
addFunction(10.f, 0.f, dummy_func, "aaGetHealth", "f", "k");
addFunction(10.f, 0.f, dummy_func, "aaJoinCombat", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "aaLeaveCombat", NULL, "k");
addFunction(10.f, 0.f, dummy_func, "aaJoinCombatTeam", NULL, "ks");
addFunction(10.f, 0.f, dummy_func, "aaRequestCombatPermission", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "aaThawAvatar", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "aaFreezeAvatar", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "aaGetTeamMembers", "l", "s");
addFunction(10.f, 0.f, dummy_func, "aaGetLastOwner", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "aaSayDistance", NULL, "ifs");
addFunction(10.f, 0.f, dummy_func, "aaSayTo", NULL, "ss");
addFunction(10.f, 0.f, dummy_func, "aaGetWalkDisabled ", "i", "s");
addFunction(10.f, 0.f, dummy_func, "aaSetWalkDisabled", NULL, "si");
addFunction(10.f, 0.f, dummy_func, "aaGetFlyDisabled ", "i", "s");
addFunction(10.f, 0.f, dummy_func, "aaSetFlyDisabled", NULL, "sf");
addFunction(10.f, 0.f, dummy_func, "aaAvatarFullName2Key ", "s", "s");
addFunction(10.f, 0.f, dummy_func, "aaRaiseError", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "aaGetText ", "s", NULL);
addFunction(10.f, 0.f, dummy_func, "aaGetTextColor ", "r", NULL);
addFunction(10.f, 0.f, dummy_func, "aaSetEnv ", NULL, "sl");
addFunction(10.f, 0.f, dummy_func, "aaGetIsInfiniteRegion", "i", NULL);
// botFunctions Aurora-Sim ONLY
addFunction(10.f, 0.f, dummy_func, "botGetWaitingTime", "v", "i");
addFunction(10.f, 0.f, dummy_func, "botSetMap", NULL, "slii");
addFunction(10.f, 0.f, dummy_func, "botCreateBot", "s", "sssv");
addFunction(10.f, 0.f, dummy_func, "botRemoveBot", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "botPauseMovement", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "botResumeMovement", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "botFollowAvatar", NULL, "ssff");
addFunction(10.f, 0.f, dummy_func, "botStopFollowAvatar", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "botSendChatMessage", NULL, "ssii");
addFunction(10.f, 0.f, dummy_func, "botSendIM",NULL,"sss");
addFunction(10.f, 0.f, dummy_func, "botSetShouldFly", NULL, "si");
addFunction(10.f, 0.f, dummy_func, "botSitObject", NULL, "ssv");
addFunction(10.f, 0.f, dummy_func, "botStandUp", NULL, "s");
addFunction(10.f, 0.f, dummy_func, "botTouchObject", NULL, "ss");
addFunction(10.f, 0.f, dummy_func, "botAddTag", NULL, "ss");
addFunction(10.f, 0.f, dummy_func, "botGetBotsWithTag", "l", "s");
addFunction(10.f, 0.f, dummy_func, "botRemoveBotsWithTag", NULL, "s");
// energy, sleep, dummy_func, name, return type, parameters
}
LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), const char *name, const char *ret_type, const char *args, BOOL god_only)

View File

@@ -872,7 +872,6 @@ set(viewer_HEADER_FILES
llpanellandmedia.h
llpanellandobjects.h
llpanellandoptions.h
llpanelLCD.h
llpanellogin.h
llpanelmaininventory.h
llpanelmorph.h

View File

@@ -14,7 +14,7 @@ key Key type. Use NULL_KEY to test for empty keys
vector Vector type of 3 floats. Used to represent 3D motion, Euler angles, and color.:Access components by .x, .y. or .z
rotation Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y., .z, or .w
list List of various data types
quaternion Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y, .z, or .w
quaternion Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y, .z, or .w
# events
[word 0, .3, .5]
@@ -52,7 +52,7 @@ changed changed( integer change ):Triggered various event change the task:(tes
remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY)
http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests
http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL
transaction_result transaction_result(key id, integer success, string data):Triggered when task receives asynchronous data.
transaction_result transaction_result(key id, integer success, string data):Triggered when task receives asynchronous data.
path_update path_update(integer type, list reserved):Triggered when the state of a pathfinder character changes. Note; "list reserved" is not currently used
# integer constants
@@ -70,9 +70,10 @@ STATUS_BLOCK_GRAB_OBJECT This status flag keeps the object from being moved by g
STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner
STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set
STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects
AGENT Passed in llSensor library function to look for other Agents; DEPRECATED: Use AGENT_BY_LEGACY_NAME
AGENT_BY_USERNAME Passed in llSensor library function to look for other Agents by username
AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name
AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name
AGENT_BY_USERNAME Passed in llSensor library function to look for other Agents by username
ACTIVE Passed in llSensor library function to look for moving objects
PASSIVE Passed in llSensor library function to look for objects that aren't moving
SCRIPTED Passed in llSensor library function to look for scripted objects
@@ -171,10 +172,10 @@ OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity
OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned
OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key
OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key
OBJECT_RUNNING_SCRIPT_COUNT Used with llGetObjectDetails to get an object's velocity.
OBJECT_TOTAL_SCRIPT_COUNT Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned.
OBJECT_SCRIPT_MEMORY Used with llGetObjectDetails to get an object's group's key.
OBJECT_SCRIPT_TIME Used with llGetObjectDetails to get an object's creator's key.
OBJECT_RUNNING_SCRIPT_COUNT Gets the number of running scripts attached to the object or agent
OBJECT_TOTAL_SCRIPT_COUNT Gets the number of scripts, both running and stopped, attached to the object or agent.
OBJECT_SCRIPT_MEMORY Gets the total amount of script memory allocated to the object or agent, in bytes.
OBJECT_SCRIPT_TIME Gets the total amount of average script CPU time used by the object or agent, in seconds.
OBJECT_PRIM_EQUIVALENCE Gets the prim equivalence of the object.
OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost.
OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost.
@@ -185,8 +186,8 @@ VEHICLE_TYPE_NONE Used with llSetVehicleType to turn off vehicle support
VEHICLE_TYPE_SLED Used with llSetVehicleType to make a simple vehicle that bumps along the ground, and likes to move along its local x-axis
VEHICLE_TYPE_CAR Used with llSetVehicleType to make a vehicle that bounces along the ground but needs the motors to be driven from external controls or timer events
VEHICLE_TYPE_BOAT Used with llSetVehicleType to make a vehicle that hovers over water with lots of friction and some angular deflection
VEHICLE_TYPE_AIRPLANE Used with llSetVehicleType to make a vehicle that uses linear deflection for lift, and banking to turn, but doesn't hover
VEHICLE_TYPE_BALLOON Used with llSetVehicleType to make a vehicle that uses hover, and friction, but doesn't use deflection
VEHICLE_TYPE_AIRPLANE Used with llSetVehicleType to make a vehicle that uses linear deflection for lift, and banking to turn, but doesn't hover
VEHICLE_TYPE_BALLOON Used with llSetVehicleType to make a vehicle that uses hover, and friction, but doesn't use deflection
VEHICLE_REFERENCE_FRAME Rotation of vehicle axes relative to local frame
@@ -289,14 +290,14 @@ ATTACH_LLLEG Passed to llAttachToAvatar to attach task to left lower leg
ATTACH_BELLY Passed to llAttachToAvatar to attach task to belly
ATTACH_LEFT_PEC Passed to llAttachToAvatar to attach task to left pectoral
ATTACH_RIGHT_PEC Passed to llAttachToAvatar to attach task to right pectoral
ATTACH_HUD_BOTTOM Passed to llAttachToAvatar to attach task to bottom hud area
ATTACH_HUD_BOTTOM_LEFT Passed to llAttachToAvatar to attach task to bottom left hud area
ATTACH_HUD_BOTTOM_RIGHT Passed to llAttachToAvatar to attach task to bottom right hud area
ATTACH_HUD_CENTER_1 Passed to llAttachToAvatar to attach task to center 1 hud area
ATTACH_HUD_CENTER_2 Passed to llAttachToAvatar to attach task to center 2 hud area
ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area
ATTACH_HUD_TOP_CENTER Passed to llAttachToAvatar to attach task to top center hud area
ATTACH_HUD_TOP_LEFT Passed to llAttachToAvatar to attach task to top left hud area
ATTACH_HUD_CENTER_1 Passed to llAttachToAvatar to attach task to center 1 hud area
ATTACH_HUD_BOTTOM_LEFT Passed to llAttachToAvatar to attach task to bottom left hud area
ATTACH_HUD_BOTTOM Passed to llAttachToAvatar to attach task to bottom hud area
ATTACH_HUD_BOTTOM_RIGHT Passed to llAttachToAvatar to attach task to bottom right hud area
ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area
##The following attachment points exist only as numbers thus far, but will be ready when the time comes.
#ATTACH_NECK Passed to llAttachToAvatar to attach task to neck
#ATTACH_ROOT Passed to llAttachToAvatar to attach task to avatar center/root
@@ -369,29 +370,28 @@ REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is receiv
PRIM_NAME For primitive name (from server v1.40 onwards). Followed by a string.
PRIM_DESC For primitive description (from server v1.40 onwards). Followed by a string.
PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments
PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form <start_slice, end_slice, 0>
PRIM_PHYSICS_SHAPE_TYPE For primitive physics shape type. Followed with either PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_NONE or PRIM_PHYSICS_SHAPE_CONVEX.
PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER
PRIM_PHYSICS Sets physics to TRUE or FALSE
PRIM_FLEXIBLE Followed by TRUE or FALSE, integer softness, float gravity, float friction, float wind, float tension, and vector force
PRIM_POINT_LIGHT Followed by TRUE or FALSE, vector color, float intensity, float radius, float falloff
PRIM_TEMP_ON_REZ Sets temporay on rez to TRUE or FALSE
PRIM_TEMP_ON_REZ Sets temporary on rez to TRUE or FALSE
PRIM_PHANTOM Sets phantom to TRUE or FALSE
PRIM_CAST_SHADOWS DEPRECATED. Takes 1 parameter, an integer, but has no effect when set and always returns 0 if used in llGetPrimitiveParams
PRIM_POSITION Sets primitive position to a vector position
PRIM_POS_LOCAL Sets the prim's local position
PRIM_SIZE Sets primitive size to a vector size
PRIM_ROTATION Sets primitive rotation
PRIM_ROT_LOCAL Sets the prim's local rotation
PRIM_TEXT Used to get or set the object's floating text.
PRIM_TEXTURE Followed by an integer face, key id, vector repeats, vector offsets,:and float rotation in radians
PRIM_TEXT For primitive hovertext. Followed by a string, a vector color and a float alpha
PRIM_COLOR Followed by an integer face, vector color, and float alpha
PRIM_BUMP_SHINY Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY_LOW,:PRIM_SHINY_MEDIUM, or PRIM_SHINY_HIGH,:and one of PRIM_BUMP_NONE, PRIM_BUMP_BRIGHT, PRIM_BUMP_DARK, etc
PRIM_FULLBRIGHT Followed by an integer face, and TRUE or FALSE
PRIM_TEXGEN Followed by an integer face, and one of PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR
PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying glow amount
PRIM_OMEGA Makes the object spin at the specified axis and rate
PRIM_POS_LOCAL Sets the prim's local position
PRIM_ROT_LOCAL Sets the prim's local rotation
PRIM_OMEGA Makes the object spin at the specified axis and rate
PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call
PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form <start_slice, end_slice, 0>
PROFILE_NONE Disables profiling
PROFILE_SCRIPT_MEMORY Enables memory profiling
@@ -454,9 +454,10 @@ PRIM_SCULPT_TYPE_MASK Mask used to determine stitching type
PRIM_SCULPT_FLAG_INVERT Flag to specify that the surface normals should be inverted
PRIM_SCULPT_FLAG_MIRROR Flag to specify that the prim should be reflected along X axis
PRIM_PHYSICS_SHAPE_TYPE For primitive physics shape type. Followed with either PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_NONE or PRIM_PHYSICS_SHAPE_CONVEX.
PRIM_PHYSICS_SHAPE_PRIM Use the normal prim shape for physics (this is the default for all non-mesh objects)
PRIM_PHYSICS_SHAPE_CONVEX Ignore this prim in the physics shape. This cannot be applied to the root prim.
PRIM_PHYSICS_SHAPE_NONE Use the convex hull of the prim shape for physics (this is the default for mesh objects)
PRIM_PHYSICS_SHAPE_CONVEX Ignore this prim in the physics shape. This cannot be applied to the root prim.
MASK_BASE Base permissions
MASK_OWNER Owner permissions
@@ -526,19 +527,13 @@ REGION_FLAG_BLOCK_FLY Used with llGetRegionFlags to find if a region blocks f
REGION_FLAG_ALLOW_DIRECT_TELEPORT Used with llGetRegionFlags to find if a region allows direct teleports
REGION_FLAG_RESTRICT_PUSHOBJECT Used with llGetRegionFlags to find if a region restricts llPushObject() calls
ESTATE_ACCESS_ALLOWED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's allowed residents list.
ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's allowed residents list.
ESTATE_ACCESS_ALLOWED_GROUP_ADD Used with llManageEstateAccess to add a group to this estate's allowed groups list.
ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Used with llManageEstateAccess to remove a group from this estate's allowed groups list.
ESTATE_ACCESS_BANNED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's banned residents list.
ESTATE_ACCESS_BANNED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's banned residents list.
HTTP_METHOD Used with llHTTPRequest to specify the method, "GET", "POST", "PUT", or "DELETE"
HTTP_MIMETYPE Used with llHTTPRequest to specify the MIME type, defaults to "text/plain"
HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maximum response body to return
HTTP_VERIFY_CERT Used with llHTTPRequest to specify SSL certificate verification
HTTP_BODY_TRUNCATED Used with http_response to indicate truncation point in bytes
HTTP_VERBOSE_THROTTLE Used with llHTTPRequest to shout error messages to DEBUG_CHANNEL if the outgoing request rate exceeds the server limit.
HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maximum body size for the date returned from the request. Mono scripts can request from 1byte to 16k, non-mono scripts can request from 1byte to 4k. The default is 2k.
PARCEL_COUNT_TOTAL Used with llGetParcelPrimCount to get the total number of prims on the parcel
PARCEL_COUNT_OWNER Used with llGetParcelPrimCount to get the number of prims on the parcel owned by the owner
@@ -613,7 +608,132 @@ STATUS_NOT_SUPPORTED Feature not supported
STATUS_INTERNAL_ERROR An internal error occurred
STATUS_WHITELIST_FAILED URL failed to pass whitelist
# windlight constants
RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM.
RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise.
RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results.
RC_GET_NORMAL Flag used in the RC_DATA_FLAGS mask to get hit normals in llCastRay() results.
RC_GET_ROOT_KEY Flag used in the RC_DATA_FLAGS mask to get root keys in llCastRay() results.
RC_MAX_HITS Option for llCastRay() followed with an integer specifying the maximum number of hits to return (must be <= 256).
RC_REJECT_TYPES Option for llCastRay() used to ignore specific types of objects, followed with a bitwise combination of RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL and RC_REJECT_LAND.
RC_REJECT_AGENTS Flag used in the RC_REJECT_TYPES mask to reject agents in llCastRay().
RC_REJECT_PHYSICAL Flag used in the RC_REJECT_TYPES mask to reject physical objects in llCastRay().
RC_REJECT_NONPHYSICAL Flag used in the RC_REJECT_TYPES mask to reject non-physical objects in llCastRay().
RC_REJECT_LAND Flag used in the RC_REJECT_TYPES mask to reject land in llCastRay().
RCERR_CAST_TIME_EXCEEDED Returned by llCastRay() when the raycast failed because the parcel or agent has exceeded the maximum time allowed for raycasting.
RCERR_SIM_PERF_LOW Returned by llCastRay() when the raycast failed because simulator performance is low.
RCERR_UNKNOWN Returned by llCastRay() when the raycast failed for an unspecified reason.
ESTATE_ACCESS_ALLOWED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's allowed residents list.
ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's allowed residents list.
ESTATE_ACCESS_ALLOWED_GROUP_ADD Used with llManageEstateAccess to add a group to this estate's allowed groups list.
ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Used with llManageEstateAccess to remove a group from this estate's allowed groups list.
ESTATE_ACCESS_BANNED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's banned residents list.
ESTATE_ACCESS_BANNED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's banned residents list.
DENSITY For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the density.
FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the friction.
RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution.
GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier.
KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list.
KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion.
KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion.
KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion.
KFM_CMD_SET_MODE TODO: add documentation
KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE.
KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode.
KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode.
KFM_PING_PONG Option for llSetKeyframedMotion(), used after KFM_MODE to specify the ping pong playback mode.
KFM_REVERSE Option for llSetKeyframedMotion(), used after KFM_MODE to specify the reverse playback mode.
KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination of KFM_TRANSLATION and KFM_ROTATION. If you specify one or the other, you should only include translations or rotations in your keyframe list.
KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION.
KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION.
CHARACTER_CMD_STOP TODO: add documentation
CHARACTER_CMD_JUMP TODO: add documentation
CHARACTER_DESIRED_SPEED TODO: add documentation
CHARACTER_RADIUS TODO: add documentation
CHARACTER_LENGTH TODO: add documentation
CHARACTER_ORIENTATION TODO: add documentation
CHARACTER_AVOIDANCE_MODE TODO: add documentation
PURSUIT_OFFSET TODO: add documentation
REQUIRE_LINE_OF_SIGHT TODO: add documentation
PURSUIT_FUZZ_FACTOR TODO: add documentation
PURSUIT_INTERCEPT TODO: add documentation
FORCE_DIRECT_PATH TODO: add documentation
VERTICAL TODO: add documentation
HORIZONTAL TODO: add documentation
AVOID_CHARACTERS TODO: add documentation
AVOID_DYNAMIC_OBSTACLES TODO: add documentation
PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer.
PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running
PU_FAILURE_INVALID_GOAL Goal is not on the navigation-mesh and cannot be reached.
PU_FAILURE_INVALID_START Character cannot navigate from the current location - e.g., the character is off the navmesh or too high above it.
PU_FAILURE_NO_VALID_DESTINATION There's no good place for the character to go - e.g., it is patrolling and all the patrol points are now unreachable.
PU_FAILURE_OTHER Unknown failure
PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer be tracked - e.g., it left the region or is an avatar that is now more than about 30m outside the region.
PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path.
PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering).
PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal.
CHARACTER_TYPE TODO: add documentation
CHARACTER_TYPE_A TODO: add documentation
CHARACTER_TYPE_B TODO: add documentation
CHARACTER_TYPE_C TODO: add documentation
CHARACTER_TYPE_D TODO: add documentation
CHARACTER_TYPE_NONE TODO: add documentation
TRAVERSAL_TYPE TODO: add documentation
TRAVERSAL_TYPE_SLOW TODO: add documentation
TRAVERSAL_TYPE_FAST TODO: add documentation
TRAVERSAL_TYPE_NONE TODO: add documentation
CHARACTER_MAX_ACCEL TODO: add documentation
CHARACTER_MAX_DECEL TODO: add documentation
CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation
CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation
CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation
CHARACTER_DESIRED_TURN_SPEED TODO: add documentation
CHARACTER_MAX_TURN_RADIUS TODO: add documentation
# --- OpenSim and Aurora-Sim constants Below ---
# OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs)
# Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs)
CHANGED_ANIMATION OpenSim change event animation change detection.
# osGetRegionStats
STATS_TIME_DILATION returned value from osGetRegionStats(), 1st of 21 items in returned list.
STATS_SIM_FPS returned value from osGetRegionStats(), 2nd of 21 items in returned list.
STATS_PHYSICS_FPS returned value from osGetRegionStats(), 3rd of 21 items in returned list.
STATS_AGENT_UPDATES returned value from osGetRegionStats(), 4th of 21 items in returned list.
STATS_ROOT_AGENTS returned value from osGetRegionStats(), 5th of 21 items in returned list.
STATS_CHILD_AGENTS returned value from osGetRegionStats(), 6th of 21 items in returned list.
STATS_TOTAL_PRIMS returned value from osGetRegionStats(), 7th of 21 items in returned list.
STATS_ACTIVE_PRIMS returned value from osGetRegionStats(), 8th of 21 items in returned list.
STATS_FRAME_MS returned value from osGetRegionStats(), 9th of 21 items in returned list.
STATS_NET_MS returned value from osGetRegionStats(), 10th of 21 items in returned list.
STATS_PHYSICS_MS returned value from osGetRegionStats(), 11th of 21 items in returned list.
STATS_IMAGE_MS returned value from osGetRegionStats(), 12th of 21 items in returned list.
STATS_OTHER_MS returned value from osGetRegionStats(), 13th of 21 items in returned list.
STATS_IN_PACKETS_PER_SECOND returned value from osGetRegionStats(), 14th of 21 items in returned list.
STATS_OUT_PACKETS_PER_SECOND returned value from osGetRegionStats(), 15th of 21 items in returned list.
STATS_UNACKED_BYTES returned value from osGetRegionStats(), 16th of 21 items in returned list.
STATS_AGENT_MS returned value from osGetRegionStats(), 17th of 21 items in returned list.
STATS_PENDING_DOWNLOADS returned value from osGetRegionStats(), 18th of 21 items in returned list.
STATS_PENDING_UPLOADS returned value from osGetRegionStats(), 19th of 21 items in returned list.
STATS_ACTIVE_SCRIPTS returned value from osGetRegionStats(), 20th of 21 items in returned list.
STATS_SCRIPT_LPS returned value from osGetRegionStats(), 21st of 21 items in returned list.
# OpenSim NPC
OS_NPC_FLY used by osNPC.
OS_NPC_NO_FLY used by osNPC.
OS_NPC_LAND_AT_TARGET used by osNPC.
OS_NPC_SIT_NOW used by osNPC.
OS_NPC_CREATOR_OWNED used by osNPC.
OS_NPC_NOT_OWNED used by osNPC.
OS_NPC_SENSE_AS_AGENT used by osNPC.
OS_NPC_RUNNING used by osNPC.
# Windlight/Lightshare
WL_WATER_COLOR Windlight Water Colour
WL_WATER_FOG_DENSITY_EXPONENT Windlight Water Fog Density Exponent
WL_UNDERWATER_FOG_MODIFIER Windlight Underwater Fog Modifier
@@ -651,112 +771,28 @@ WL_CLOUD_SCROLL_Y Windlight Cloud Scroll Y
WL_CLOUD_SCROLL_Y_LOCK Windlight Cloud Scroll Y Lock
WL_CLOUD_SCROLL_X_LOCK Windlight Cloud Scroll X Lock
WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds
# keyframe constants
KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list.
KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE.
KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination of KFM_TRANSLATION and KFM_ROTATION. If you specify one or the other, you should only include translations or rotations in your keyframe list.
KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode.
KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode.
KFM_PING_PONG Option for llSetKeyframedMotion(), used after KFM_MODE to specify the ping pong playback mode.
KFM_REVERSE Option for llSetKeyframedMotion(), used after KFM_MODE to specify the reverse playback mode.
KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION.
KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION.
KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion.
KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion.
KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion.
# OSSL constants
STATS_TIME_DILATION
STATS_SIM_FPS
STATS_PHYSICS_FPS
STATS_AGENT_UPDATES
STATS_ROOT_AGENTS
STATS_CHILD_AGENTS
STATS_TOTAL_PRIMS
STATS_ACTIVE_PRIMS
STATS_FRAME_MS
STATS_NET_MS
STATS_PHYSICS_MS
STATS_IMAGE_MS
STATS_OTHER_MS
STATS_IN_PACKETS_PER_SECOND
STATS_OUT_PACKETS_PER_SECOND
STATS_UNACKED_BYTES
STATS_AGENT_MS
STATS_PENDING_DOWNLOADS
STATS_PENDING_UPLOADS
STATS_ACTIVE_SCRIPTS
STATS_SCRIPT_LPS
## Constants for osNpc* functions
NPC
OS_NPC_CREATOR_OWNED
OS_NPC_NOT_OWNED
OS_NPC_SENSE_AS_AGENT
OS_NPC_FLY
OS_NPC_NO_FLY
OS_NPC_LAND_AT_TARGET
OS_NPC_SIT_NOW
## Missing LSL constants (from http://wiki.secondlife.com/wiki/Category:LSL_Constants)
# physics constants
DENSITY For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the density.
FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the friction.
RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution.
GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier.
##Even more missing constants, thanks to Justin Clark Casey for pointing me into the right direction
##Liru: Were these supposed to be LSL? They're undocumented, commenting out for now.
#CAMERA_FOCUS_OFFSET_X
#CAMERA_FOCUS_OFFSET_Y
#CAMERA_FOCUS_OFFSET_Z
#CAMERA_FOCUS_X
#CAMERA_FOCUS_Y
#CAMERA_FOCUS_Z
#CAMERA_POSITION_X
#CAMERA_POSITION_Y
#CAMERA_POSITION_Z
#CHANGED_ANIMATION
#CHANGED_REGION_RESTART
#DATA_SIM_RELEASE
#LIST_STAT_HARMONIC_MEAN
#PARCEL_DETAILS_CLAIMDATE
#VEHICLE_FLAG_LOCK_HOVER_HEIGHT
#VEHICLE_FLAG_LOCK_ROTATION
#VEHICLE_FLAG_NO_X
#VEHICLE_FLAG_NO_Y
#VEHICLE_FLAG_NO_Z
#VEHICLE_RANGE_BLOCK
#VEHICLE_ROLL_FRAME
#LSL_STATUS_BOUNDS_ERROR
#LSL_STATUS_INTERNAL_ERROR
#LSL_STATUS_MALFORMED_PARAMS
#LSL_STATUS_NOT_FOUND
#LSL_STATUS_NOT_SUPPORTED
#LSL_STATUS_OK
#LSL_STATUS_TYPE_MISMATCH
#LSL_STATUS_WHITELIST_FAILED
# castray constants
RCERR_UNKNOWN Returned by llCastRay() when the raycast failed for an unspecified reason.
RCERR_SIM_PERF_LOW Returned by llCastRay() when the raycast failed because simulator performance is low.
RCERR_CAST_TIME_EXCEEDED Returned by llCastRay() when the raycast failed because the parcel or agent has exceeded the maximum time allowed for raycasting.
RC_REJECT_TYPES Option for llCastRay() used to ignore specific types of objects, followed with a bitwise combination of RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL and RC_REJECT_LAND.
RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise.
RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM.
RC_MAX_HITS Option for llCastRay() followed with an integer specifying the maximum number of hits to return (must be <= 256).
RC_REJECT_AGENTS Flag used in the RC_REJECT_TYPES mask to reject agents in llCastRay().
RC_REJECT_PHYSICAL Flag used in the RC_REJECT_TYPES mask to reject physical objects in llCastRay().
RC_REJECT_NONPHYSICAL Flag used in the RC_REJECT_TYPES mask to reject non-physical objects in llCastRay().
RC_REJECT_LAND Flag used in the RC_REJECT_TYPES mask to reject land in llCastRay().
RC_GET_NORMAL Flag used in the RC_DATA_FLAGS mask to get hit normals in llCastRay() results.
RC_GET_ROOT_KEY Flag used in the RC_DATA_FLAGS mask to get root keys in llCastRay() results.
RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results.
# Aurora-Sim Constants (\Aurora\AuroraDotNetEngine\APIs\AA_Constants.cs) -->
ENABLE_GRAVITY enable_gravity.
GRAVITY_FORCE_X gravity_force_x.
GRAVITY_FORCE_Y gravity_force_y.
GRAVITY_FORCE_Z gravity_force_z.
ADD_GRAVITY_POINT add_gravity_point.
ADD_GRAVITY_FORCE add_gravity_force.
START_TIME_REVERSAL_SAVING start_time_reversal_saving.
STOP_TIME_REVERSAL_SAVING stop_time_reversal_saving.
START_TIME_REVERSAL start_time_reversal.
STOP_TIME_REVERSAL stop_time_reversal.
# Aurora botFunctions
BOT_FOLLOW_FLAG_NONE value 0.
BOT_FOLLOW_FLAG_INDEFINITELY value 1.
BOT_TAG_FIND_ALL value AllBots.
BOT_FOLLOW_WALK value 0.
BOT_FOLLOW_RUN value 1.
BOT_FOLLOW_FLY value 2.
BOT_FOLLOW_TELEPORT value 3.
BOT_FOLLOW_WAIT value 4.
BOT_FOLLOW_TRIGGER_HERE_EVENT value 1.
BOT_FOLLOW_FLAG_FORCEDIRECTPATH value 4.
# string constants
[word .1, .3, .5]

View File

@@ -7154,6 +7154,17 @@
<key>Value</key>
<string>help/index.html</string>
</map>
<key>WebProfileURL</key>
<map>
<key>Comment</key>
<string>URL for Web Profiles</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>https://my.secondlife.com/[AGENT_NAME]</string>
</map>
<key>HighResSnapshot</key>
<map>
<key>Comment</key>

View File

@@ -217,11 +217,6 @@
////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor
//
#if LL_WINDOWS && LL_LCD_COMPILE
#include "lllcd.h"
#endif
//----------------------------------------------------------------------------
// viewer.cpp - these are only used in viewer, should be easily moved.
@@ -814,13 +809,6 @@ bool LLAppViewer::init()
// call all self-registered classes
LLInitClassList::instance().fireCallbacks();
#if LL_LCD_COMPILE
// start up an LCD window on a logitech keyboard, if there is one
HINSTANCE hInstance = GetModuleHandle(NULL);
gLcdScreen = new LLLCD(hInstance);
CreateLCDDebugWindows();
#endif
LLFolderViewItem::initClass(); // SJB: Needs to happen after initWindow(), not sure why but related to fonts
gGLManager.getGLInfo(gDebugInfo);
@@ -1202,11 +1190,6 @@ bool LLAppViewer::mainLoop()
pingMainloopTimeout("Main:Snapshot");
LLFloaterSnapshot::update(); // take snapshots
gGLActive = FALSE;
#if LL_LCD_COMPILE
// update LCD Screen
pingMainloopTimeout("Main:LCD");
gLcdScreen->UpdateDisplay();
#endif
}
}
@@ -1574,12 +1557,6 @@ bool LLAppViewer::cleanup()
// gDXHardware.cleanup();
//#endif // LL_WINDOWS
#if LL_LCD_COMPILE
// shut down the LCD window on a logitech keyboard, if there is one
delete gLcdScreen;
gLcdScreen = NULL;
#endif
LLVolumeMgr* volume_manager = LLPrimitive::getVolumeManager();
if (!volume_manager->cleanup())
{
@@ -1682,6 +1659,7 @@ bool LLAppViewer::cleanup()
writeDebugInfo();
LLViewerMedia::saveCookieFile();
// Stop the plugin read thread if it's running.
LLPluginProcessParent::setUseReadThread(false);

View File

@@ -42,6 +42,7 @@
#include "llcommandhandler.h"
#include "llpanelavatar.h"
#include "lluictrlfactory.h"
#include "llweb.h"
// linden library includes
#include "llinventory.h"
@@ -293,3 +294,13 @@ LLPreview::EAssetStatus LLFloaterAvatarInfo::getAssetStatus()
}
return mAssetStatus;
}
std::string getProfileURL(const std::string& agent_name)
{
std::string url = gSavedSettings.getString("WebProfileURL");
LLSD subs;
subs["AGENT_NAME"] = agent_name;
url = LLWeb::expandURLSubstitutions(url,subs);
LLStringUtil::toLower(url);
return url;
}

View File

@@ -101,5 +101,6 @@ private:
EOnlineStatus mSuggestedOnlineStatus;
};
std::string getProfileURL(const std::string& agent_name);
#endif

View File

@@ -455,20 +455,6 @@ void LLFloaterChat::addChat(const LLChat& chat,
}
// [/RLVa:KB]
#if LL_LCD_COMPILE
// add into LCD displays
if (!invisible_script_debug_chat)
{
if (!from_instant_message)
{
AddNewChatToLCD(chat.mText);
}
else
{
AddNewIMToLCD(chat.mText);
}
}
#endif
if (!invisible_script_debug_chat
&& !chat.mMuted
&& gConsole

View File

@@ -58,7 +58,6 @@
#include "llpanelgeneral.h"
#include "llpanelinput.h"
#include "llpanellogin.h"
#include "llpanelLCD.h"
#include "llpanelmsgs.h"
#include "llpanelweb.h"
#include "llpanelskins.h"
@@ -179,20 +178,6 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def
mTabContainer->addTabPanel(mPrefsIM->getPanel(), mPrefsIM->getPanel()->getLabel());
mPrefsIM->getPanel()->setDefaultBtn(default_btn);
#if LL_LCD_COMPILE
// only add this option if we actually have a logitech keyboard / speaker set
if (gLcdScreen->Enabled())
{
mLCDPanel = new LLPanelLCD();
mTabContainer->addTabPanel(mLCDPanel, mLCDPanel->getLabel());
mLCDPanel->setDefaultBtn(default_btn);
}
#else
mLCDPanel = NULL;
#endif
mMsgPanel = new LLPanelMsgs();
mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel());
mMsgPanel->setDefaultBtn(default_btn);
@@ -322,14 +307,6 @@ void LLPreferenceCore::apply()
LLFloaterHardwareSettings::instance()->apply();
mWebPanel->apply();
#if LL_LCD_COMPILE
// only add this option if we actually have a logitech keyboard / speaker set
if (gLcdScreen->Enabled())
{
mLCDPanel->apply();
}
#endif
// mWebPanel->apply();
}
@@ -354,14 +331,6 @@ void LLPreferenceCore::cancel()
LLFloaterHardwareSettings::instance()->cancel();
mWebPanel->cancel();
#if LL_LCD_COMPILE
// only add this option if we actually have a logitech keyboard / speaker set
if (gLcdScreen->Enabled())
{
mLCDPanel->cancel();
}
#endif
// mWebPanel->cancel();
}
// static

View File

@@ -118,20 +118,20 @@ public:
virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse);
virtual BOOL addFolder( LLFolderViewFolder* folder);
// Finds width and height of this object and it's children. Also
// makes sure that this view and it's children are the right size.
// Find width and height of this object and its children. Also
// makes sure that this view and its children are the right size.
virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
void arrangeAll() { mArrangeGeneration++; }
S32 getArrangeGeneration() { return mArrangeGeneration; }
// applies filters to control visibility of inventory items
// Apply filters to control visibility of inventory items
virtual void filter( LLInventoryFilter& filter);
// get the last selected item
// Get the last selected item
virtual LLFolderViewItem* getCurSelectedItem( void );
// Record the selected item and pass it down the hierachy.
// Record the selected item and pass it down the hierarchy.
virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem,
BOOL take_keyboard_focus);
@@ -141,13 +141,13 @@ public:
// Called once a frame to update the selection if mSelectThisID has been set
void updateSelection();
// This method is used to toggle the selection of an item. Walks
// children, and keeps track of selected objects.
// This method is used to toggle the selection of an item.
// Walks children and keeps track of selected objects.
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
virtual std::set<LLUUID> getSelectionList() const;
// make sure if ancestor is selected, descendents are not
// Make sure if ancestor is selected, descendents are not
void sanitizeSelection();
void clearSelection();
void addToSelectionList(LLFolderViewItem* item);
@@ -158,21 +158,21 @@ public:
void setDraggingOverItem(LLFolderViewItem* item) { mDraggingOverItem = item; }
LLFolderViewItem* getDraggingOverItem() { return mDraggingOverItem; }
// deletion functionality
// Deletion functionality
void removeSelectedItems();
// open the selected item.
// Open the selected item
void openSelectedItems( void );
void propertiesSelectedItems( void );
// change the folder type
// Change the folder type
void changeType(LLInventoryModel *model, LLFolderType::EType new_folder_type);
void autoOpenItem(LLFolderViewFolder* item);
void closeAutoOpenedFolders();
BOOL autoOpenTest(LLFolderViewFolder* item);
// copy & paste
// Copy & paste
virtual void copy();
virtual BOOL canCopy() const;
@@ -185,7 +185,7 @@ public:
virtual void doDelete();
virtual BOOL canDoDelete() const;
// public rename functionality - can only start the process
// Public rename functionality - can only start the process
void startRenamingSelectedItem( void );
// These functions were used when there was only one folderview,

View File

@@ -170,7 +170,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
if (mMediaSource)
{
mMediaSource->mouseMove(x, y);
mMediaSource->mouseMove(x, y, mask);
gViewerWindow->setCursor(mLastSetCursor);
}
@@ -198,7 +198,7 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
if (mMediaSource)
{
mMediaSource->mouseUp(x, y);
mMediaSource->mouseUp(x, y, mask);
/*// *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup,
// in addition to the onFocusReceived() call below. Undo this. JC
@@ -222,7 +222,7 @@ BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
convertInputCoords(x, y);
if (mMediaSource)
mMediaSource->mouseDown(x, y);
mMediaSource->mouseDown(x, y, mask);
gFocusMgr.setMouseCapture( this );
@@ -265,11 +265,11 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
if (LLUICtrl::handleRightMouseDown(x, y, mask)) return TRUE;
/*S32 media_x = x, media_y = y;
S32 media_x = x, media_y = y;
convertInputCoords(media_x, media_y);
if (mMediaSource)
mMediaSource->mouseDown(media_x, media_y);
mMediaSource->mouseDown(media_x, media_y, mask, 1);
gFocusMgr.setMouseCapture( this );
@@ -277,7 +277,7 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
setFocus( TRUE );
}
*/
return TRUE;
}
@@ -289,7 +289,7 @@ BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
convertInputCoords(x, y);
if (mMediaSource)
mMediaSource->mouseLeftDoubleClick( x, y);
mMediaSource->mouseDoubleClick( x, y, mask);
gFocusMgr.setMouseCapture( this );
@@ -916,20 +916,16 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
case MEDIA_EVENT_NAVIGATE_BEGIN:
{
LL_INFOS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_BEGIN, url is " << self->getNavigateURI() << LL_ENDL;
if(mMediaSource && mHideLoading)
{
mMediaSource->suspendUpdates(true);
}
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_BEGIN, url is " << self->getNavigateURI() << LL_ENDL;
};
break;
case MEDIA_EVENT_NAVIGATE_COMPLETE:
{
LL_INFOS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL;
if(mMediaSource && mHideLoading)
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL;
if(mHidingInitialLoad)
{
mMediaSource->suspendUpdates(false);
mHidingInitialLoad = false;
}
};
break;

View File

@@ -177,6 +177,7 @@ class LLMediaCtrl :
bool mStretchToFill;
bool mMaintainAspectRatio;
bool mHideLoading;
bool mHidingInitialLoad;
bool mDecoupleTextureSize;
S32 mTextureWidth;
S32 mTextureHeight;

View File

@@ -1,132 +0,0 @@
/**
* @file llpanellcd.cpp
* @brief lcd options panel
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llpanelLCD.h"
// linden library includes
#include "llerror.h"
#include "llrect.h"
#include "llfontgl.h"
#include "message.h"
#include "lluictrlfactory.h"
// project includes
#include "llviewerwindow.h"
#include "llcheckboxctrl.h"
#include "llradiogroup.h"
#include "llresmgr.h"
#include "lltextbox.h"
#include "llui.h"
#include "llviewercontrol.h"
//Ventrella
#include "llagent.h"
//end Ventrella
// for Logitech LCD keyboards / speakers
#ifndef LL_LCD_H
#include "lllcd.h"
#endif
//
// Globals
//
//
// Static functions
//
LLPanelLCD::LLPanelLCD()
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_lcd.xml");
}
BOOL LLPanelLCD::postBuild()
{
requires<LLRadioGroup>("LCDDestination");
requires<LLCheckBoxCtrl>("DisplayLinden");
requires<LLCheckBoxCtrl>("DisplayDebug");
requires<LLCheckBoxCtrl>("DisplayDebugConsole");
requires<LLCheckBoxCtrl>("DisplayRegion");
requires<LLCheckBoxCtrl>("DisplayChat");
requires<LLCheckBoxCtrl>("DisplayIM");
if (!checkRequirements())
{
return FALSE;
}
refresh();
return TRUE;
}
LLPanelLCD::~LLPanelLCD()
{
// Children all cleaned up by default view destructor.
}
void LLPanelLCD::refresh()
{
mLCDDestination = gSavedSettings.getS32("LCDDestination");
mDisplayChat = gSavedSettings.getBOOL("DisplayChat");
mDisplayIM = gSavedSettings.getBOOL("DisplayIM");
mDisplayRegion = gSavedSettings.getBOOL("DisplayRegion");
mDisplayDebug = gSavedSettings.getBOOL("DisplayDebug");
mDisplayDebugConsole = gSavedSettings.getBOOL("DisplayDebugConsole");
mDisplayLinden = gSavedSettings.getBOOL("DisplayLinden");
LLPanel::refresh();
}
void LLPanelLCD::apply()
{
// nothing really to do here.
}
void LLPanelLCD::cancel()
{
// doing this to restore situation when we entered this function
gSavedSettings.setS32("LCDDestination", mLCDDestination);
gSavedSettings.setBOOL("DisplayChat", mDisplayChat);
gSavedSettings.setBOOL("DisplayIM", mDisplayIM);
gSavedSettings.setBOOL("DisplayRegion", mDisplayRegion);
gSavedSettings.setBOOL("DisplayDebug", mDisplayDebug);
gSavedSettings.setBOOL("DisplayDebugConsole", mDisplayDebugConsole);
gSavedSettings.setBOOL("DisplayLinden", mDisplayLinden);
}

View File

@@ -1,63 +0,0 @@
/**
* @file llpanelLCD.h
* @brief lcd options panel
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#ifndef LL_PANEL_LCD_H
#define LL_PANEL_LCD_H
#include "llpanel.h"
class LLCheckBoxCtrl;
class LLPanelLCD : public LLPanel
{
public:
LLPanelLCD();
virtual ~LLPanelLCD();
virtual BOOL postBuild();
virtual void refresh();
void apply();
void cancel();
protected:
S32 mLCDDestination;
BOOL mDisplayChat;
BOOL mDisplayRegion;
BOOL mDisplayDebug;
BOOL mDisplayDebugConsole;
BOOL mDisplayLinden;
BOOL mDisplayIM;
};
#endif

View File

@@ -1095,12 +1095,14 @@ bool idle_startup()
// END TODO
LLPanelLogin::close();
}
//For HTML parsing in text boxes.
LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") );
// Load URL History File
LLURLHistory::loadFile("url_history.xml");
// Load media plugin cookies
LLViewerMedia::loadCookieFile();
//-------------------------------------------------
// Handle startup progress screen
@@ -4309,7 +4311,6 @@ bool process_login_success_response(std::string& password)
#endif
}
// Override grid info with anything sent in the login response
std::string tmp = response["gridname"].asString();
if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp);
@@ -4354,6 +4355,14 @@ bool process_login_success_response(std::string& password)
gHippoGridManager->saveFile();
gHippoLimits->setLimits();
// Start the process of fetching the OpenID session cookie for this user login
std::string openid_url = response["openid_url"];
if(!openid_url.empty())
{
std::string openid_token = response["openid_token"];
LLViewerMedia::openIDSetup(openid_url, openid_token);
}
gIMMgr->loadIgnoreGroup();
bool success = false;

View File

@@ -927,7 +927,7 @@ static bool handle_media_click(const LLPickInfo& pick)
}
else
{
media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY);
media_impl->mouseDown(pick.mXYCoords.mX, pick.mXYCoords.mY, gKeyboard->currentMask(TRUE));
media_impl->mouseCapture(); // the mouse-up will happen when capture is lost
}
@@ -973,7 +973,7 @@ static bool handle_media_hover(const LLPickInfo& pick)
{
if(LLViewerMediaFocus::getInstance()->getFocus())
{
media_impl->mouseMove(pick.mXYCoords.mX, pick.mXYCoords.mY);
media_impl->mouseMove(pick.mXYCoords.mX, pick.mXYCoords.mY, gKeyboard->currentMask(TRUE));
}
// Set mouse over flag if unset

View File

@@ -286,5 +286,11 @@ const char * LLURL::getFullPath()
return(sReturnString);
}
const char * LLURL::getAuthority()
{
strncpy(LLURL::sReturnString,mAuthority, LL_MAX_PATH -1); /* Flawfinder: ignore */
LLURL::sReturnString[LL_MAX_PATH -1] = '\0';
return(sReturnString);
}
char LLURL::sReturnString[LL_MAX_PATH] = "";

View File

@@ -79,6 +79,7 @@ public:
virtual const char *getFQURL() const;
virtual const char *getFullPath();
virtual const char *getAuthority();
virtual const char *updateRelativePath(const LLURL &url);

View File

@@ -33,21 +33,31 @@
#include "llviewerprecompiledheaders.h"
#include "llviewermedia.h"
#include "llviewermediafocus.h"
#include "llhoverview.h"
#include "llmimetypes.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llviewertexturelist.h"
//#include "viewerversion.h"
#include "llpluginclassmedia.h"
#include "llnotifications.h"
#include "llappviewer.h"
#include "lldir.h"
#include "lldiriterator.h"
#include "llevent.h" // LLSimpleListener
#include "llnotificationsutil.h"
#include "lluuid.h"
#include "llhoverview.h"
#include "llkeyboard.h"
#include "llmimetypes.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpluginclassmedia.h"
#include "llplugincookiestore.h"
#include "llurldispatcher.h"
#include "lluuid.h"
#include "llviewermediafocus.h"
#include "llviewercontrol.h"
#include "llviewertexture.h"
#include "llviewertexturelist.h"
#include "llviewerwindow.h"
#include "llwindow.h"
#include "llvieweraudio.h"
#include "llweb.h"
#include "llfloateravatarinfo.h" // for getProfileURL() function
//#include "viewerversion.h"
// Merov: Temporary definitions while porting the new viewer media code to Snowglobe
const int LEFT_BUTTON = 0;
@@ -75,11 +85,6 @@ public:
completeAny(status, mime_type);
}
virtual void error( U32 status, const std::string& reason )
{
// completeAny(status, "none/none");
}
void completeAny(U32 status, const std::string& mime_type)
{
if(!mInitialized && ! mime_type.empty())
@@ -96,8 +101,83 @@ public:
viewer_media_t mMediaImpl;
bool mInitialized;
};
class LLViewerMediaOpenIDResponder : public LLHTTPClient::Responder
{
LOG_CLASS(LLViewerMediaOpenIDResponder);
public:
LLViewerMediaOpenIDResponder( )
{
}
~LLViewerMediaOpenIDResponder()
{
}
/* virtual */ void completedHeader(U32 status, const std::string& reason, const LLSD& content)
{
LL_DEBUGS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL;
LL_DEBUGS("MediaAuth") << content << LL_ENDL;
std::string cookie = content["set-cookie"].asString();
LLViewerMedia::openIDCookieResponse(cookie);
}
/* virtual */ void completedRaw(
U32 status,
const std::string& reason,
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
// This is just here to disable the default behavior (attempting to parse the response as llsd).
// We don't care about the content of the response, only the set-cookie header.
}
};
class LLViewerMediaWebProfileResponder : public LLHTTPClient::Responder
{
LOG_CLASS(LLViewerMediaWebProfileResponder);
public:
LLViewerMediaWebProfileResponder(std::string host)
{
mHost = host;
}
~LLViewerMediaWebProfileResponder()
{
}
/* virtual */ void completedHeader(U32 status, const std::string& reason, const LLSD& content)
{
LL_WARNS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL;
LL_WARNS("MediaAuth") << content << LL_ENDL;
std::string cookie = content["set-cookie"].asString();
LLViewerMedia::getCookieStore()->setCookiesFromHost(cookie, mHost);
}
void completedRaw(
U32 status,
const std::string& reason,
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
// This is just here to disable the default behavior (attempting to parse the response as llsd).
// We don't care about the content of the response, only the set-cookie header.
}
std::string mHost;
};
LLPluginCookieStore *LLViewerMedia::sCookieStore = NULL;
LLURL LLViewerMedia::sOpenIDURL;
std::string LLViewerMedia::sOpenIDCookie;
typedef std::list<LLViewerMediaImpl*> impl_list;
static impl_list sViewerMediaImplList;
static std::string sUpdatedCookies;
static const char *PLUGIN_COOKIE_FILE_NAME = "plugin_cookies.txt";
//////////////////////////////////////////////////////////////////////////////////////////
// LLViewerMedia
@@ -105,10 +185,12 @@ static impl_list sViewerMediaImplList;
//////////////////////////////////////////////////////////////////////////////////////////
// static
viewer_media_t LLViewerMedia::newMediaImpl(const std::string& media_url,
const LLUUID& texture_id,
S32 media_width, S32 media_height, U8 media_auto_scale,
U8 media_loop,
std::string mime_type)
const LLUUID& texture_id,
S32 media_width,
S32 media_height,
U8 media_auto_scale,
U8 media_loop,
std::string mime_type)
{
LLViewerMediaImpl* media_impl = getMediaImplFromTextureID(texture_id);
if(media_impl == NULL || texture_id.isNull())
@@ -255,7 +337,8 @@ void LLViewerMedia::setVolume(F32 volume)
for(; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
pimpl->setVolume(volume);
LLPluginClassMedia* plugin = pimpl->getMediaPlugin();
plugin->setVolume(volume);
}
}
@@ -263,6 +346,13 @@ void LLViewerMedia::setVolume(F32 volume)
// static
void LLViewerMedia::updateMedia()
{
sUpdatedCookies = getCookieStore()->getChangedCookies();
if(!sUpdatedCookies.empty())
{
lldebugs << "updated cookies will be sent to all loaded plugins: " << llendl;
lldebugs << sUpdatedCookies << llendl;
}
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
@@ -273,6 +363,349 @@ void LLViewerMedia::updateMedia()
}
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::clearAllCookies()
{
// Clear all cookies for all plugins
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for (; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
LLPluginClassMedia* plugin = pimpl->getMediaPlugin();
if(plugin)
{
plugin->clear_cookies();
}
}
// Clear all cookies from the cookie store
getCookieStore()->setAllCookies("");
// FIXME: this may not be sufficient, since the on-disk cookie file won't get written until some browser instance exits cleanly.
// It also won't clear cookies for other accounts, or for any account if we're not logged in, and won't do anything at all if there are no webkit plugins loaded.
// Until such time as we can centralize cookie storage, the following hack should cover these cases:
// HACK: Look for cookie files in all possible places and delete them.
// NOTE: this assumes knowledge of what happens inside the webkit plugin (it's what adds 'browser_profile' to the path and names the cookie file)
// Places that cookie files can be:
// <getOSUserAppDir>/browser_profile/cookies
// <getOSUserAppDir>/first_last/browser_profile/cookies (note that there may be any number of these!)
// <getOSUserAppDir>/first_last/plugin_cookies.txt (note that there may be any number of these!)
std::string base_dir = gDirUtilp->getOSUserAppDir() + gDirUtilp->getDirDelimiter();
std::string target;
std::string filename;
lldebugs << "base dir = " << base_dir << llendl;
// The non-logged-in version is easy
target = base_dir;
target += "browser_profile";
target += gDirUtilp->getDirDelimiter();
target += "cookies";
lldebugs << "target = " << target << llendl;
if(LLFile::isfile(target))
{
LLFile::remove(target);
}
// the hard part: iterate over all user directories and delete the cookie file from each one
LLDirIterator dir_iter(base_dir, "*_*");
while (dir_iter.next(filename))
{
target = base_dir;
target += filename;
target += gDirUtilp->getDirDelimiter();
target += "browser_profile";
target += gDirUtilp->getDirDelimiter();
target += "cookies";
lldebugs << "target = " << target << llendl;
if(LLFile::isfile(target))
{
LLFile::remove(target);
}
// Other accounts may have new-style cookie files too -- delete them as well
target = base_dir;
target += filename;
target += gDirUtilp->getDirDelimiter();
target += PLUGIN_COOKIE_FILE_NAME;
lldebugs << "target = " << target << llendl;
if(LLFile::isfile(target))
{
LLFile::remove(target);
}
}
// If we have an OpenID cookie, re-add it to the cookie store.
setOpenIDCookie();
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::clearAllCaches()
{
// Clear all plugins' caches
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for (; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
pimpl->clearCache();
}
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::setCookiesEnabled(bool enabled)
{
// Set the "cookies enabled" flag for all loaded plugins
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for (; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
LLPluginClassMedia* plugin = pimpl->getMediaPlugin();
if(plugin)
{
plugin->enable_cookies(enabled);
}
}
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
/////////////////////////////////////////////////////////////////////////////////////////
// static
LLPluginCookieStore *LLViewerMedia::getCookieStore()
{
if(sCookieStore == NULL)
{
sCookieStore = new LLPluginCookieStore;
}
return sCookieStore;
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::loadCookieFile()
{
// build filename for each user
std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PLUGIN_COOKIE_FILE_NAME);
if (resolved_filename.empty())
{
llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl;
return;
}
// open the file for reading
llifstream file(resolved_filename);
if (!file.is_open())
{
llwarns << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << llendl;
return;
}
getCookieStore()->readAllCookies(file, true);
file.close();
// send the clear_cookies message to all loaded plugins
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for (; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
LLPluginClassMedia* plugin = pimpl->getMediaPlugin();
if(plugin)
{
plugin->clear_cookies();
}
}
// If we have an OpenID cookie, re-add it to the cookie store.
setOpenIDCookie();
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::saveCookieFile()
{
// build filename for each user
std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PLUGIN_COOKIE_FILE_NAME);
if (resolved_filename.empty())
{
llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl;
return;
}
// open a file for writing
llofstream file (resolved_filename);
if (!file.is_open())
{
llwarns << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << llendl;
return;
}
getCookieStore()->writePersistentCookies(file);
file.close();
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::addCookie(const std::string &name, const std::string &value, const std::string &domain, const LLDate &expires, const std::string &path, bool secure)
{
std::stringstream cookie;
cookie << name << "=" << LLPluginCookieStore::quoteString(value);
if(expires.notNull())
{
cookie << "; expires=" << expires.asRFC1123();
}
cookie << "; domain=" << domain;
cookie << "; path=" << path;
if(secure)
{
cookie << "; secure";
}
getCookieStore()->setCookies(cookie.str());
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::addSessionCookie(const std::string &name, const std::string &value, const std::string &domain, const std::string &path, bool secure)
{
// A session cookie just has a NULL date.
addCookie(name, value, domain, LLDate(), path, secure);
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::removeCookie(const std::string &name, const std::string &domain, const std::string &path )
{
// To remove a cookie, add one with the same name, domain, and path that expires in the past.
addCookie(name, "", domain, LLDate(LLDate::now().secondsSinceEpoch() - 1.0), path);
}
LLSD LLViewerMedia::getHeaders()
{
LLSD headers = LLSD::emptyMap();
headers["Accept"] = "*/*";
headers["Content-Type"] = "application/xml";
headers["Cookie"] = sOpenIDCookie;
headers["User-Agent"] = getCurrentUserAgent();
return headers;
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::setOpenIDCookie()
{
if(!sOpenIDCookie.empty())
{
// The LLURL can give me the 'authority', which is of the form: [username[:password]@]hostname[:port]
// We want just the hostname for the cookie code, but LLURL doesn't seem to have a way to extract that.
// We therefore do it here.
std::string authority = sOpenIDURL.mAuthority;
std::string::size_type host_start = authority.find('@');
if(host_start == std::string::npos)
{
// no username/password
host_start = 0;
}
else
{
// Hostname starts after the @.
// (If the hostname part is empty, this may put host_start at the end of the string. In that case, it will end up passing through an empty hostname, which is correct.)
++host_start;
}
std::string::size_type host_end = authority.rfind(':');
if((host_end == std::string::npos) || (host_end < host_start))
{
// no port
host_end = authority.size();
}
getCookieStore()->setCookiesFromHost(sOpenIDCookie, authority.substr(host_start, host_end - host_start));
// Do a web profile get so we can store the cookie
LLSD headers = LLSD::emptyMap();
headers["Accept"] = "*/*";
headers["Cookie"] = sOpenIDCookie;
headers["User-Agent"] = getCurrentUserAgent();
std::string profile_url = getProfileURL("");
LLURL raw_profile_url( profile_url.c_str() );
LL_DEBUGS("MediaAuth") << "Requesting " << profile_url << llendl;
LL_DEBUGS("MediaAuth") << "sOpenIDCookie = [" << sOpenIDCookie << "]" << llendl;
LLHTTPClient::get(profile_url,
new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()),
headers);
}
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::openIDSetup(const std::string &openid_url, const std::string &openid_token)
{
LL_DEBUGS("MediaAuth") << "url = \"" << openid_url << "\", token = \"" << openid_token << "\"" << LL_ENDL;
// post the token to the url
// the responder will need to extract the cookie(s).
// Save the OpenID URL for later -- we may need the host when adding the cookie.
sOpenIDURL.init(openid_url.c_str());
// We shouldn't ever do this twice, but just in case this code gets repurposed later, clear existing cookies.
sOpenIDCookie.clear();
LLSD headers = LLSD::emptyMap();
// Keep LLHTTPClient from adding an "Accept: application/llsd+xml" header
headers["Accept"] = "*/*";
// and use the expected content-type for a post, instead of the LLHTTPClient::postRaw() default of "application/octet-stream"
headers["Content-Type"] = "application/x-www-form-urlencoded";
// postRaw() takes ownership of the buffer and releases it later, so we need to allocate a new buffer here.
size_t size = openid_token.size();
U8 *data = new U8[size];
memcpy(data, openid_token.data(), size);
LLHTTPClient::postRaw(
openid_url,
data,
size,
new LLViewerMediaOpenIDResponder(),
headers);
}
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::openIDCookieResponse(const std::string &cookie)
{
LL_DEBUGS("MediaAuth") << "Cookie received: \"" << cookie << "\"" << LL_ENDL;
sOpenIDCookie += cookie;
setOpenIDCookie();
}
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::cleanupClass()
@@ -309,7 +742,10 @@ LLViewerMediaImpl::LLViewerMediaImpl(const std::string& media_url,
mTextureUsedWidth(0),
mTextureUsedHeight(0),
mSuspendUpdates(false),
mVisible(true)
mVisible(true),
mHasFocus(false),
mClearCache(false),
mBackgroundColor(LLColor4::white)
{
createMediaSource();
}
@@ -379,10 +815,10 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type)
LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height)
{
std::string plugin_basename = LLMIMETypes::implType(media_type);
if(plugin_basename.empty())
{
LL_WARNS("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL;
LL_WARNS_ONCE("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL;
}
else
{
@@ -391,16 +827,29 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
std::string user_data_path = gDirUtilp->getOSUserAppDir();
user_data_path += gDirUtilp->getDirDelimiter();
// Fix for EXT-5960 - make browser profile specific to user (cache, cookies etc.)
// If the linden username returned is blank, that can only mean we are
// at the login page displaying login Web page or Web browser test via Develop menu.
// In this case we just use whatever gDirUtilp->getOSUserAppDir() gives us (this
// is what we always used before this change)
std::string linden_user_dir = gDirUtilp->getLindenUserDir(true);
if ( ! linden_user_dir.empty() )
{
// gDirUtilp->getLindenUserDir() is whole path, not just Linden name
user_data_path = linden_user_dir;
user_data_path += gDirUtilp->getDirDelimiter();
};
// See if the plugin executable exists
llstat s;
if(LLFile::stat(launcher_name, &s))
{
LL_WARNS("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL;
LL_WARNS_ONCE("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL;
llassert(false); // Fail in debugging mode.
}
else if(LLFile::stat(plugin_name, &s))
{
LL_WARNS("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL;
LL_WARNS_ONCE("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL;
llassert(false); // Fail in debugging mode.
}
else
@@ -421,7 +870,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
// collect 'javascript enabled' setting from prefs and send to embedded browser
bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" );
media_source->setJavascriptEnabled( javascript_enabled );
bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging");
media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled );
@@ -463,7 +912,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
// and unconditionally set the mime type
mMimeType = media_type;
LLPluginClassMedia* media_source = newSourceFromMediaType(media_type, this, mMediaWidth, mMediaHeight);
LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight);
if (media_source)
{
@@ -471,6 +920,8 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
media_source->setLoop(mMediaLoop);
media_source->setAutoScale(mMediaAutoScale);
media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent());
media_source->focus(mHasFocus);
media_source->setBackgroundColor(mBackgroundColor);
if(gSavedSettings.getBOOL("BrowserIgnoreSSLCertErrors"))
{
@@ -484,6 +935,23 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
std::string ca_path = gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "CA.pem" );
media_source->addCertificateFilePath( ca_path );
if(mClearCache)
{
mClearCache = false;
media_source->clear_cache();
}
// TODO: Only send cookies to plugins that need them
// Ideally, the plugin should tell us whether it handles cookies or not -- either via the init response or through a separate message.
// Due to the ordering of messages, it's possible we wouldn't get that information back in time to send cookies before sending a navigate message,
// which could cause odd race conditions.
std::string all_cookies = LLViewerMedia::getCookieStore()->getAllCookies();
lldebugs << "setting cookies: " << all_cookies << llendl;
if(!all_cookies.empty())
{
media_source->set_cookies(all_cookies);
}
mPluginBase = media_source;
return true;
@@ -585,6 +1053,8 @@ void LLViewerMediaImpl::setVolume(F32 volume)
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::focus(bool focus)
{
mHasFocus = focus;
LLPluginClassMedia* plugin = getMediaPlugin();
if (plugin)
{
@@ -601,20 +1071,27 @@ void LLViewerMediaImpl::focus(bool focus)
}
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseDown(S32 x, S32 y)
bool LLViewerMediaImpl::hasFocus() const
{
// FIXME: This might be able to be a bit smarter by hooking into LLViewerMediaFocus, etc.
return mHasFocus;
}
void LLViewerMediaImpl::clearCache()
{
LLPluginClassMedia* plugin = getMediaPlugin();
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
if (plugin)
if(plugin)
{
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, LEFT_BUTTON, x, y, 0);
plugin->clear_cache();
}
else
{
mClearCache = true;
}
}
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseUp(S32 x, S32 y)
void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
{
LLPluginClassMedia* plugin = getMediaPlugin();
scaleMouse(&x, &y);
@@ -622,12 +1099,12 @@ void LLViewerMediaImpl::mouseUp(S32 x, S32 y)
mLastMouseY = y;
if (plugin)
{
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, LEFT_BUTTON, x, y, 0);
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, button, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseMove(S32 x, S32 y)
void LLViewerMediaImpl::mouseUp(S32 x, S32 y, MASK mask, S32 button)
{
LLPluginClassMedia* plugin = getMediaPlugin();
scaleMouse(&x, &y);
@@ -635,12 +1112,12 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y)
mLastMouseY = y;
if (plugin)
{
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, LEFT_BUTTON, x, y, 0);
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, button, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y)
void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask)
{
LLPluginClassMedia* plugin = getMediaPlugin();
scaleMouse(&x, &y);
@@ -648,7 +1125,96 @@ void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y)
mLastMouseY = y;
if (plugin)
{
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, LEFT_BUTTON, x, y, 0);
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
//static
void LLViewerMediaImpl::scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y)
{
LLPluginClassMedia* plugin = getMediaPlugin();
F32 texture_x = texture_coords.mV[VX];
F32 texture_y = texture_coords.mV[VY];
// Deal with repeating textures by wrapping the coordinates into the range [0, 1.0)
texture_x = fmodf(texture_x, 1.0f);
if(texture_x < 0.0f)
texture_x = 1.0 + texture_x;
texture_y = fmodf(texture_y, 1.0f);
if(texture_y < 0.0f)
texture_y = 1.0 + texture_y;
// scale x and y to texel units.
*x = llround(texture_x * plugin->getTextureWidth());
*y = llround((1.0f - texture_y) * plugin->getTextureHeight());
// Adjust for the difference between the actual texture height and the amount of the texture in use.
*y -= (plugin->getTextureHeight() - plugin->getHeight());
}
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords, MASK mask, S32 button)
{
LLPluginClassMedia* plugin = getMediaPlugin();
if(plugin)
{
S32 x, y;
scaleTextureCoords(texture_coords, &x, &y);
mouseDown(x, y, mask, button);
}
}
void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords, MASK mask, S32 button)
{
LLPluginClassMedia* plugin = getMediaPlugin();
if(plugin)
{
S32 x, y;
scaleTextureCoords(texture_coords, &x, &y);
mouseUp(x, y, mask, button);
}
}
void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords, MASK mask)
{
LLPluginClassMedia* plugin = getMediaPlugin();
if(plugin)
{
S32 x, y;
scaleTextureCoords(texture_coords, &x, &y);
mouseMove(x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button)
{
LLPluginClassMedia* plugin = getMediaPlugin();
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
if (plugin)
{
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, button, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::scrollWheel(S32 x, S32 y, MASK mask)
{
LLPluginClassMedia* plugin = getMediaPlugin();
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
if (plugin)
{
plugin->scrollEvent(x, y, mask);
}
}
@@ -658,7 +1224,7 @@ void LLViewerMediaImpl::onMouseCaptureLost()
LLPluginClassMedia* plugin = getMediaPlugin();
if (plugin)
{
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, LEFT_BUTTON, mLastMouseX, mLastMouseY, 0);
plugin->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, 0, mLastMouseX, mLastMouseY, 0);
}
}
@@ -676,6 +1242,18 @@ BOOL LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask)
return TRUE;
}
//////////////////////////////////////////////////////////////////////////////////////////
const std::string& LLViewerMediaImpl::getName() const
{
LLPluginClassMedia* plugin = getMediaPlugin();
if (plugin)
{
return plugin->getMediaName();
}
return LLStringUtil::null;
};
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::navigateHome()
{
@@ -787,7 +1365,7 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask)
if(!result)
{
LLSD native_key_data = LLSD::emptyMap();
LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData();
result = plugin->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask, native_key_data);
// Since the viewer internal event dispatching doesn't give us key-up events, simulate one here.
@@ -810,7 +1388,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char)
if (uni_char >= 32 // discard 'control' characters
&& uni_char != 127) // SDL thinks this is 'delete' - yuck.
{
LLSD native_key_data = LLSD::emptyMap();
LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData();
plugin->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE), native_key_data);
}
@@ -883,6 +1461,17 @@ void LLViewerMediaImpl::updateMovieImage(const LLUUID& uuid, BOOL active)
void LLViewerMediaImpl::update()
{
LLPluginClassMedia* plugin = getMediaPlugin();
if(plugin)
{
// If we didn't just create the impl, it may need to get cookie updates.
if(!sUpdatedCookies.empty())
{
// TODO: Only send cookies to plugins that need them
plugin->set_cookies(sUpdatedCookies);
}
}
if (!plugin)
{
return;
@@ -962,21 +1551,21 @@ void LLViewerMediaImpl::updateImagesMediaStreams()
}
LLViewerMediaTexture* placeholder_image = (LLViewerMediaTexture*)LLViewerTextureManager::getFetchedTexture( mTextureId );
LLPluginClassMedia* plugin = getMediaPlugin();
placeholder_image->getLastReferencedTimer()->reset();
LLPluginClassMedia* plugin = getMediaPlugin();
if (mNeedsNewTexture
|| placeholder_image->getUseMipMaps()
|| ! placeholder_image->mIsMediaTexture
|| !placeholder_image->mIsMediaTexture
|| (placeholder_image->getWidth() != plugin->getTextureWidth())
|| (placeholder_image->getHeight() != plugin->getTextureHeight())
|| (mTextureUsedWidth != plugin->getWidth())
|| (mTextureUsedHeight != plugin->getHeight())
)
{
llinfos << "initializing media placeholder" << llendl;
llinfos << "movie image id " << mTextureId << llendl;
LL_DEBUGS("Media") << "initializing media placeholder" << LL_ENDL;
LL_DEBUGS("Media") << "movie image id " << mTextureId << LL_ENDL;
int texture_width = plugin->getTextureWidth();
int texture_height = plugin->getTextureHeight();
@@ -990,7 +1579,9 @@ void LLViewerMediaImpl::updateImagesMediaStreams()
// MEDIAOPT: seems insane that we actually have to make an imageraw then
// immediately discard it
LLPointer<LLImageRaw> raw = new LLImageRaw(texture_width, texture_height, texture_depth);
raw->clear(0x0f, 0x0f, 0x0f, 0xff);
// Clear the texture to the background color, ignoring alpha.
// convert background color channels from [0.0, 1.0] to [0, 255];
raw->clear(int(mBackgroundColor.mV[VX] * 255.0f), int(mBackgroundColor.mV[VY] * 255.0f), int(mBackgroundColor.mV[VZ] * 255.0f), 0xff);
int discard_level = 0;
// ask media source for correct GL image format constants
@@ -1154,6 +1745,12 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* self, LLPluginClass
// Just chain the event to observers.
emitEvent(self, event);
}
////////////////////////////////////////////////////////////////////////////////
// virtual
void LLViewerMediaImpl::handleCookieSet(LLPluginClassMedia* self, const std::string &cookie)
{
LLViewerMedia::getCookieStore()->setCookies(cookie);
}
////////////////////////////////////////////////////////////////////////////////
// virtual
@@ -1221,3 +1818,13 @@ LLViewerMediaImpl::canPaste() const
return FALSE;
}
void LLViewerMediaImpl::setBackgroundColor(LLColor4 color)
{
mBackgroundColor = color;
LLPluginClassMedia* plugin = getMediaPlugin();
if(plugin)
{
plugin->setBackgroundColor(mBackgroundColor);
}
};

View File

@@ -33,15 +33,19 @@
#ifndef LLVIEWERMEDIA_H
#define LLVIEWERMEDIA_H
#include "llviewermediaeventemitter.h"
#include "llviewerpluginmanager.h"
#include "llfocusmgr.h"
#include "llpanel.h"
#include "llviewermediaeventemitter.h"
#include "llviewerpluginmanager.h"
#include "llpluginclassmedia.h"
#include "v4color.h"
#include "llurl.h"
class LLViewerMediaImpl;
class LLUUID;
class LLSD;
class LLViewerTexture;
class LLPluginCookieStore;
typedef LLPointer<LLViewerMediaImpl> viewer_media_t;
@@ -72,6 +76,33 @@ class LLViewerMedia
static void cleanupClass();
// Clear all cookies for all plugins
static void clearAllCookies();
// Clear all plugins' caches
static void clearAllCaches();
// Set the "cookies enabled" flag for all loaded plugins
static void setCookiesEnabled(bool enabled);
static LLPluginCookieStore *getCookieStore();
static void loadCookieFile();
static void saveCookieFile();
static void addCookie(const std::string &name, const std::string &value, const std::string &domain, const LLDate &expires, const std::string &path = std::string("/"), bool secure = false );
static void addSessionCookie(const std::string &name, const std::string &value, const std::string &domain, const std::string &path = std::string("/"), bool secure = false );
static void removeCookie(const std::string &name, const std::string &domain, const std::string &path = std::string("/") );
static void openIDSetup(const std::string &openid_url, const std::string &openid_token);
static void openIDCookieResponse(const std::string &cookie);
static LLSD getHeaders();
private:
static void setOpenIDCookie();
static LLPluginCookieStore *sCookieStore;
static LLURL sOpenIDURL;
static std::string sOpenIDCookie;
};
// Implementation functions not exported into header file
@@ -81,6 +112,8 @@ class LLViewerMediaImpl
LOG_CLASS(LLViewerMediaImpl);
public:
friend class LLViewerMedia;
LLViewerMediaImpl(const std::string& media_url,
const LLUUID& texture_id,
S32 media_width,
@@ -98,9 +131,6 @@ public:
LLPluginClassMedia* getMediaPlugin() const { return (LLPluginClassMedia*)mPluginBase; }
void setSize(int width, int height);
// Inherited from LLViewerPluginManager.
/*virtual*/ void update();
void play();
void stop();
void pause();
@@ -108,10 +138,16 @@ public:
void seek(F32 time);
void setVolume(F32 volume);
void focus(bool focus);
void mouseDown(S32 x, S32 y);
void mouseUp(S32 x, S32 y);
void mouseMove(S32 x, S32 y);
void mouseLeftDoubleClick(S32 x,S32 y );
// True if the impl has user focus.
bool hasFocus() const;
void mouseDown(S32 x, S32 y, MASK mask, S32 button = 0);
void mouseUp(S32 x, S32 y, MASK mask, S32 button = 0);
void mouseMove(S32 x, S32 y, MASK mask);
void mouseDown(const LLVector2& texture_coords, MASK mask, S32 button = 0);
void mouseUp(const LLVector2& texture_coords, MASK mask, S32 button = 0);
void mouseMove(const LLVector2& texture_coords, MASK mask);
void mouseDoubleClick(S32 x,S32 y, MASK mask, S32 button = 0);
void scrollWheel(S32 x, S32 y, MASK mask);
void mouseCapture();
void navigateHome();
@@ -124,11 +160,14 @@ public:
std::string getMediaURL() { return mMediaURL; }
std::string getHomeURL() { return mHomeURL; }
void setHomeURL(const std::string& home_url) { mHomeURL = home_url; }
void clearCache();
std::string getMimeType() { return mMimeType; }
void getTextureSize(S32 *texture_width, S32 *texture_height);
void scaleMouse(S32 *mouse_x, S32 *mouse_y);
void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y);
void updateMovieImage(const LLUUID& image_id, BOOL active);
void update();
void updateImagesMediaStreams();
LLUUID getMediaTextureID();
@@ -166,7 +205,7 @@ public:
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) { return FALSE; };
/*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
/*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) {return FALSE; };
/*virtual*/ const std::string& getName() const { return LLStringUtil::null; };
/*virtual*/ const std::string& getName() const;
/*virtual*/ BOOL isView() const { return FALSE; };
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {};
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {};
@@ -174,6 +213,7 @@ public:
// Inherited from LLPluginClassMediaOwner
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, LLPluginClassMediaOwner::EMediaEvent);
/*virtual*/ void handleCookieSet(LLPluginClassMedia* self, const std::string &cookie);
// LLEditMenuHandler overrides
/*virtual*/ void cut();
@@ -184,8 +224,10 @@ public:
/*virtual*/ void paste();
/*virtual*/ BOOL canPaste() const;
public:
bool mNeedsNewTexture;
void setBackgroundColor(LLColor4 color);
private:
// a single media url with some data and an impl.
LLUUID mTextureId;
bool mMovieImageHasMips;
@@ -198,11 +240,13 @@ public:
S32 mMediaHeight;
bool mMediaAutoScale;
bool mMediaLoop;
bool mNeedsNewTexture;
S32 mTextureUsedWidth;
S32 mTextureUsedHeight;
bool mSuspendUpdates;
bool mVisible;
bool mHasFocus;
bool mClearCache;
LLColor4 mBackgroundColor;
private:
/*LLViewerMediaTexture*/LLViewerTexture *updatePlaceholderImage();

View File

@@ -62,9 +62,6 @@
#include "llviewernetwork.h"
#include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived
#include "sgmemstat.h"
#if LL_LCD_COMPILE
#include "lllcd.h"
#endif
class StatAttributes
@@ -201,10 +198,7 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] =
// ST_TEX_BAKES
StatAttributes("Texture Bakes", FALSE, FALSE),
// ST_TEX_REBAKES
StatAttributes("Texture Rebakes", FALSE, FALSE),
// ST_LOGITECH_KEYBOARD
StatAttributes("Logitech LCD", FALSE, FALSE)
StatAttributes("Texture Rebakes", FALSE, FALSE)
};
@@ -699,14 +693,6 @@ void update_statistics(U32 frame_count)
mem_stats_timer.reset();
}
}
#if LL_LCD_COMPILE
bool LCDenabled = gLcdScreen->Enabled();
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LOGITECH_LCD, LCDenabled);
#else
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LOGITECH_LCD, false);
#endif
}
class ViewerStatsResponder : public LLHTTPClient::Responder

View File

@@ -181,9 +181,8 @@ public:
ST_WINDOW_HEIGHT = 55,
ST_TEX_BAKES = 56,
ST_TEX_REBAKES = 57,
ST_LOGITECH_LCD = 58,
ST_COUNT = 59
ST_COUNT = 58
};
@@ -282,7 +281,7 @@ public:
};
StatsAccumulator mAgentPositionSnaps;
private:
F64 mStats[ST_COUNT];

View File

@@ -35,11 +35,20 @@
#include "llweb.h"
#include "llviewerwindow.h"
#include "llwindow.h"
// Library includes
#include "llwindow.h" // spawnWebBrowser()
#include "llviewercontrol.h"
#include "llagent.h"
#include "llappviewer.h"
#include "llfloatermediabrowser.h"
#include "llparcel.h"
#include "llviewercontrol.h"
#include "llviewernetwork.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "sgversion.h"
// static
void LLWeb::initClass()
@@ -125,6 +134,64 @@ std::string LLWeb::escapeURL(const std::string& url)
return escaped_url;
}
//static
std::string LLWeb::expandURLSubstitutions(const std::string &url,
const LLSD &default_subs)
{
gCurrentVersion = llformat("%s %d.%d.%d.%d",
gVersionChannel,
gVersionMajor,
gVersionMinor,
gVersionPatch,
gVersionBuild );
LLSD substitution = default_subs;
substitution["VERSION"] = gCurrentVersion;
substitution["VERSION_MAJOR"] = gVersionMajor;
substitution["VERSION_MINOR"] = gVersionMinor;
substitution["VERSION_PATCH"] = gVersionPatch;
substitution["VERSION_BUILD"] = gVersionBuild;
substitution["CHANNEL"] = gVersionChannel;
substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
substitution["SESSION_ID"] = gAgent.getSessionID();
substitution["FIRST_LOGIN"] = gAgent.isFirstLogin();
// work out the current language
std::string lang = LLUI::getLanguage();
if (lang == "en-us")
{
// *HACK: the correct fix is to change English.lproj/language.txt,
// but we're late in the release cycle and this is a less risky fix
lang = "en";
}
substitution["LANGUAGE"] = lang;
// find the region ID
LLUUID region_id;
LLViewerRegion *region = gAgent.getRegion();
if (region)
{
region_id = region->getRegionID();
}
substitution["REGION_ID"] = region_id;
// find the parcel local ID
S32 parcel_id = 0;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
parcel_id = parcel->getLocalID();
}
substitution["PARCEL_ID"] = llformat("%d", parcel_id);
// expand all of the substitution strings and escape the url
std::string expanded_url = url;
LLStringUtil::format(expanded_url, substitution);
return LLWeb::escapeURL(expanded_url);
}
// virtual
void LLWeb::URLLoader::load(const std::string& url)
{

View File

@@ -57,6 +57,10 @@ public:
// Returns escaped (eg, " " to "%20") url
static std::string escapeURL(const std::string& url);
/// Expands various strings like [LANG], [VERSION], etc. in a URL
static std::string expandURLSubstitutions(const std::string &url,
const LLSD &default_subs);
class URLLoader : public LLAlertDialog::URLLoader
{
virtual void load(const std::string& url);

File diff suppressed because it is too large Load Diff

View File

@@ -837,7 +837,7 @@ class Linux_x86_64Manifest(LinuxManifest):
self.path("libSDL-1.2.so*")
self.path("libELFIO.so")
self.path("libjpeg.so*")
self.path("libpng.so*")
self.path("libpng*.so*")
self.path("libz.so*")
# OpenAL