Solid

frontend/networkshare.h
1/*
2 SPDX-FileCopyrightText: 2011 Mario Bensi <mbensi@ipsquad.net>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef SOLID_NETWORKSHARE_H
8#define SOLID_NETWORKSHARE_H
9
10#include <solid/solid_export.h>
11
12#include <solid/deviceinterface.h>
13
14#include <QUrl>
15
16namespace Solid
17{
18class Device;
19class NetworkSharePrivate;
20
21/**
22 * @class Solid::NetworkShare networkshare.h <Solid/NetworkShare>
23 *
24 * NetworkShare interface.
25 *
26 * a NetworkShare interface is used to determine the type of
27 * network access.
28 * @since 4.7
29 */
30class SOLID_EXPORT NetworkShare : public DeviceInterface
31{
32 Q_OBJECT
33 Q_PROPERTY(ShareType type READ type)
34 Q_PROPERTY(QUrl url READ url)
35 Q_DECLARE_PRIVATE(NetworkShare)
36 friend class Device;
37
38private:
39 /**
40 * Creates a new NetworkShare object.
41 * You generally won't need this. It's created when necessary using
42 * Device::as().
43 *
44 * @param backendObject the device interface object provided by the backend
45 * @see Solid::Device::as()
46 */
47 SOLID_NO_EXPORT explicit NetworkShare(QObject *backendObject);
48
49public:
50 /**
51 * Destroys a NetworkShare object.
52 */
53 ~NetworkShare() override;
54
55 /**
56 * This enum type defines the type of networkShare device can be.
57 *
58 * - Unknown : a unsupported network protocol
59 * - Nfs : nfs protocol
60 * - Cifs : samba protocol
61 * - Smb3 : samba protocol (version 3)
62 */
63
64 enum ShareType { Unknown, Nfs, Cifs, Smb3 };
65 Q_ENUM(ShareType)
66
67 /**
68 * Get the Solid::DeviceInterface::Type of the NetworkShare device interface.
69 *
70 * @return the NetworkShare device interface type
71 * @see Solid::DeviceInterface::Type
72 */
73 static Type deviceInterfaceType()
74 {
75 return DeviceInterface::NetworkShare;
76 }
77
78 /**
79 * Retrieves the type of network share
80 *
81 * @return the type of network share
82 */
83 ShareType type() const;
84
85 /**
86 * Retrieves the url of network share
87 *
88 * @return the url of network share
89 */
90 QUrl url() const;
91};
92}
93
94#endif
Base class of all the device interfaces.
Type
This enum type defines the type of device interface that a Device can have.
This class allows applications to deal with devices available in the underlying system.
NetworkShare interface.
ShareType
This enum type defines the type of networkShare device can be.
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:53:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.