| 
    EvEmu
    0.8.4
    
   11 September 2021 
   | 
 
Handles distribution of character and related game images. More...
#include "ImageServer.h"


Classes | |
| class | Lock | 
Public Member Functions | |
| ImageServer () | |
| void | Run () | 
| void | Stop () | 
| std::string & | url () | 
| void | ReportNewImage (uint32 accountID, std::shared_ptr< std::vector< char > > imageData) | 
| void | ReportNewCharacter (uint32 creatorAccountID, uint32 characterID) | 
| std::string | GetFilePath (std::string &category, uint32 id, uint32 size) | 
| std::shared_ptr< std::vector < char > >  | GetImage (std::string &category, uint32 id, uint32 size) | 
  Public Member Functions inherited from Singleton< ImageServer > | |
| Singleton () | |
| Primary constructor.  More... | |
Static Public Attributes | |
| static const char *const | Categories [] | 
| static const uint32 | CategoryCount = 5 | 
| static const char *const | FallbackURL = "http://image.eveonline.com/" | 
Private Member Functions | |
| void | RunInternal () | 
| bool | ValidateCategory (std::string &category) | 
| bool | ValidateSize (std::string &category, uint32 size) | 
Private Attributes | |
| std::unordered_map< uint32,  std::shared_ptr< std::vector < char > > >  | _limboImages | 
| std::shared_ptr < boost::asio::detail::thread >  | _ioThread | 
| std::shared_ptr < boost::asio::io_context >  | _io | 
| std::shared_ptr < ImageServerListener >  | _listener | 
| std::string | _url | 
| std::string | _basePath | 
| boost::asio::detail::mutex | _limboLock | 
Additional Inherited Members | |
  Static Public Member Functions inherited from Singleton< ImageServer > | |
| static ImageServer & | get () | 
  Static Protected Attributes inherited from Singleton< ImageServer > | |
| static std::shared_ptr < ImageServer >  | mInstance | 
Handles distribution of character and related game images.
A very limited HTTP server that can efficiently deliver character and other images to clients Uses asio for efficient asynchronous network communication
Definition at line 48 of file ImageServer.h.
| ImageServer::ImageServer | ( | ) | 
Definition at line 42 of file ImageServer.cpp.
References _basePath, _url, Categories, CategoryCount, CreateDirectory(), sConfig, and sLog.

Definition at line 151 of file ImageServer.cpp.
References _basePath.
Referenced by GetImage(), and ReportNewCharacter().

| std::shared_ptr< std::vector< char > > ImageServer::GetImage | ( | std::string & | category, | 
| uint32 | id, | ||
| uint32 | size | ||
| ) | 
Definition at line 115 of file ImageServer.cpp.
References GetFilePath(), sLog, ValidateCategory(), and ValidateSize().

Definition at line 77 of file ImageServer.cpp.
References _limboImages, _limboLock, GetFilePath(), and sLog.

| void ImageServer::ReportNewImage | ( | uint32 | accountID, | 
| std::shared_ptr< std::vector< char > > | imageData | ||
| ) | 
Definition at line 65 of file ImageServer.cpp.
References _limboImages, _limboLock, and sLog.
| void ImageServer::Run | ( | ) | 
Definition at line 191 of file ImageServer.cpp.
References _ioThread, and RunInternal().

      
  | 
  private | 
Definition at line 202 of file ImageServer.cpp.
References _io, and _listener.
Referenced by Run().

| void ImageServer::Stop | ( | ) | 
Definition at line 196 of file ImageServer.cpp.
References _io, and _ioThread.
| std::string & ImageServer::url | ( | ) | 
Definition at line 186 of file ImageServer.cpp.
References _url.
      
  | 
  private | 
Definition at line 178 of file ImageServer.cpp.
References Categories.
Referenced by GetImage().

      
  | 
  private | 
Definition at line 163 of file ImageServer.cpp.
Referenced by GetImage().

      
  | 
  private | 
Definition at line 80 of file ImageServer.h.
Referenced by GetFilePath(), and ImageServer().
      
  | 
  private | 
Definition at line 77 of file ImageServer.h.
Referenced by RunInternal(), and Stop().
      
  | 
  private | 
Definition at line 76 of file ImageServer.h.
      
  | 
  private | 
Definition at line 75 of file ImageServer.h.
Referenced by ReportNewCharacter(), and ReportNewImage().
      
  | 
  private | 
Definition at line 81 of file ImageServer.h.
Referenced by ReportNewCharacter(), and ReportNewImage().
      
  | 
  private | 
Definition at line 78 of file ImageServer.h.
Referenced by RunInternal().
      
  | 
  private | 
Definition at line 79 of file ImageServer.h.
Referenced by ImageServer(), and url().
      
  | 
  static | 
Definition at line 63 of file ImageServer.h.
Referenced by ImageServer(), ImageServerConnection::ProcessHeaders(), and ValidateCategory().
      
  | 
  static | 
Definition at line 64 of file ImageServer.h.
Referenced by ImageServer(), and ImageServerConnection::ProcessHeaders().
      
  | 
  static | 
Definition at line 68 of file ImageServer.h.
Referenced by ImageServerConnection::RedirectLocation().