BluezQt

obexfiletransferentry.h
1 /*
2  * BluezQt - Asynchronous BlueZ wrapper library
3  *
4  * SPDX-FileCopyrightText: 2015 David Rosca <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 #ifndef BLUEZQT_OBEXFILETRANSFERENTRY_H
10 #define BLUEZQT_OBEXFILETRANSFERENTRY_H
11 
12 #include <QSharedPointer>
13 #include <QString>
14 
15 #include "bluezqt_export.h"
16 
17 namespace BluezQt
18 {
19 /**
20  * @class BluezQt::ObexFileTransferEntry obexfiletransferentry.h <BluezQt/ObexFileTransferEntry>
21  *
22  * OBEX file transfer entry.
23  *
24  * This class represents an entry in remote file system.
25  */
26 class BLUEZQT_EXPORT ObexFileTransferEntry
27 {
28 public:
29  /** Type of entry. */
30  enum Type {
31  /** Indicates that the entry is a file. */
33  /** Indicates that the entry is a folder. */
35  /** Indicates that the entry is invalid. */
37  };
38 
39  /**
40  * Creates a new invalid ObexFileTransferEntry object.
41  */
42  explicit ObexFileTransferEntry();
43 
44  /**
45  * Destroys an ObexFileTransferEntry object.
46  */
47  virtual ~ObexFileTransferEntry();
48 
49  /**
50  * Copy constructor.
51  *
52  * @param other
53  */
55 
56  /**
57  * Copy assignment operator.
58  *
59  * @param other
60  */
61  ObexFileTransferEntry &operator=(const ObexFileTransferEntry &other);
62 
63  /**
64  * Returns whether the entry is valid.
65  *
66  * This only checks if type() != Invalid.
67  *
68  * @return true if entry is valid
69  */
70  bool isValid() const;
71 
72  /**
73  * Returns a name of the entry.
74  *
75  * @return name of entry
76  */
77  QString name() const;
78 
79  /**
80  * Returns a label of the entry.
81  *
82  * @return label of entry
83  */
84  QString label() const;
85 
86  /**
87  * Returns a type of the entry.
88  *
89  * Entry can be either a file or folder.
90  *
91  * @return type of entry
92  */
93  Type type() const;
94 
95  /**
96  * Returns a size of the entry.
97  *
98  * Size is a number of items in the folder or file size in bytes.
99  *
100  * @return size of entry
101  */
102  quint64 size() const;
103 
104  /**
105  * Returns a permissions of the entry.
106  *
107  * @return permissions of entry
108  */
109  QString permissions() const;
110 
111  /**
112  * Returns a memory type where the entry is stored.
113  *
114  * @return memory type
115  */
116  QString memoryType() const;
117 
118  /**
119  * Returns a modification time of the entry.
120  *
121  * @return modification time of entry
122  */
123  QDateTime modificationTime() const;
124 
125 private:
126  BLUEZQT_NO_EXPORT explicit ObexFileTransferEntry(const QVariantMap &properties);
127 
129 
130  friend class PendingCallPrivate;
131 };
132 
133 } // namespace BluezQt
134 
135 Q_DECLARE_METATYPE(BluezQt::ObexFileTransferEntry)
136 
137 #endif // BLUEZQT_OBEXFILETRANSFERENTRY_H
@ Folder
Indicates that the entry is a folder.
@ Invalid
Indicates that the entry is invalid.
@ File
Indicates that the entry is a file.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Dec 6 2023 04:07:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.