00001 #ifndef user_header_included 00002 #define user_header_included 00003 00004 00005 // 00006 // Copyright 2002, Lowell Boggs Jr. 00007 // 00008 // This file or directory, containing source code for a computer program, 00009 // is Copyrighted by Lowell Boggs, Jr. 987 Regency Drive, Lewisville 00010 // TX (USA), 75067. You may use, copy, modify, and distribute this 00011 // source file without charge or obligation so long as you agree to 00012 // the following: 00013 // 00014 // 1. You must indemnify Lowell Boggs against any and all financial 00015 // obligations caused by its use, misuse, function, or malfunction. 00016 // Further, you acknowledge that there is no warranty of any kind, 00017 // whatsoever. 00018 // 00019 // 2. You agree not to attempt to patent any portion of this original 00020 // work -- though you may attempt to patent your own extensions to 00021 // it if you so choose. 00022 // 00023 // 3. You keep this copyright notice with the file and all copies 00024 // of the file and do not change it anyway except language translation. 00025 // 00026 // You are responsible for enforcing your own compliance with these 00027 // conditions and may not use this source file if you cannot agree to the 00028 // above terms and conditions. 00029 00030 00031 00032 00037 00038 #include <string> 00039 00040 namespace cxxtls 00041 { 00042 00043 struct UserInfo 00044 // 00049 // 00050 { 00051 std::string name_; 00052 std::string password_; 00053 std::string home_dir_; 00054 std::string shell_; 00055 long uid_; 00056 long gid_; 00057 00058 static UserInfo get(); 00059 static UserInfo get(long user); 00060 static UserInfo get(char const *); 00061 00062 static UserInfo get(std::string const &s) 00063 { 00064 return get(s.c_str()); 00065 } 00066 00067 00068 }; 00069 00070 } // namespace cxxtls 00071 00072 #endif