1 // Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_SYSTEM_LOCALE_HH_
6 #define COMMON_SYSTEM_LOCALE_HH_
12 namespace pkgmgr_common {
15 #define EXPORT_API __attribute__((visibility("default")))
18 class EXPORT_API SystemLocale {
22 virtual ~IEvent() = default;
23 virtual void OnChanged(const std::string& locale) = 0;
26 static SystemLocale& GetInst();
27 const std::string& Get() const;
28 void RegisterEvent(IEvent* listener);
29 void UnRegisterEvent();
35 static void LanChangedCb(keynode_t* node, void* user_data);
40 IEvent* listener_ = nullptr;
43 } // namespace pkgmgr_common
45 #endif // COMMON_SYSTEM_LOCALE_HH_