2 /////////////////////////////////////////////////////////////////
3 // WARNING : this is a generated file, don't change it !
4 /////////////////////////////////////////////////////////////////
6 require_once('../tools/nel_message.php');
8 class CLoginServiceWeb
extends CCallbackClient
11 function login($userId, $ipAddress, $domainId)
17 $msg->serialUint32($userId);
18 $msg->serialString($ipAddress);
19 $msg->serialUint32($domainId);
21 return parent
::sendMessage($msg);
26 function logout($userId)
32 $msg->serialUint32($userId);
34 return parent
::sendMessage($msg);
40 function waitCallback()
42 $message = parent
::waitMessage();
44 if ($message == false)
47 switch($message->MsgName
)
50 $this->loginResult_skel($message);
53 $this->logoutResult_skel($message);
63 function loginResult_skel(&$message)
65 $message->serialUint32($userId);
66 $message->serialString($cookie);
67 $message->serialUint32($resultCode);
68 $message->serialString($errorString);
70 $this->loginResult($userId, $cookie, $resultCode, $errorString);
73 function logoutResult_skel(&$message)
75 $message->serialUint32($errorCode);
76 $message->serialString($reason);
78 $this->logoutResult($errorCode, $reason);
82 /////////////////////////////////////////////////////////////////
83 // Copy paste this part of code in your derived class
84 // and implement code to ract to incoming message
85 /////////////////////////////////////////////////////////////////
86 // Return the cookie generated for this user session
87 // Eventualy, return an empty string as cookie in case of error
88 // resultCode : 0 - ok, login success
90 // 2 - user already online, must relog
91 // errorString contain a stringified description in case of error
93 function loginResult($userId, $cookie, $resultCode, $errorString)
97 // Return an error code for the logout attemp
98 // If return is not 0, then reason contains a debug string
99 // Return values : 0 - ok
101 // 2 - user already offline
103 function logoutResult($errorCode, $reason)