~ubuntu-branches/ubuntu/oneiric/suphp/oneiric

« back to all changes in this revision

Viewing changes to src/UserInfo.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Emmanuel Lacour
  • Date: 2009-08-03 15:15:38 UTC
  • mfrom: (8.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090803151538-pv7yhe6w1mqmceas
Tags: 0.7.1-1
* New upstream release (closes: #528379, #520182) 
* debian/NEWS: add information about AddHandler -> AddType change introduced
  in 0.6.2-2 (closes: #517805)
* debian/conf/suphp.conf, debian/patches/01_debian.dpatch: switch from
  application/x-httpd-php to application/x-httpd-suphp to allow
  simultaneous use of mod_suphp and mod_php (closes: #519005, #514725)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
    suPHP - (c)2002-2005 Sebastian Marsching <sebastian@marsching.com>
 
2
    suPHP - (c)2002-2008 Sebastian Marsching <sebastian@marsching.com>
3
3
 
4
4
    This file is part of suPHP.
5
5
 
38
38
     */
39
39
    class UserInfo {
40
40
    private:
41
 
        int uid;
 
41
        int uid;
42
42
    public:
43
 
        /**
44
 
         * Constructor without arguments.
45
 
         * Does not create a "valid" object, since it has no well defined UID
46
 
         */
47
 
        UserInfo();
48
 
        
49
 
        /**
50
 
         * Constructor (takes UID)
51
 
         */
52
 
        UserInfo(int uid);
53
 
        
54
 
        /**
55
 
         * Returns username
56
 
         */
57
 
        std::string getUsername() const throw (LookupException);
58
 
        
59
 
        /**
60
 
         * Returns UID
61
 
         */
62
 
        int getUid() const;
63
 
 
64
 
        /**
65
 
         * Returns primary group
66
 
         */
67
 
        GroupInfo getGroupInfo() const throw (LookupException);
68
 
        
69
 
        /**
70
 
         * Checks wheter user is super-user
71
 
         */
72
 
        bool isSuperUser();
73
 
        
74
 
        /**
75
 
         * Compares to UserInfo objects for equality (same UID)
76
 
         */
77
 
        bool operator==(const UserInfo& uinfo) const;
78
 
 
79
 
        /**
80
 
         * Overloaded operator
81
 
         */
82
 
        bool operator!=(const UserInfo& uinfo) const;
83
 
        
 
43
        /**
 
44
         * Constructor without arguments.
 
45
         * Does not create a "valid" object, since it has no well defined UID
 
46
         */
 
47
        UserInfo();
 
48
        
 
49
        /**
 
50
         * Constructor (takes UID)
 
51
         */
 
52
        UserInfo(int uid);
 
53
        
 
54
        /**
 
55
         * Returns username
 
56
         */
 
57
        std::string getUsername() const throw (LookupException);
 
58
        
 
59
        /**
 
60
         * Returns UID
 
61
         */
 
62
        int getUid() const;
 
63
 
 
64
        /**
 
65
         * Returns primary group
 
66
         */
 
67
        GroupInfo getGroupInfo() const throw (LookupException);
 
68
        
 
69
        /**
 
70
         * Returns home directory
 
71
         */
 
72
        std::string getHomeDirectory() const throw (LookupException);
 
73
        
 
74
        /**
 
75
         * Checks wheter user is super-user
 
76
         */
 
77
        bool isSuperUser();
 
78
        
 
79
        /**
 
80
         * Compares to UserInfo objects for equality (same UID)
 
81
         */
 
82
        bool operator==(const UserInfo& uinfo) const;
 
83
 
 
84
        /**
 
85
         * Overloaded operator
 
86
         */
 
87
        bool operator!=(const UserInfo& uinfo) const;
 
88
        
84
89
    };
85
90
};
86
91