Proof-reading - fixed one usage of the i18n plural form (it wasn't doing before,...
[kdeadmin.git] / kuser / sid.h
blobfcbfb4f86f468b7a92e35eba98f0e3161226b7a3
1 /*
2 * Copyright (c) 2004 Szombathelyi György <gyurco@freemail.hu>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 **/
20 #ifndef _SID_H_
21 #define _SID_H_
23 #include <QString>
25 class SID {
27 public:
28 SID();
29 SID( const QString &sid );
30 SID( const SID &sid );
31 ~SID();
33 bool operator== ( const SID &sid ) const;
34 bool operator!= ( const SID &sid ) const;
35 bool isEmpty() const;
36 void setSID( const QString &sid );
37 void setRID( const QString &rid );
38 void setRID( uint rid );
39 void setDOM( const QString &dom );
40 const QString &getSID() const;
41 uint getRID() const ;
42 const QString &getDOM() const;
44 static uint uid2rid( uint uid );
45 static uint gid2rid( uint gid );
46 static void setAlgRidBase( uint base ) { mAlgRidBase = base; }
47 static uint getAlgRidBase() { return mAlgRidBase; }
48 private:
49 void updateSID();
50 QString mSid, mDom;
51 uint mRid;
52 static uint mAlgRidBase;
55 #endif //_SID_H_