/vp_plugins/auth_net_server/server.h
http://cupsfilter.googlecode.com/ · C Header · 228 lines · 105 code · 29 blank · 94 comment · 0 complexity · 1d514d983fd5ab84165f3942a0fffb74 MD5 · raw file
- #ifndef SERVER_H
- #define SERVER_H
- #define DEBUG_MODE
- #include "servergears.h"
- #include "auth_plugin.h"
- #include "inet_plugin.h"
- #include "igs_plugin.h"
- #include "itmpl_sql_plugin.h"
- #include "mytypes.h"
- #include <QDialog>
- #include <QtGui/QSystemTrayIcon>
- #include <QtGui/QErrorMessage>
- QT_BEGIN_NAMESPACE
- class QLabel;
- class QPushButton;
- class QGroupBox;
- class QFormLayout;
- class QLineEdit;
- class QLocalServer;
- class QComboBox;
- class QMenu;
- class QPlainTextEdit;
- class QDialogButtonBox;
- class QGridLayout;
- class QCheckBox;
- class QErrorMessage;
- QT_END_NAMESPACE
- using namespace VPrn;
- class Server : public QDialog
- {
- Q_OBJECT
- public:
- Server(QWidget *parent = 0);
- void setVisible(bool visible);
- /**
- * @fn bool isReady();
- * @brief ????????? ?????? GateKeeper ????? ?? ?? ? ?????? ??? ???
- */
- bool isReady(){return m_GateKeeperReady;}
- /**
- * @fn QString lastError();
- * @brief ?????????? ????????? ????????? ??????
- */
- QString lastError(){return m_lastError;}
- /**
- * @fn void showCriticalInfo(constQStrin & info)
- * @brief ?????????? ??????????? ?????? ? ????????? ?????? ?????????
- */
- void showCriticalInfo(const QString & info);
- protected:
- void closeEvent(QCloseEvent *event);
- public slots:
- /**
- @fn void appendStartMsg(const QString & msg);
- @brief ?????? ??? ????????? ????????? ??? ?????? ?????? ????? ?????????
- */
- void appendStartMsg(const QString & msg);
- /**
- * @fn void showBaloonMessage(int m_Type,const QString &b_msg)
- * @brief ?????????? ????????? ? ????
- * @param m_Type ??? ????????? critical,warning,information
- * @param b_msg ???? ?????????
- */
- //void showBaloonMessage(int m_Type,const QString &b_msg);
- /**
- * @fn void showTrayMessage(trayIcons msg_type,
- * const QString & msg_title,
- * const QString & msg_body);
- * @brief ?????????? ? ???? ????????? ????????? ????
- */
- void showTrayMessage(trayIcons msg_type,
- const QString & msg_title,
- const QString & msg_body);
- private slots:
- void iconActivated(QSystemTrayIcon::ActivationReason reason);
- void errorInfo(VPrn::AppErrorType eCode,QString e_msg);
- /**
- * @fn void setUserName(const QString & login,const QString &mandat);
- * @brief ?????????? ?????????? ?????????? ????????????
- */
- void setUserName(QString & login,QString &mandat);
- /**
- * @fn void runTEditor()
- * @brief ?????? ????????? ???????? ??? ?????????? ??????????
- */
- void runTEditor();
- /**
- * @fn void do_ChekPointChanged(MyCheckPoints m_scheckPoint);
- * @brief ??? ?????? ????????? ?????? ??????????, ??? ???? ??????????
- */
- void do_ChekPointChanged(MyCheckPoints m_scheckPoint);
- /**
- * @fn void dead_hands();
- * @brief ??????? ???? ????????? ???????? ???????? ??????????? ????????,
- * ? ????????? ??????????.
- */
- void dead_hands();
- /**
- * @fn void clearClientSpool( const QString &client_uuid );
- * @brief ?????? ??????????, ?????? ????? ????????? gs ??? ?????? ?? ?????,
- * ???????? ???????, ?? ??????? ?????????
- */
- void clearClientSpool( const QString &client_uuid );
- private:
- void createActions();
- void createTrayIcon();
- /**
- * @fn void init();
- * @brief ?????????? ?????????????? ???????? ??????????,
- */
- void init();
- /**
- * @fn bool loadPlugins()
- * @brief ???????? ????????
- */
- bool loadPlugins();
- /**
- * @fn void setTrayStatus(trayStatus t_stat,const QString & t_msg);
- * @brief ???????????? ?????? ? ????????? ? ??????????? ?? ???????
- */
- void setTrayStatus (trayStatus t_stat, const QString &t_msg);
- /**
- * @fn bool readConfig();
- * @brief ?????? ini ????
- */
- bool readConfig();
- /**
- * @var mainGear; ???????? ?????? ?????????
- * @var myNet_plugin; ????????? ?? ??????? ??????
- * @var myAuth_plugin; ????????? ?? ?????? ?????????? @todo (????? ?? ?)
- * @var myGs_plugin; ????????? ?? ?????? ?????? ghostscript
- * @var myTmpl_plugin; ????????? ?? ?????? ?????? ? ????????
- * @var currentStatus; ??????? ????????? ?????????
- * @var m_GateKeeperReady; ???? ????? ? ?????? ??? ???
- * @var m_lastError; ????????? ????????? ?? ??????
- */
- serverGears *myServerGears;
- Inet_plugin *myNet_plugin;
- Auth_plugin *myAuth_plugin;
- Igs_plugin *myGs_plugin;
- Itmpl_sql_plugin *myTmpl_plugin;
- bool m_GateKeeperReady;
- QString m_lastError;
- QString currentStatus;
- /**
- * @brief --------- ???? ?????????? ?? ini ????? ------------------------
- * @var serverHostName; ??????? ??? ?????? ??? IP ?????
- * @var serverPort; ???? ??? ????? c ???????
- * @var localSrvName; ??? ?????????? ???????
- * @var ticket_fname; ??? ????? ? ??????? ????????? ????????? ??????????? UNIX only
- * @var gsBin; ???? ? ???????????? ????? gs
- * @var pdftkBin; ???? ? ???????????? ????? pdfTk
- * @var spoolDir; ???? ? ???????? ????????? ??????
- * @var local_t_path; ???? ? ????????? ????????
- * @var global_t_path; ???? ? ?????????? ????????
- * @var tEditor_bin; ???? ? ????? ????????? ????????
- *------------------------------------------------------------------------
- */
- QString serverHostName;
- int serverPort;
- QString localSrvName;
- QString ticket_fname;
- QString gsBin;
- QString pdftkBin;
- QString gsprintBin;
- QString spoolDir;
- QString local_t_path;
- QString global_t_path;
- QString tEditor_bin;
- // ????? ??????????? ?????????
- QGroupBox *groupBox;
- QFormLayout *formLayout;
- QLabel *login_label;
- QLineEdit *login_LE;
- QLabel *mandat_label;
- QLineEdit *mandat_LE;
- QGroupBox *groupBox_2;
- QLineEdit *demonState_LE;
- QPushButton *quitButton;
- QGridLayout *gridLayout;
- QCheckBox *authCheckBox;
- QCheckBox *netCheckBox;
- QCheckBox *tmplCheckBox;
- QCheckBox *gsCheckBox;
- // ????????
- QAction *minimizeAction;
- QAction *restoreAction;
- QAction *quitAction;
- QAction *runEditorAction;
- QSystemTrayIcon *trayIcon;
- QMenu *trayIconMenu;
- // ???????? ?????? ??????
- QErrorMessage * myEMsgBox;
- QObjectList pluginList;
- #ifdef DEBUG_MODE
- PrinterList printer_list; //?????? ????????? ? ??????? (name,ip,p_qqueue)
- #endif
- };
- #endif