FreeRDP
SDL3ResourceManager Class Reference

#include <sdl3_resource_manager.hpp>

Inheritance diagram for SDL3ResourceManager:
Collaboration diagram for SDL3ResourceManager:

Public Member Functions

 SDL3ResourceManager (const SDL3ResourceManager &other)=delete
 
 SDL3ResourceManager (const SDL3ResourceManager &&other)=delete
 
SDL3ResourceManageroperator= (const SDL3ResourceManager &other)=delete
 
SDL3ResourceManageroperator= (SDL3ResourceManager &&other)=delete
 
- Public Member Functions inherited from SDLResourceManager
 SDLResourceManager (const SDLResourceManager &other)=delete
 
 SDLResourceManager (const SDLResourceManager &&other)=delete
 
SDLResourceManager operator= (const SDLResourceManager &other)=delete
 
SDLResourceManageroperator= (SDLResourceManager &&other)=delete
 

Static Public Member Functions

static SDL_IOStream * get (const std::string &type, const std::string &id)
 
- Static Public Member Functions inherited from SDLResourceManager
static std::string typeFonts ()
 
static std::string typeImages ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from SDLResourceManager
static void insert (const std::string &type, const std::string &id, const std::vector< unsigned char > &data)
 
static const std::vector< unsigned char > * data (const std::string &type, const std::string &id)
 
static std::string filename (const std::string &type, const std::string &id)
 
static bool useCompiledResources ()
 

Detailed Description

FreeRDP: A Remote Desktop Protocol Implementation

Copyright 2023 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 27 of file sdl3_resource_manager.hpp.

Member Function Documentation

◆ get()

SDL_IOStream * SDL3ResourceManager::get ( const std::string &  type,
const std::string &  id 
)
static

FreeRDP: A Remote Desktop Protocol Implementation

Copyright 2023 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 30 of file sdl3_resource_manager.cpp.

31 {
32  if (useCompiledResources())
33  {
34  auto d = data(type, id);
35  if (!d)
36  return nullptr;
37 
38  return SDL_IOFromConstMem(d->data(), d->size());
39  }
40 
41  auto name = filename(type, id);
42  return SDL_IOFromFile(name.c_str(), "rb");
43 }

The documentation for this class was generated from the following files: