2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 ////////////////////////////////////////////////////////////////////////////////////////////////////
18 /// \defgroup <<Group Tag>> <<Group Name>>
19 /// \ingroup tag_NS_NPPService
21 ////////////////////////////////////////////////////////////////////////////////////////////////////
23 ////////////////////////////////////////////////////////////////////////////////////////////////////
24 /// \ingroup tag_NS_NPPService
25 /// \brief This file contains declaration of singleton class CnotificationpersistentservicePersonalizationManager which is
26 /// used to manage information of personality.
28 ////////////////////////////////////////////////////////////////////////////////////////////////////
30 #ifndef NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSONALIZATION_MANAGER_H_
31 #define NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSONALIZATION_MANAGER_H_
33 ////////////////////////////////////////////////////////////////////////////////////////////////////
35 ////////////////////////////////////////////////////////////////////////////////////////////////////
39 #include "ns_npp_personality.h"
41 typedef std::map<std::string, CNotificationpersistentservicePersonality *> Personality_Type;
44 * This class maintains information on creation of new personality or
45 * change of personality.
47 class CnotificationpersistentservicePersonalizationManager {
49 Personality_Type *m_pmPersonality; ///< list of personality
51 UI_32 m_uiUserId; ///< unique user id
53 std::string m_cCurrentPersonality; ///< current personality name
55 ////////////////////////////////////////////////////////////////////////////////////////////////
57 /// This function is used to create new Personality.
59 /// \param [IN] f_cpersonalityname
60 /// std::string - Personality name
62 /// \return EFrameworkunifiedStatus
63 // EFrameworkunifiedStatus - success or failure status
65 ////////////////////////////////////////////////////////////////////////////////////////////////
66 EFrameworkunifiedStatus CreatePersonality(const std::string &f_cpersonalityname);
69 ////////////////////////////////////////////////////////////////////////////////////////////////
70 /// CnotificationpersistentservicePersonalizationManager
71 /// Constructor of CnotificationpersistentservicePersonalizationManager class
77 ////////////////////////////////////////////////////////////////////////////////////////////////
78 CnotificationpersistentservicePersonalizationManager();
80 ////////////////////////////////////////////////////////////////////////////////////////////////
81 /// ~CnotificationpersistentservicePersonalizationManager
82 /// Destructor of CnotificationpersistentservicePersonalizationManager class
88 ////////////////////////////////////////////////////////////////////////////////////////////////
89 ~CnotificationpersistentservicePersonalizationManager();
91 ////////////////////////////////////////////////////////////////////////////////////////////////
92 /// NotificationpersistentserviceGetPersonality
93 /// This function is used to get the current personality.
95 /// \param [OUT] f_cpersonalityname
96 /// std::string - Personality name
98 /// \return EFrameworkunifiedStatus
99 // EFrameworkunifiedStatus - success or failure status
101 ////////////////////////////////////////////////////////////////////////////////////////////////
102 EFrameworkunifiedStatus NotificationpersistentserviceGetPersonality(std::string &f_cpersonalityname); // NOLINT (runtime/references)
104 ////////////////////////////////////////////////////////////////////////////////////////////////
105 /// NotificationpersistentserviceSetPersonality
106 /// This function is used to set the new personality.
108 /// \param [IN] f_cpersonalityname
109 /// std::string - Personality name
111 /// \return EFrameworkunifiedStatus
112 // EFrameworkunifiedStatus - success or failure status
114 ////////////////////////////////////////////////////////////////////////////////////////////////
115 EFrameworkunifiedStatus NotificationpersistentserviceSetPersonality(const std::string f_cpersonalityname);
117 ////////////////////////////////////////////////////////////////////////////////////////////////
118 /// NotificationpersistentserviceIsValidPersonality
119 /// Check if user is valid or not.
121 /// \param [IN] f_cpersonalityname
122 /// std::string - Personality name
125 /// TRUE - Valid user
126 /// FALSE - Not a valid user
128 ////////////////////////////////////////////////////////////////////////////////////////////////
129 BOOL NotificationpersistentserviceIsValidPersonality(const std::string f_cpersonalityname);
132 #endif // NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_PERSONALIZATION_MANAGER_H_