mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-24 10:52:52 +00:00
179 lines
5.4 KiB
Text
179 lines
5.4 KiB
Text
//
|
|
// Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
|
|
// Earlier copyrights 1998 - 2007 Jim Bublitz also apply
|
|
|
|
// Generated by twine
|
|
|
|
// This file is part of PyKDE4.
|
|
|
|
// PyKDE4 is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU Lesser General Public License as
|
|
// published by the Free Software Foundation; either version 2.1 of
|
|
// the License, or (at your option) any later version.
|
|
|
|
// PyKDE4 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 General Public License
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
%ModuleHeaderCode
|
|
//ctscc
|
|
#include <acadapter.h>
|
|
#include <audiointerface.h>
|
|
#include <battery.h>
|
|
#include <block.h>
|
|
#include <button.h>
|
|
#include <camera.h>
|
|
#include <deviceinterface.h>
|
|
#include <devicenotifier.h>
|
|
#include <dvbinterface.h>
|
|
#include <genericinterface.h>
|
|
#include <internetgateway.h>
|
|
#include <networking.h>
|
|
#include <networkinterface.h>
|
|
#include <networkshare.h>
|
|
#include <opticaldisc.h>
|
|
#include <opticaldrive.h>
|
|
#include <portablemediaplayer.h>
|
|
#include <processor.h>
|
|
#include <qobject.h>
|
|
#include <solid/serialinterface.h>
|
|
#include <solid/smartcardreader.h>
|
|
#include <storageaccess.h>
|
|
#include <storagedrive.h>
|
|
#include <storagevolume.h>
|
|
#include <video.h>
|
|
%End
|
|
|
|
namespace Solid
|
|
{
|
|
|
|
class DeviceInterface : QObject
|
|
{
|
|
%TypeHeaderCode
|
|
#include <deviceinterface.h>
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
enum Type
|
|
{
|
|
Unknown,
|
|
GenericInterface,
|
|
Processor,
|
|
Block,
|
|
StorageAccess,
|
|
StorageDrive,
|
|
OpticalDrive,
|
|
StorageVolume,
|
|
OpticalDisc,
|
|
Camera,
|
|
PortableMediaPlayer,
|
|
NetworkInterface,
|
|
AcAdapter,
|
|
Battery,
|
|
Button,
|
|
AudioInterface,
|
|
DvbInterface,
|
|
Video,
|
|
SerialInterface,
|
|
SmartCardReader,
|
|
InternetGateway,
|
|
NetworkShare,
|
|
Last
|
|
};
|
|
|
|
bool isValid () const;
|
|
static QString typeToString (Solid::DeviceInterface::Type type);
|
|
static Solid::DeviceInterface::Type stringToType (const QString& type);
|
|
|
|
protected:
|
|
//ig DeviceInterface (DeviceInterfacePrivate& dd, QObject* backendObject);
|
|
|
|
|
|
private:
|
|
//force
|
|
DeviceInterface ();
|
|
|
|
|
|
|
|
// Subclasses of QObject
|
|
|
|
//end
|
|
%ConvertToSubClassCode
|
|
// CTSCC for subclasses of 'QObject'
|
|
sipType = NULL;
|
|
|
|
if (dynamic_cast<Solid::DeviceInterface*>(sipCpp))
|
|
{
|
|
sipType = sipType_Solid_DeviceInterface;
|
|
if (dynamic_cast<Solid::AcAdapter*>(sipCpp))
|
|
sipType = sipType_Solid_AcAdapter;
|
|
else if (dynamic_cast<Solid::AudioInterface*>(sipCpp))
|
|
sipType = sipType_Solid_AudioInterface;
|
|
else if (dynamic_cast<Solid::Battery*>(sipCpp))
|
|
sipType = sipType_Solid_Battery;
|
|
else if (dynamic_cast<Solid::Block*>(sipCpp))
|
|
sipType = sipType_Solid_Block;
|
|
else if (dynamic_cast<Solid::Button*>(sipCpp))
|
|
sipType = sipType_Solid_Button;
|
|
else if (dynamic_cast<Solid::Camera*>(sipCpp))
|
|
sipType = sipType_Solid_Camera;
|
|
else if (dynamic_cast<Solid::DvbInterface*>(sipCpp))
|
|
sipType = sipType_Solid_DvbInterface;
|
|
else if (dynamic_cast<Solid::GenericInterface*>(sipCpp))
|
|
sipType = sipType_Solid_GenericInterface;
|
|
else if (dynamic_cast<Solid::InternetGateway*>(sipCpp))
|
|
sipType = sipType_Solid_InternetGateway;
|
|
else if (dynamic_cast<Solid::NetworkInterface*>(sipCpp))
|
|
sipType = sipType_Solid_NetworkInterface;
|
|
else if (dynamic_cast<Solid::NetworkShare*>(sipCpp))
|
|
sipType = sipType_Solid_NetworkShare;
|
|
else if (dynamic_cast<Solid::PortableMediaPlayer*>(sipCpp))
|
|
sipType = sipType_Solid_PortableMediaPlayer;
|
|
else if (dynamic_cast<Solid::Processor*>(sipCpp))
|
|
sipType = sipType_Solid_Processor;
|
|
else if (dynamic_cast<Solid::SerialInterface*>(sipCpp))
|
|
sipType = sipType_Solid_SerialInterface;
|
|
else if (dynamic_cast<Solid::SmartCardReader*>(sipCpp))
|
|
sipType = sipType_Solid_SmartCardReader;
|
|
else if (dynamic_cast<Solid::StorageAccess*>(sipCpp))
|
|
sipType = sipType_Solid_StorageAccess;
|
|
else if (dynamic_cast<Solid::StorageDrive*>(sipCpp))
|
|
{
|
|
sipType = sipType_Solid_StorageDrive;
|
|
if (dynamic_cast<Solid::OpticalDrive*>(sipCpp))
|
|
sipType = sipType_Solid_OpticalDrive;
|
|
}
|
|
else if (dynamic_cast<Solid::StorageVolume*>(sipCpp))
|
|
{
|
|
sipType = sipType_Solid_StorageVolume;
|
|
if (dynamic_cast<Solid::OpticalDisc*>(sipCpp))
|
|
sipType = sipType_Solid_OpticalDisc;
|
|
}
|
|
else if (dynamic_cast<Solid::Video*>(sipCpp))
|
|
sipType = sipType_Solid_Video;
|
|
}
|
|
else if (dynamic_cast<Solid::DeviceNotifier*>(sipCpp))
|
|
sipType = sipType_Solid_DeviceNotifier;
|
|
else if (dynamic_cast<Solid::Networking::Notifier*>(sipCpp))
|
|
sipType = sipType_Solid_Networking_Notifier;
|
|
%End
|
|
|
|
public:
|
|
~DeviceInterface ();
|
|
static QString typeDescription (Solid::DeviceInterface::Type type);
|
|
};
|
|
// DeviceInterface
|
|
|
|
};
|
|
// Solid
|
|
|
|
|
|
|
|
|