2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
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 #ifndef TEMP_TEST_USER_H
18 #define TEMP_TEST_USER_H
21 #include <sys/types.h>
23 #include <common/gum-user-types.h>
25 class TemporaryTestUser {
27 TemporaryTestUser() = delete;
28 TemporaryTestUser(std::string userName, GumUserType userType, bool offline) :
38 uid_t getUid() const {return m_uid;}
39 uid_t getGid() const {return m_gid;}
41 void getUidString(std::string& uidstr) const {uidstr = std::to_string(static_cast<unsigned int>(m_uid));}
42 const std::string& getUserName() const {return m_userName;}
43 GumUserType getUserType() const {return m_userType;}
47 std::string m_userName;
48 GumUserType m_userType;