Public Slots | |
void | socketConnectionClose () |
Signals | |
void | SignalClosed () |
Connection closed. | |
void | SignalConnected () |
Client connected. | |
void | SignalErrorAuth () |
Authentication error. | |
void | SignalShortMessage (const QString &) |
Short messages for statusBar. | |
Public Member Functions | |
ClientSocket (const int &sock, QObject *parent=0) | |
ClientSocket (Q3ListView *mylistView, QObject *parent=0) | |
void | connectionToServer (const QString &username, const QString &passwd) |
void | Disconnect () |
virtual | ~ClientSocket () |
virtual | ~ClientSocket () |
Static Public Attributes | |
static int | compteur_objet = 0 |
Private Types | |
enum | command { auth_rq, auth_ack, end, kill_user, send_msg, smb_rq, smb_data, end_smb_rq, not_imp1, server_info, error_auth, error_command, error_obj, echo_request, echo_reply, auth_rq, auth_ack, end, kill_user, send_msg, smb_rq, smb_data, end_smb_rq, not_imp1, server_info, error_auth, error_command, error_obj, echo_request, echo_reply } |
enum | command { auth_rq, auth_ack, end, kill_user, send_msg, smb_rq, smb_data, end_smb_rq, not_imp1, server_info, error_auth, error_command, error_obj, echo_request, echo_reply, auth_rq, auth_ack, end, kill_user, send_msg, smb_rq, smb_data, end_smb_rq, not_imp1, server_info, error_auth, error_command, error_obj, echo_request, echo_reply } |
Private Slots | |
void | add_lockedfile (const QString &, const QString &, const QString &, const QString &, const QString &, const QString &) |
void | add_share (const QString &, const QString &, const QString &) |
void | add_user (const QString &, const QString &, const QString &, const QString &, const QString &) |
void | AnalysisSmbDestroyed () |
void | core (const Q3CString &rcv_txt) |
void | Exception () |
void | InfoMachine () |
void | InfoServer () |
void | InfoService () |
void | InfoUser () |
void | ObjError (const QString &error_txt) |
void | readClient () |
void | setSambaVersion (const QString &) |
void | slot_echo_timer () |
void | slot_echo_timer () |
void | slot_pam () |
void | slot_smbstatus (const QStringList &) |
void | slot_timer () |
void | slotDisconnectUser () |
void | slotPopupMenu (Q3ListViewItem *, const QPoint &, int) |
void | slotSendMessage () |
void | slotSendMessageAllUsers () |
void | socketclosed () |
void | socketconnected () |
void | UnreachableHost () |
Private Member Functions | |
void | AnalysisSmbstatus () |
void | CmdAuthRq (const QString &texte) |
void | CmdKillUser (const QString &texte) |
void | CmdSendMsg (const QString &texte) |
void | CmdSmbRq () |
void | core (const Q3CString &rcv_txt) |
void | infoserver (const QString &text) |
void | sendToClient (int cmd, const QString &em_txt="") |
void | sendToServer (int cmd, const QString &inputText="") |
Private Attributes | |
bool | AuthUser |
if user authenticated | |
Q3ListViewItem * | currentPopupMenuItem |
int | echo |
QTimer * | echo_timer |
QTimer * | echo_timer |
smbstatus * | InstanceSmbstatus |
server * | item_server |
QStringList | ListSmbstatus |
Q3ListView * | listView |
Q3PopupMenu * | menu |
QErrorMessage * | msgError |
PamThread * | pamthread |
QString | passwd_login |
bool | permitDisconnectUser |
if client is authorized to disconnect user | |
bool | permitSendMsg |
if client is authorized to send popup message | |
QSocketNotifier * | sn_exception |
QSocketNotifier * | sn_read |
int | socket |
ClientSSL * | socketclient |
Q3SocketDevice * | socketdevice |
SSL * | ssl |
bool | ssl_connected |
bool | SSL_init |
QTimer * | timer |
QTimer * | timer |
QString | username_login |
Static Private Attributes | |
static int | TimoutTimerEcho = 30000 |
Time between 2 echo request. |
This class dialogs with client. (One object per client).
sock | Socket number | |
parent | pointer to parent for this object |
enum ClientSocket::command [private] |
enum ClientSocket::command [private] |
Protocol between server and client.
ClientSocket::ClientSocket | ( | Q3ListView * | mylistView, | |
QObject * | parent = 0 | |||
) |
mylistView | pointer to listview | |
parent | pointer to parent for this object |
ClientSocket::~ClientSocket | ( | ) | [virtual] |
ClientSocket::ClientSocket | ( | const int & | sock, | |
QObject * | parent = 0 | |||
) |
virtual ClientSocket::~ClientSocket | ( | ) | [virtual] |
void ClientSocket::add_lockedfile | ( | const QString & | strPid, | |
const QString & | strName, | |||
const QString & | strMode, | |||
const QString & | strRW, | |||
const QString & | strOplock, | |||
const QString & | strDateOpen | |||
) | [private, slot] |
InstanceSmbstatus has found a file opened (locked file)
strPid | PID | |
strName | File name | |
strMode | Mode | |
strRW | RW | |
strOplock | Oplock | |
strDateOpen | date |
void ClientSocket::add_share | ( | const QString & | strPid, | |
const QString & | strShare, | |||
const QString & | strConnected | |||
) | [private, slot] |
InstanceSmbstatus has found a share
strPid | PID | |
strShare | Share name | |
strConnected | date |
void ClientSocket::add_user | ( | const QString & | strPid, | |
const QString & | strUser, | |||
const QString & | strGroup, | |||
const QString & | strMachineName, | |||
const QString & | strMachineIP | |||
) | [private, slot] |
void ClientSocket::AnalysisSmbDestroyed | ( | ) | [private, slot] |
InstanceSmbstatus has finished his work
void ClientSocket::CmdAuthRq | ( | const QString & | texte | ) | [private] |
Authentication Request
texte | arg=1=username, arg2=password |
void ClientSocket::CmdKillUser | ( | const QString & | texte | ) | [private] |
Request from client to disconnect an user
texte | arg1=PID, arg2=username |
void ClientSocket::CmdSendMsg | ( | const QString & | texte | ) | [private] |
Request from client to send popup message
texte | arg1=machine, arg2=message to be sent |
void ClientSocket::CmdSmbRq | ( | ) | [private] |
Run Smbstatus request
void ClientSocket::connectionToServer | ( | const QString & | username, | |
const QString & | passwd | |||
) |
void ClientSocket::core | ( | const Q3CString & | rcv_txt | ) | [private] |
void ClientSocket::core | ( | const Q3CString & | rcv_txt | ) | [private, slot] |
Protocol interpreter. analyze the server's answers.
rcv_txt | data sent by server |
rcv_txt | data sent by client |
void ClientSocket::Disconnect | ( | ) |
Close TCP connection
void ClientSocket::Exception | ( | ) | [private, slot] |
There is a TCP error
void ClientSocket::InfoMachine | ( | ) | [private, slot] |
View machine informations
void ClientSocket::infoserver | ( | const QString & | text | ) | [private] |
Receive informations from server (right for current client)
text | client's right: 0000 0001 : permit client to disconnect an user 0000 0010 : permit client to send popup messages (popupwindows) |
void ClientSocket::InfoServer | ( | ) | [private, slot] |
View samba version
void ClientSocket::InfoService | ( | ) | [private, slot] |
View service informations (locked file or share)
void ClientSocket::InfoUser | ( | ) | [private, slot] |
View user informations
void ClientSocket::ObjError | ( | const QString & | error_txt | ) | [private, slot] |
Slot : receive objects errors and send it to client.
error_txt | error to be sent |
void ClientSocket::readClient | ( | ) | [private, slot] |
Receive datas from client
void ClientSocket::sendToClient | ( | int | cmd, | |
const QString & | em_txt = "" | |||
) | [private] |
void ClientSocket::sendToServer | ( | int | cmd, | |
const QString & | inputText = "" | |||
) | [private] |
void ClientSocket::setSambaVersion | ( | const QString & | version_samba | ) | [private, slot] |
void ClientSocket::SignalClosed | ( | ) | [signal] |
Connection closed.
void ClientSocket::SignalConnected | ( | ) | [signal] |
Client connected.
void ClientSocket::SignalErrorAuth | ( | ) | [signal] |
Authentication error.
void ClientSocket::SignalShortMessage | ( | const QString & | _t1 | ) | [signal] |
Short messages for statusBar.
void ClientSocket::slot_echo_timer | ( | ) | [private, slot] |
void ClientSocket::slot_echo_timer | ( | ) | [private, slot] |
Timer ending (echo), sends a new echo request. After 3 failures, disconnect.
void ClientSocket::slot_pam | ( | ) | [private, slot] |
test if pamthread has terminated
void ClientSocket::slot_smbstatus | ( | const QStringList & | rcv_smb | ) | [private, slot] |
Slot : Receive smbstatus reply.
void ClientSocket::slotDisconnectUser | ( | ) | [private, slot] |
Disconnect an user
void ClientSocket::slotPopupMenu | ( | Q3ListViewItem * | Item, | |
const QPoint & | point, | |||
int | ||||
) | [private, slot] |
popup menu
void ClientSocket::slotSendMessage | ( | ) | [private, slot] |
send out messages (popupwindows) to one user
void ClientSocket::slotSendMessageAllUsers | ( | ) | [private, slot] |
send out messages (popupwindows) to all users
void ClientSocket::socketclosed | ( | ) | [private, slot] |
Slot connection is closed
void ClientSocket::socketconnected | ( | ) | [private, slot] |
SLot connection is OK
void ClientSocket::socketConnectionClose | ( | ) | [slot] |
Close connection.
void ClientSocket::UnreachableHost | ( | ) | [private, slot] |
Host is unreachable
bool ClientSocket::AuthUser [private] |
if user authenticated
static int ClientSocket::compteur_objet = 0 [static] |
Q3ListViewItem* ClientSocket::currentPopupMenuItem [private] |
int ClientSocket::echo [private] |
QTimer* ClientSocket::echo_timer [private] |
QTimer* ClientSocket::echo_timer [private] |
smbstatus* ClientSocket::InstanceSmbstatus [private] |
server* ClientSocket::item_server [private] |
QStringList ClientSocket::ListSmbstatus [private] |
Q3ListView* ClientSocket::listView [private] |
Q3PopupMenu* ClientSocket::menu [private] |
QErrorMessage* ClientSocket::msgError [private] |
PamThread* ClientSocket::pamthread [private] |
QString ClientSocket::passwd_login [private] |
bool ClientSocket::permitDisconnectUser [private] |
if client is authorized to disconnect user
bool ClientSocket::permitSendMsg [private] |
if client is authorized to send popup message
QSocketNotifier* ClientSocket::sn_exception [private] |
QSocketNotifier* ClientSocket::sn_read [private] |
int ClientSocket::socket [private] |
ClientSSL* ClientSocket::socketclient [private] |
Q3SocketDevice* ClientSocket::socketdevice [private] |
SSL* ClientSocket::ssl [private] |
bool ClientSocket::ssl_connected [private] |
bool ClientSocket::SSL_init [private] |
QTimer* ClientSocket::timer [private] |
QTimer* ClientSocket::timer [private] |
static int ClientSocket::TimoutTimerEcho = 30000 [static, private] |
Time between 2 echo request.
QString ClientSocket::username_login [private] |