All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IResourceStream.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Streaming.h"
7 #include "Resources.h"
8 #include "BlockCoverageTrees.h"
9 #include <string>
10 
11 namespace Eegeo
12 {
13  namespace Streaming
14  {
16  {
17  public:
18  virtual ~IResourceStream() { }
19 
20  virtual uint averageStreamingSize() = 0;
21  virtual uint priority() const = 0;
22  virtual Resources::IPlaceholderBuilder *placeholderBuilder() = 0;
23  virtual ResourceStreamComponent* resourceStreamComponentFor(const MortonKey& key) const = 0;
24  virtual bool HasResourceStreamComponentFor(const MortonKey& key) const = 0;
25 
26  virtual Resources::IResourceBuilder* GetDefaultResourceBuilder() = 0;
27  virtual Resources::IResourceBuilder* GetResourceBuilderByKey(const std::string& key) = 0;
28 
29  virtual void AddStreamingObserver(IStreamingObserver *pStreamingObserver)=0;
30  virtual void RemoveStreamingObserver(IStreamingObserver *pStreamingObserver)=0;
31  virtual void NotifyStreamingObserversResourceAdded(const MortonKey& key)=0;
32  virtual void NotifyStreamingObserversResourceRemoved(const MortonKey& key)=0;
33 
34  virtual void LogFailedRequest(const MortonKey& key, float totalTimeTakenMilliseconds) = 0;
35 
36  virtual void LogSuccessfulRequest(const MortonKey& key,
37  size_t rawResourceSize,
38  bool loadedFromCache,
39  float totalTimeTakenMilliseconds,
40  size_t preDecompressBytesRead) = 0;
41 
42  virtual BlockCoverageTrees::PrioritisedBlockCoverageTreeList& GetCoverageTreeList() const = 0;
43  virtual ResourceStreamComponent* FindResourceStreamComponent(const std::string& name) const = 0;
44  virtual bool IsValid() const = 0;
45  };
46  }
47 }
48 
49