diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:42 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:42 +0200 |
| commit | 0537da9d1e0f593130fc3967befb71e673b016bc (patch) | |
| tree | e6733c8494e0dc8df5bd7e5d2dcbd401771272b6 /src/sess.cpp | |
| parent | 3e382f0c9435cbf72570a87640652ad1551c7cfd (diff) | |
tagging ychat-0.5.4ychat-0.5.4
Diffstat (limited to 'src/sess.cpp')
| -rw-r--r-- | src/sess.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/sess.cpp b/src/sess.cpp new file mode 100644 index 0000000..181adbb --- /dev/null +++ b/src/sess.cpp @@ -0,0 +1,39 @@ +#ifndef SESS_CPP +#define SESS_CPP + +#include "sess.h" + +sess::sess( string s_id ) +{ + this->sess_id=s_id; +} + +string sess::getId() +{ + return this->sess_id; +} + + +void sess::invalidate() +{ + this->sess_id="0"; + this->sess_values.clear(); +} + +void sess::setValue( string s_key, void *lpvalue ) +{ + this->sess_values[s_key]=lpvalue; +} +void *sess::getValue( string s_key ) +{ + return this->sess_values[s_key]; +} +string sess::dump() +{ + string s_ret=string("Session Dump of Session ") + this->getId(); + map<string, void*>::const_iterator it; + for(it=this->sess_values.begin();it!=this->sess_values.end();it++) + s_ret=s_ret + "\nkey: " + it->first; + return s_ret; +} +#endif |
