summaryrefslogtreecommitdiff
path: root/src/chat/sess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat/sess.cpp')
-rwxr-xr-xsrc/chat/sess.cpp39
1 files changed, 33 insertions, 6 deletions
diff --git a/src/chat/sess.cpp b/src/chat/sess.cpp
index b41c8ce..dc9ba9b 100755
--- a/src/chat/sess.cpp
+++ b/src/chat/sess.cpp
@@ -3,27 +3,54 @@
#include "sess.h"
-sess::sess( string s_id )
+sess::sess( string s_tmpid )
{
- this->sess_id=s_id;
+ this->p_user = NULL;
+ this->s_tmpid = s_tmpid;
}
sess::~sess()
+{}
+
+string
+sess::get_tmpid()
{
-
+ return s_tmpid;
}
string
-sess::get_id()
+sess::get_name()
+{
+ if ( p_user = NULL )
+ return "";
+
+ return p_user->get_name();
+}
+
+void
+sess::set_name(string s_name)
+{
+ if ( p_user != NULL )
+ p_user->set_name(s_name);
+}
+
+user*
+sess::get_user()
+{
+ return p_user;
+}
+
+void
+sess::set_user(user* p_user)
{
- return this->sess_id;
+ this->p_user = p_user;
}
void
sess::invalidate()
{
- this->sess_id = "0";
+ this->s_tmpid = "0";
}
#endif