Changeset View
Changeset View
Standalone View
Standalone View
include/QtCrypto/qca_support.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
43 | #include <QVariantList> | 43 | #include <QVariantList> | ||
44 | #include <QStringList> | 44 | #include <QStringList> | ||
45 | #include <QList> | 45 | #include <QList> | ||
46 | #include <QMetaObject> | 46 | #include <QMetaObject> | ||
47 | #include <QThread> | 47 | #include <QThread> | ||
48 | #include "qca_export.h" | 48 | #include "qca_export.h" | ||
49 | #include "qca_tools.h" | 49 | #include "qca_tools.h" | ||
50 | 50 | | |||
51 | namespace QCA { | 51 | namespace QCA | ||
52 | { | ||||
52 | 53 | | |||
53 | /** | 54 | /** | ||
54 | Convenience method to determine the return type of a method | 55 | Convenience method to determine the return type of a method | ||
55 | 56 | | |||
56 | This function identifies the return type of a specified | 57 | This function identifies the return type of a specified | ||
57 | method. This function can be used as shown: | 58 | method. This function can be used as shown: | ||
58 | \code | 59 | \code | ||
59 | class TestClass : public QObject | 60 | class TestClass : public QObject | ||
▲ Show 20 Lines • Show All 491 Lines • ▼ Show 20 Line(s) | |||||
551 | */ | 552 | */ | ||
552 | class QCA_EXPORT Console : public QObject | 553 | class QCA_EXPORT Console : public QObject | ||
553 | { | 554 | { | ||
554 | Q_OBJECT | 555 | Q_OBJECT | ||
555 | public: | 556 | public: | ||
556 | /** | 557 | /** | ||
557 | The type of console object | 558 | The type of console object | ||
558 | */ | 559 | */ | ||
559 | enum Type | 560 | enum Type { | ||
560 | { | | |||
561 | Tty, ///< physical console | 561 | Tty, ///< physical console | ||
562 | Stdio ///< stdin/stdout | 562 | Stdio ///< stdin/stdout | ||
563 | }; | 563 | }; | ||
564 | /** | 564 | /** | ||
565 | The type of I/O to use with the console object. | 565 | The type of I/O to use with the console object. | ||
566 | */ | 566 | */ | ||
567 | enum ChannelMode | 567 | enum ChannelMode { | ||
568 | { | | |||
569 | Read, ///< Read only (equivalent to stdin) | 568 | Read, ///< Read only (equivalent to stdin) | ||
570 | ReadWrite ///< Read/write (equivalent to stdin and stdout) | 569 | ReadWrite ///< Read/write (equivalent to stdin and stdout) | ||
571 | }; | 570 | }; | ||
572 | 571 | | |||
573 | /** | 572 | /** | ||
574 | The nature of the console operation | 573 | The nature of the console operation | ||
575 | */ | 574 | */ | ||
576 | enum TerminalMode | 575 | enum TerminalMode { | ||
577 | { | | |||
578 | Default, ///< use default terminal settings | 576 | Default, ///< use default terminal settings | ||
579 | Interactive ///< char-by-char input, no echo | 577 | Interactive ///< char-by-char input, no echo | ||
580 | }; | 578 | }; | ||
581 | 579 | | |||
582 | /** | 580 | /** | ||
583 | Standard constructor | 581 | Standard constructor | ||
584 | 582 | | |||
585 | Note that library code should not create a new Console object | 583 | Note that library code should not create a new Console object | ||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | |||||
683 | */ | 681 | */ | ||
684 | class QCA_EXPORT ConsoleReference : public QObject | 682 | class QCA_EXPORT ConsoleReference : public QObject | ||
685 | { | 683 | { | ||
686 | Q_OBJECT | 684 | Q_OBJECT | ||
687 | public: | 685 | public: | ||
688 | /** | 686 | /** | ||
689 | The security setting to use for the Console being managed. | 687 | The security setting to use for the Console being managed. | ||
690 | */ | 688 | */ | ||
691 | enum SecurityMode | 689 | enum SecurityMode { | ||
692 | { | | |||
693 | SecurityDisabled, | 690 | SecurityDisabled, | ||
694 | SecurityEnabled | 691 | SecurityEnabled | ||
695 | }; | 692 | }; | ||
696 | 693 | | |||
697 | /** | 694 | /** | ||
698 | Standard constructor | 695 | Standard constructor | ||
699 | 696 | | |||
700 | \param parent the parent object for this object | 697 | \param parent the parent object for this object | ||
▲ Show 20 Lines • Show All 255 Lines • ▼ Show 20 Line(s) | 952 | { | |||
956 | Q_OBJECT | 953 | Q_OBJECT | ||
957 | public: | 954 | public: | ||
958 | /** | 955 | /** | ||
959 | The severity of the message | 956 | The severity of the message | ||
960 | 957 | | |||
961 | This information may be used by the log device to determine | 958 | This information may be used by the log device to determine | ||
962 | what the appropriate action is. | 959 | what the appropriate action is. | ||
963 | */ | 960 | */ | ||
964 | enum Severity | 961 | enum Severity { | ||
965 | { | | |||
966 | Quiet = 0, ///< Quiet: turn of logging | 962 | Quiet = 0, ///< Quiet: turn of logging | ||
967 | Emergency = 1, ///< Emergency: system is unusable | 963 | Emergency = 1, ///< Emergency: system is unusable | ||
968 | Alert = 2, ///< Alert: action must be taken immediately | 964 | Alert = 2, ///< Alert: action must be taken immediately | ||
969 | Critical = 3, ///< Critical: critical conditions | 965 | Critical = 3, ///< Critical: critical conditions | ||
970 | Error = 4, ///< Error: error conditions | 966 | Error = 4, ///< Error: error conditions | ||
971 | Warning = 5, ///< Warning: warning conditions | 967 | Warning = 5, ///< Warning: warning conditions | ||
972 | Notice = 6, ///< Notice: normal but significant condition | 968 | Notice = 6, ///< Notice: normal but significant condition | ||
973 | Information = 7, ///< Informational: informational messages | 969 | Information = 7, ///< Informational: informational messages | ||
974 | Debug = 8 ///< Debug: debug-level messages | 970 | Debug = 8 ///< Debug: debug-level messages | ||
975 | }; | 971 | }; | ||
976 | 972 | | |||
977 | /** | 973 | /** | ||
978 | Get the current logging level | 974 | Get the current logging level | ||
979 | 975 | | |||
980 | \return Current level | 976 | \return Current level | ||
981 | */ | 977 | */ | ||
982 | inline Severity level() const { return m_logLevel; } | 978 | inline Severity level() const | ||
979 | { | ||||
980 | return m_logLevel; | ||||
981 | } | ||||
983 | 982 | | |||
984 | /** | 983 | /** | ||
985 | Set the current logging level | 984 | Set the current logging level | ||
986 | 985 | | |||
987 | \param level new logging level | 986 | \param level new logging level | ||
988 | 987 | | |||
989 | Only severities less or equal than the log level one will be logged | 988 | Only severities less or equal than the log level one will be logged | ||
990 | */ | 989 | */ | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 1031 | private: | |||
1037 | /** | 1036 | /** | ||
1038 | Create a new message logger | 1037 | Create a new message logger | ||
1039 | */ | 1038 | */ | ||
1040 | Logger(); | 1039 | Logger(); | ||
1041 | 1040 | | |||
1042 | ~Logger(); | 1041 | ~Logger(); | ||
1043 | 1042 | | |||
1044 | QStringList m_loggerNames; | 1043 | QStringList m_loggerNames; | ||
1045 | QList<AbstractLogDevice*> m_loggers; | 1044 | QList<AbstractLogDevice *> m_loggers; | ||
1046 | Severity m_logLevel; | 1045 | Severity m_logLevel; | ||
1047 | }; | 1046 | }; | ||
1048 | 1047 | | |||
1049 | /** | 1048 | /** | ||
1050 | \class AbstractLogDevice qca_support.h QtCrypto | 1049 | \class AbstractLogDevice qca_support.h QtCrypto | ||
1051 | 1050 | | |||
1052 | An abstract log device | 1051 | An abstract log device | ||
1053 | 1052 | | |||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |