Logo Search packages:      
Sourcecode: qtsmbstatus version File versions  Download package

void ClientSocket::CmdSendMsg ( const QString &  texte  )  [private]

Request from client to send popup message

Parameters:
texte arg1=machine, arg2=message to be sent
See also:
ClientSocket::permitSendMsg

Sendmessage_manager

Definition at line 256 of file clientsocket.cpp.

References AuthUser, ObjError(), permitSendMsg, core_syntax::returnArg(), and sendToClient().

{
      debugQt(" ClientSocket :: CmdSendMsg()");
      core_syntax stx(texte);
      if (!AuthUser) // if not authenticated
      {
            debugQt("Client not authenticated !");
            sendToClient(error_auth,"Not authenticated !");
      }
      else // if authenticated
      {
            if (!permitSendMsg) // if client is authorized
            {
                  debugQt("Client is unauthorized to send popup message !");
                  sendToClient(error_obj,tr("Unauthorized request!"));
                  return;
            }
            QString machine=stx.returnArg(1);
            if (machine!="")
            {
                  QString message=stx.returnArg(2);
                  if (message!="")
                  {
                        Sendmessage_manager* send_msg = new Sendmessage_manager(machine,message,this);
                        connect(send_msg,SIGNAL(ObjError(const QString &)),this, SLOT(ObjError (const QString &)) );
                  } else sendToClient(error_command,"Missing arguments");
            } else sendToClient(error_command,"Missing arguments");
      }
}


Generated by  Doxygen 1.6.0   Back to index