source: SMSSender/lib/libdatatypes/src/interfaces/ivalidationresult.h @ 71:415b45c71663

3.0
Last change on this file since 71:415b45c71663 was 71:415b45c71663, checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
  • Reorganized all the libraries. libinterfaces and libgateways are removed now and libdatatypes contains now all these files.
File size: 1.1 KB
Line 
1/*
2 * ivalidation.h
3 *
4 *  Created on: Dec 18, 2009
5 *      Author: saemy
6 */
7
8#ifndef IVALIDATION_H_
9#define IVALIDATION_H_
10
11#include <QObject>
12#include <QList>
13#include <QString>
14
15#include "iinterface.h"
16
17enum ValidationType {
18        Valid,
19        Warning,
20        Error
21};
22
23class IValidationResult: public IInterface {
24    Q_INTERFACES(IInterface)
25
26public:
27    virtual void addError(const QString& message) =0;
28    virtual void addWarning(const QString& message) =0;
29
30    virtual ValidationType validationType() const =0;
31    virtual QList<QString> errors() const =0;
32    virtual QList<QString> warnings() const =0;
33
34    virtual bool           hasErrors() const =0;
35    virtual bool           hasWarnings() const =0;
36    virtual bool           isValid() const =0;
37
38    virtual QString        getErrorString(const QString& delimiter = "\n") const =0;
39    virtual QString        getWarningString(const QString& delimiter = "\n") const =0;
40};
41
42Q_DECLARE_INTERFACE(IValidationResult,
43                     "ch.gorrion.smssender.IValidationResult/1.0")
44
45#endif /* IVALIDATION_H_ */
Note: See TracBrowser for help on using the repository browser.