summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.h
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2009-10-30 12:33:25 -0700
committerMonroe Linden <monroe@lindenlab.com>2009-10-30 12:33:25 -0700
commit043d2d1f9dbdacff46e24f73b184dac8532d2db6 (patch)
tree87229158515368e5ac950ef16ff7e72192e99c3d /indra/newview/llviewermedia.h
parenta98591802a46a0ae5b09bbc3eb530d76b49cb2b4 (diff)
Hooks for the "nearby media" UI.
Added LLViewerMediaImpl::set/getDisabled(), which will prevent a media instance from loading. Added LLViewerMedia::set/getInWorldMediaDisabled(), which will disable all inworld media fom loading. Added LLViewerMedia::getPriorityList() and made the priority comparitor public.
Diffstat (limited to 'indra/newview/llviewermedia.h')
-rw-r--r--indra/newview/llviewermedia.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 5444abf854..043259a235 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -66,10 +66,15 @@ private:
observerListType mObservers;
};
+class LLViewerMediaImpl;
+
class LLViewerMedia
{
LOG_CLASS(LLViewerMedia);
public:
+
+ typedef std::vector<LLViewerMediaImpl*> impl_list;
+
// Special case early init for just web browser component
// so we can show login screen. See .cpp file for details. JC
@@ -97,6 +102,14 @@ class LLViewerMedia
static void mediaStop(void*);
static F32 getVolume();
static void muteListChanged();
+ static void setInWorldMediaDisabled(bool disabled);
+ static bool getInWorldMediaDisabled();
+
+ // Returns the priority-sorted list of all media impls.
+ static const impl_list &getPriorityList();
+
+ // This is the comparitor used to sort the list.
+ static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2)
};
// Implementation functions not exported into header file
@@ -179,6 +192,12 @@ public:
bool hasMedia();
bool isMediaFailed() { return mMediaSourceFailed; };
void resetPreviousMediaState();
+
+ void setDisabled(bool disabled) { mIsDisabled = disabled; };
+ bool isMediaDisabled() { return mIsDisabled; };
+
+ // returns true if this instance should not be loaded (disabled, muted object, crashed, etc.)
+ bool isForcedUnloaded();
ECursorType getLastSetCursor() { return mLastSetCursor; };
@@ -301,6 +320,7 @@ public:
bool mNeedsMuteCheck;
int mPreviousMediaState;
F64 mPreviousMediaTime;
+ bool mIsDisabled;
private:
BOOL mIsUpdated ;