tekuser.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Kevin McBride                                   *
00003  *   kevin@planetsaphire.com                                               *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Library General Public License as       *
00007  *   published by the Free Software Foundation; either version 2 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU Library General Public     *
00016  *   License along with this program; if not, write to the                 *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef TEKUSER_H_061B46F4_3D58_11DA_9D30_000BDBC434D9
00022 #define TEKUSER_H_061B46F4_3D58_11DA_9D30_000BDBC434D9
00023 
00024 #ifndef     TEKLTI_H_C35A2A4C_D475_11D9_90BC_000BDBC434D9
00025 #error      This file must be included from <teklti.h>
00026 #endif      /* TEKLTI_H_C35A2A4C_D475_11D9_90BC_000BDBC434D9 */
00027 
00028 
00029 TEKUUIDIMPORT(UTekUser);
00030 
00031 
00032 enum TekUserType
00033 {
00034       TekUserType_Any = 0x0000,
00035       TekUserType_POSIX = 0x0001,
00036       TekUserType_Linux = 0x0002,
00037       TekUserType_POSIX_RO = 0x0004,
00038       TekUserType_Linux_RO = 0x0008,
00039       TekUserType_Windows = 0x0010
00040 };
00041 
00042 
00050 class TekUser : public TekStd
00051 {
00052 public:
00053   TekUser();
00054   ~TekUser();
00055 
00056     virtual TEKERR put_TekUserInfo(struct TekUserInfo * SUInfo) = 0;
00057     virtual TEKERR put_Description(const uchar_t * NewDescription) = 0;
00058     virtual TEKERR get_Description(uchar_t ** RetVal) = 0;
00059     virtual TEKERR get_GroupID(gid_t * RetVal) = 0;
00060     virtual TEKERR get_HomeDir(uchar_t ** RetVal) = 0;
00061     virtual TEKERR get_UserID(uid_t * RetVal) = 0;
00062     virtual TEKERR get_Username(uchar_t ** RetVal) = 0;
00063     virtual TEKERR put_GroupID(gid_t NewGroupID) = 0;
00064     virtual TEKERR put_HomeDir(const uchar_t * NewHomeDir) = 0;
00065     virtual TEKERR put_Password(uchar_t * NewPassword) = 0;
00066     virtual TEKERR put_UserID(uid_t NewID) = 0;
00067     virtual TEKERR put_Username(const uchar_t * NewUsername) = 0;
00068     virtual TEKERR Save() = 0;
00069 
00070 };
00071 
00072 
00073 TEKLTI_DECLSPEC TEKERR TekUserInfoCreate(
00074       struct TekUserInfo * UserInfo,
00075       TekUser ** RetVal,
00076       TekUserType UserType = TekUserType_Any
00077 );
00078 
00079 #endif /* TEKUSER_H_061B46F4_3D58_11DA_9D30_000BDBC434D9 */
00080 
SourceForge.net Logo  Technical Library Template Interface Project Page