Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
LanguageManager.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2014 - 2021 Symless Ltd.
4 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
5 */
6
7#pragma once
8
9#include "deskflow/AppUtil.h"
10#include <vector>
11
12namespace deskflow::languages {
13
15{
16 std::vector<std::string> m_remoteLanguages;
17 std::vector<std::string> m_localLanguages;
18
19public:
20 explicit LanguageManager(
21 const std::vector<std::string> &localLanguages = AppUtil::instance().getKeyboardLayoutList()
22 );
23
28 void setRemoteLanguages(const std::string_view &remoteLanguages);
29
34 const std::vector<std::string> &getRemoteLanguages() const;
35
40 const std::vector<std::string> &getLocalLanguages() const;
41
47 std::string getMissedLanguages() const;
48
53 std::string getSerializedLocalLanguages() const;
54
60 bool isLanguageInstalled(const std::string &language) const;
61};
62
63} // namespace deskflow::languages
static AppUtil & instance()
Definition AppUtil.cpp:31
std::string getMissedLanguages() const
getMissedLanguages getter for missed languages on local machine
Definition LanguageManager.cpp:57
const std::vector< std::string > & getLocalLanguages() const
getLocalLanguages getter for local languages
Definition LanguageManager.cpp:52
LanguageManager(const std::vector< std::string > &localLanguages=AppUtil::instance().getKeyboardLayoutList())
Definition LanguageManager.cpp:30
bool isLanguageInstalled(const std::string &language) const
isLanguageInstalled checks if language is installed
Definition LanguageManager.cpp:78
void setRemoteLanguages(const std::string_view &remoteLanguages)
setRemoteLanguages sets remote languages
Definition LanguageManager.cpp:35
const std::vector< std::string > & getRemoteLanguages() const
getRemoteLanguages getter for remote languages
Definition LanguageManager.cpp:47
std::string getSerializedLocalLanguages() const
getSerializedLocalLanguages getter for local serialized languages
Definition LanguageManager.cpp:73
Definition LanguageManager.cpp:28