/vp_plugins/auth_plugin/auth.h

http://cupsfilter.googlecode.com/ · C Header · 51 lines · 36 code · 13 blank · 2 comment · 0 complexity · ada45942bc1b4e6445263b2911fbb857 MD5 · raw file

  1. #ifndef AUTH_H
  2. #define AUTH_H
  3. #include <QObject>
  4. #if defined(Q_OS_WIN)
  5. #include <windows.h>
  6. #endif
  7. #include <stdio.h>
  8. #include "auth_plugin.h"
  9. #include "mytypes.h"
  10. using namespace VPrn;
  11. class QString;
  12. #if defined(Q_OS_WIN)
  13. #define PLUGIN_API __declspec(dllimport)
  14. typedef PLUGIN_API LPWSTR (*DLLGETCURRENTUSER)(void);
  15. typedef PLUGIN_API LPWSTR (*DLLGETCURRENTSECLABEL)(void);
  16. typedef PLUGIN_API bool (*DLLISAUTHUSER)(void);
  17. typedef PLUGIN_API LPCTSTR (*ABOUTPLUGIN)(void);
  18. #endif
  19. class Auth : public QObject, Auth_plugin
  20. {
  21. Q_OBJECT
  22. Q_INTERFACES(Auth_plugin)
  23. public:
  24. Auth(){}
  25. void init (const QString &mandat_filename);
  26. void init ();
  27. signals:
  28. void error(VPrn::AppErrorType errCode,QString error_message);
  29. void get_User_name_mandat(QString &userName,QString &userMandat);
  30. private:
  31. QString user_name;
  32. QString user_mandat;
  33. QString plugin_path;
  34. // ???????? ??? ???????????? ?? ???????
  35. QString ask4System();
  36. };
  37. //! [0]
  38. #endif