5#include "repro/UserDb.hxx"
14#define RESIPROCATE_SUBSYSTEM Subsystem::REPRO
18add(
char* pUsername,
char* pRealm,
char* pPasswd )
25 db.addUser(
Data(pUsername),
39 db.removeUser(
Data(pAor) );
70 Data key = db.getFirstKey();
71 while ( !key.
empty() )
73 Data hash = db.getUserAuthInfo(key);
75 clog <<
"Key: " << key << endl;
76 clog <<
" passwordHash = " << hash << endl;
78 key = db.getNextKey();
86 clog <<
"Command line options are" << endl
88 <<
" -add user realm password" << endl
89 <<
" -remove aor" << endl
95main(
int argc,
char* argv[])
100 for (
int i=1; i<argc; i++ )
102 if ( !strcmp(argv[i],
"-list" ) )
106 if ( !strcmp(argv[i],
"-web" ) )
111 else if (!strcmp(argv[i],
"-add"))
115 char* username = argv[i];
119 char* realm = argv[i];
123 char* passwd = argv[i];
125 add( username, realm, passwd );
127 else if (!strcmp(argv[i],
"-remove"))
#define resip_assert(x)
This file needs to work for both C and C++ code.
void buildFdSet(resip::FdSet &fdset)
void process(resip::FdSet &fdset)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
static const Data Empty
Constant that represents a zero-length data.
bool empty() const noexcept
Checks whether the Data is empty.
Object-oriented wrapper for your platform's file-descriptor set.
int selectMilliSeconds(unsigned long ms)
static void setLevel(Level level)
Set logging level for current thread.
static void initialize(Type type, Level level, const Data &appName, const char *logFileName=0, ExternalLogger *externalLogger=0, const Data &syslogFacility="LOG_DAEMON", MessageStructure messageStructure=Unstructured, const Data &instanceName="")
This Class is used to implement a primitive form of RPC using loose XML formatting.
dcm! – add UnusedChecking(_enum) below;
int main(int argc, char *argv[])
void add(char *pUsername, char *pRealm, char *pPasswd)