~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/identifier/user.h

  • Committer: Monty Taylor
  • Date: 2010-12-24 02:13:05 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101224021305-e3slv1cyjczqorij
Changed the bzrignore file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <string>
26
26
#include <boost/shared_ptr.hpp>
27
27
 
28
 
#include <drizzled/visibility.h>
29
 
 
30
28
namespace drizzled
31
29
{
32
30
namespace identifier
37
35
  @brief A set of Session members describing the current authenticated user.
38
36
*/
39
37
 
40
 
class User : public Identifier
41
 
{
 
38
class User {
42
39
public:
43
40
  typedef boost::shared_ptr<User> shared_ptr;
44
41
  typedef boost::shared_ptr<const User> const_shared_ptr;
45
 
  typedef const User& const_reference;
46
 
  DRIZZLED_API static shared_ptr make_shared();
 
42
  static shared_ptr make_shared();
47
43
 
48
44
  enum PasswordType
49
45
  {
50
 
    NONE,
51
46
    PLAIN_TEXT,
52
47
    MYSQL_HASH
53
48
  };
54
49
 
55
50
  User():
56
 
    password_type(NONE),
 
51
    password_type(PLAIN_TEXT),
57
52
    _user(""),
58
53
    _address("")
59
54
  { }
60
55
 
61
 
  virtual void getSQLPath(std::string &arg) const;
62
 
 
63
 
  bool hasPassword() const
64
 
  {
65
 
    switch (password_type)
66
 
    {
67
 
    case NONE:
68
 
      return false;
69
 
    case PLAIN_TEXT:
70
 
    case MYSQL_HASH:
71
 
      break;
72
 
    }
73
 
 
74
 
    return true;
75
 
  }
76
 
 
77
56
  const std::string& address() const
78
57
  {
79
58
    return _address;