Twitch SDK (Internal)
settingrepository.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * Twitch Broadcasting SDK
3 *
4 * This software is supplied under the terms of a license agreement with Twitch Interactive, Inc. and
5 * may not be copied or used except in accordance with the terms of that agreement
6 * Copyright (c) 2012-2016 Twitch Interactive, Inc.
7 *********************************************************************************************/
8 
9 #pragma once
10 
13 
14 #include <memory>
15 #include <vector>
16 #include <string>
17 #include <unordered_map>
18 
19 
20 namespace ttv
21 {
22  class SettingRepository;
23  class IMutex;
24 }
25 
26 
28 {
29 public:
31 
32  void SetSetting(const std::string& key, const std::string& value);
33  bool GetSetting(const std::string& key, std::string& value);
34  bool RemoveSetting(const std::string& key);
35 
36 protected:
37  std::unordered_map<std::string, std::string> mSettings;
38  std::shared_ptr<IMutex> mMutex;
39 };
void SetSetting(const std::string &key, const std::string &value)
std::unordered_map< std::string, std::string > mSettings
Definition: settingrepository.h:37
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
std::shared_ptr< IMutex > mMutex
Definition: settingrepository.h:38
bool GetSetting(const std::string &key, std::string &value)
bool RemoveSetting(const std::string &key)
Definition: settingrepository.h:27