~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/identifier/user.h

  • Committer: Brian Aker
  • Date: 2011-01-12 06:45:23 UTC
  • mto: (2073.1.4 catalogs)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: brian@tangent.org-20110112064523-rqhptaqbph22qmj1
RemoveĀ customĀ error.

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
43
41
  typedef boost::shared_ptr<User> shared_ptr;
44
42
  typedef boost::shared_ptr<const User> const_shared_ptr;
45
43
  typedef const User& const_reference;
46
 
  DRIZZLED_API static shared_ptr make_shared();
 
44
  static shared_ptr make_shared();
47
45
 
48
46
  enum PasswordType
49
47
  {
50
 
    NONE,
51
48
    PLAIN_TEXT,
52
49
    MYSQL_HASH
53
50
  };
54
51
 
55
52
  User():
56
 
    password_type(NONE),
 
53
    password_type(PLAIN_TEXT),
57
54
    _user(""),
58
55
    _address("")
59
56
  { }
60
57
 
61
58
  virtual void getSQLPath(std::string &arg) const;
62
59
 
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
60
  const std::string& address() const
78
61
  {
79
62
    return _address;