fuentes/ubuntu/siatic/dlinkpasswordgen.h @ 9ab8164b
9ab8164b | Elisa | ||
/*
|
|||
* DLink SSH Connection API
|
|||
* Alejandro Antúnez - SODITEC S.L
|
|||
* (C) 2015 - 2016 */
|
|||
#ifndef DLINKPASSWORDGEN_H
|
|||
#define DLINKPASSWORDGEN_H
|
|||
#define USER_DEFAULT "root"
|
|||
#define COMMAND_SSH "nvram set wl0_wpa_psk=%1"
|
|||
#include <stdlib.h>
|
|||
#include <qsshsocket.h>
|
|||
#include <stdio.h>
|
|||
class DLinkPasswordGen : public QObject
|
|||
{
|
|||
Q_OBJECT
|
|||
public:
|
|||
explicit DLinkPasswordGen(QObject *parent = 0);
|
|||
~DLinkPasswordGen();
|
|||
public:
|
|||
bool Ready = false;
|
|||
private:
|
|||
QSshSocket *ssh;
|
|||
public:
|
|||
QString PWD_DEFAULT="TexFono1";
|
|||
QString HOST_ROUTER="192.168.0.1";
|
|||
QString GetSystemPWD();
|
|||
void ConnectRouter();
|
|||
void DisconnectRouter();
|
|||
void DesconectarWIFI();
|
|||
void ConectarWIFI();
|
|||
QString GeneratePWD();
|
|||
QString GeneratePWD(QString rootUser, QString pre, QString clave);
|
|||
QString QueSsid();
|
|||
QString HayWifi();
|
|||
signals:
|
|||
void onLoginSuccess();
|
|||
void onSuccessPWDChanged();
|
|||
void onErrorPWDChanged();
|
|||
private slots:
|
|||
void error(QSshSocket::SshError err);
|
|||
void successLog();
|
|||
};
|
|||
#endif // DLINKPASSWORDGEN_H
|