reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
UserStore.hxx
Go to the documentation of this file.
1#if !defined(REPRO_USERSTORE_HXX)
2#define REPRO_USERSTORE_HXX
3
4#include "rutil/Data.hxx"
5#include "rutil/Fifo.hxx"
7
9
10namespace resip
11{
12 class TransactionUser;
13}
14
15namespace repro
16{
17
19
21{
22 public:
24
26
27 virtual ~UserStore();
28
29 AbstractDb::UserRecord getUserInfo( const Key& key ) const;
30
32 const resip::Data& realm ) const;
33
34 bool addUser( const resip::Data& user,
35 const resip::Data& domain,
36 const resip::Data& realm,
37 const resip::Data& password,
39 const resip::Data& fullName,
41 const resip::Data& passwordHashAlt = resip::Data::Empty); // Only required if applyA1HashToPassword is false
42
43 void eraseUser( const Key& key );
44
45 bool updateUser( const Key& originalKey,
46 const resip::Data& user,
47 const resip::Data& domain,
48 const resip::Data& realm,
49 const resip::Data& password,
51 const resip::Data& fullName,
53 const resip::Data& passwordHashAlt = resip::Data::Empty); // Only required if applyA1HashToPassword is false
54
55 Key getFirstKey();// return empty if no more
56 Key getNextKey(); // return empty if no more
57
58 static Key buildKey(const resip::Data& user, const resip::Data& domain);
59 static void getUserAndDomainFromKey(const AbstractDb::Key& key, resip::Data& user, resip::Data& domain);
60
61 private:
62
63 AbstractDb& mDb;
64 static const resip::Data SEPARATOR;
65};
66
67 }
68#endif
69
70/* ====================================================================
71 * The Vovida Software License, Version 1.0
72 *
73 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
74 *
75 * Redistribution and use in source and binary forms, with or without
76 * modification, are permitted provided that the following conditions
77 * are met:
78 *
79 * 1. Redistributions of source code must retain the above copyright
80 * notice, this list of conditions and the following disclaimer.
81 *
82 * 2. Redistributions in binary form must reproduce the above copyright
83 * notice, this list of conditions and the following disclaimer in
84 * the documentation and/or other materials provided with the
85 * distribution.
86 *
87 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
88 * and "Vovida Open Communication Application Library (VOCAL)" must
89 * not be used to endorse or promote products derived from this
90 * software without prior written permission. For written
91 * permission, please contact vocal@vovida.org.
92 *
93 * 4. Products derived from this software may not be called "VOCAL", nor
94 * may "VOCAL" appear in their name, without prior written
95 * permission of Vovida Networks, Inc.
96 *
97 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
98 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
99 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
100 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
101 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
102 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
103 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
104 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
105 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
106 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
107 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
108 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
109 * DAMAGE.
110 *
111 * ====================================================================
112 */
resip::Data Key
Definition UserStore.hxx:23
virtual ~UserStore()
Definition UserStore.cxx:31
static Key buildKey(const resip::Data &user, const resip::Data &domain)
static void getUserAndDomainFromKey(const AbstractDb::Key &key, resip::Data &user, resip::Data &domain)
bool addUser(const resip::Data &user, const resip::Data &domain, const resip::Data &realm, const resip::Data &password, bool applyA1HashToPassword, const resip::Data &fullName, const resip::Data &emailAddress, const resip::Data &passwordHashAlt=resip::Data::Empty)
Definition UserStore.cxx:50
resip::Data getUserAuthInfo(const resip::Data &user, const resip::Data &realm) const
Definition UserStore.cxx:42
void eraseUser(const Key &key)
Definition UserStore.cxx:86
bool updateUser(const Key &originalKey, const resip::Data &user, const resip::Data &domain, const resip::Data &realm, const resip::Data &password, bool applyA1HashToPassword, const resip::Data &fullName, const resip::Data &emailAddress, const resip::Data &passwordHashAlt=resip::Data::Empty)
Definition UserStore.cxx:92
AbstractDb::UserRecord getUserInfo(const Key &key) const
Definition UserStore.cxx:36
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
static const Data Empty
Constant that represents a zero-length data.
Definition Data.hxx:882
A templated, threadsafe message-queue class.
Definition Fifo.hxx:16
This Class is used to implement a primitive form of RPC using loose XML formatting.
resip::Fifo< resip::Message > MessageFifo
dcm! – add UnusedChecking(_enum) below;
void list()
Definition userAdmin.cxx:66