| 1 | /* |
| 2 | * BluezQt - Asynchronous BlueZ wrapper library |
| 3 | * |
| 4 | * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <mincequi@web.de> |
| 5 | * |
| 6 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 | */ |
| 8 | |
| 9 | #ifndef METHOD_H |
| 10 | #define METHOD_H |
| 11 | |
| 12 | #include "Comment.h" |
| 13 | #include "Parameter.h" |
| 14 | |
| 15 | class Method |
| 16 | { |
| 17 | public: |
| 18 | struct Tags { |
| 19 | bool isOptional = false; |
| 20 | bool isDeprecated = false; |
| 21 | bool isExperimental = false; |
| 22 | }; |
| 23 | |
| 24 | Method(); |
| 25 | |
| 26 | bool finalize(); |
| 27 | |
| 28 | QString name() const; |
| 29 | QList<Parameter> inParameters() const; |
| 30 | QList<Parameter> outParameters() const; |
| 31 | Parameter outParameter() const; |
| 32 | Tags tags() const; |
| 33 | QStringList () const; |
| 34 | |
| 35 | private: |
| 36 | QString guessOutParameterName() const; |
| 37 | |
| 38 | QString m_name; |
| 39 | QStringList m_inParameterStrings; |
| 40 | QStringList m_outParameterStrings; |
| 41 | Parameter m_outParameter; |
| 42 | QStringList m_stringTags; |
| 43 | QString m_limitation; |
| 44 | Comment ; |
| 45 | |
| 46 | // finalized members |
| 47 | Tags m_tags; |
| 48 | QList<Parameter> m_inParameters; |
| 49 | QList<Parameter> m_outParameters; |
| 50 | |
| 51 | friend class Methods; |
| 52 | }; |
| 53 | |
| 54 | #endif // METHOD_H |
| 55 | |