/usr/include/ubuntu/download_manager/process_error_struct.h is in libubuntu-download-manager-common-dev 0.3+14.04.20140321-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | /*
* Copyright 2014 Canonical Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of version 3 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef DOWNLOADER_LIB_PROCESS_ERROR_STRUCT_H
#define DOWNLOADER_LIB_PROCESS_ERROR_STRUCT_H
#include <QString>
#include "common.h"
class QDBusArgument;
namespace Ubuntu {
namespace DownloadManager {
/*!
\class ProcessErrorStruct
\brief The ProcessErrorStruct represents the dbus structure that is used
to communicate process errors that happened in the download
manager to the different clients.
\since 0.3
*/
class DOWNLOAD_MANAGER_EXPORT ProcessErrorStruct {
Q_PROPERTY(int code READ getCode)
Q_PROPERTY(int exitCode READ getExitCode)
Q_PROPERTY(QString phrase READ getPhrase)
Q_PROPERTY(QString READ getStandardOutput)
Q_PROPERTY(QString READ getStandardError)
public:
/*!
Creates a new structure with the default values.
*/
ProcessErrorStruct();
/*!
Create a new structure with the given error \a code and
a given human readable message.
*/
ProcessErrorStruct(int code, QString phrase);
/*!
Creates a new structure with the given error \a code and with
the exit details of the process. The process details are its
\a exitCode as well as the standard out via \a standardOut and
standard error via \a standarError
*/
ProcessErrorStruct(int code,
int exitCode,
QString standardOutput,
QString standardError);
/*!
Creates a new structure with the given error \a code , a human
readable message and with the exit details of the process.
The process details are its \a exitCode as well as the standard
out via \a standardOut and standard error via \a standarError
*/
ProcessErrorStruct(int code,
QString phrase,
int exitCode,
QString standardOutput,
QString standardError);
/*!
Copy constructor.
*/
ProcessErrorStruct(const ProcessErrorStruct& other);
/*!
Assign operator.
*/
ProcessErrorStruct& operator=(const ProcessErrorStruct& other);
/*!
\internal
*/
friend QDBusArgument &operator<<(QDBusArgument &argument,
const ProcessErrorStruct& error);
/*!
\internal
*/
friend const QDBusArgument &operator>>(const QDBusArgument &argument,
ProcessErrorStruct& error);
/*!
\fn int getCode() const
Returns the error code of the process.
*/
int getCode() const;
/*!
\fn int getExitCode() const
Returns the exit code of the process.
*/
int getExitCode() const;
/*!
\fn QString getPhrase() const
Returns a human readable message of the occurred error.
*/
QString getPhrase() const;
/*!
\fn QString getStandardOutput() const
Returns the standard output of the process.
*/
QString getStandardOutput() const;
/*!
\fn QString getStandardError() const
Returns the standard error of the process.
*/
QString getStandardError() const;
private:
/*!
\internal
*/
int _code;
/*!
\internal
*/
int _exitCode;
/*!
\internal
*/
QString _phrase;
/*!
\internal
*/
QString _stdout;
/*!
\internal
*/
QString _stderr;
};
} // DownloadManager
} // Ubuntu
#endif // PROCESS_ERROR_STRUCT_H
|