//
//     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 <networkinterface.h>
#include <opticaldisc.h>
#include <opticaldrive.h>
#include <portablemediaplayer.h>
#include <processor.h>
#include <serialinterface.h>
#include <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,
        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);

//force

private:
                            DeviceInterface ();
//end


public:

//  Subclasses of QObject

%ConvertToSubClassCode

    sipClass = NULL;

    if (dynamic_cast<Solid::DeviceInterface*>(sipCpp))
        {
            sipClass = sipClass_Solid_DeviceInterface;
            if (dynamic_cast<Solid::AcAdapter*>(sipCpp))
                sipClass = sipClass_Solid_AcAdapter;
            else if (dynamic_cast<Solid::AudioInterface*>(sipCpp))
                sipClass = sipClass_Solid_AudioInterface;
            else if (dynamic_cast<Solid::Battery*>(sipCpp))
                sipClass = sipClass_Solid_Battery;
            else if (dynamic_cast<Solid::Block*>(sipCpp))
                sipClass = sipClass_Solid_Block;
            else if (dynamic_cast<Solid::Button*>(sipCpp))
                sipClass = sipClass_Solid_Button;
            else if (dynamic_cast<Solid::Camera*>(sipCpp))
                sipClass = sipClass_Solid_Camera;
            else if (dynamic_cast<Solid::DvbInterface*>(sipCpp))
                sipClass = sipClass_Solid_DvbInterface;
            else if (dynamic_cast<Solid::GenericInterface*>(sipCpp))
                sipClass = sipClass_Solid_GenericInterface;
            else if (dynamic_cast<Solid::NetworkInterface*>(sipCpp))
                sipClass = sipClass_Solid_NetworkInterface;
            else if (dynamic_cast<Solid::PortableMediaPlayer*>(sipCpp))
                sipClass = sipClass_Solid_PortableMediaPlayer;
            else if (dynamic_cast<Solid::Processor*>(sipCpp))
                sipClass = sipClass_Solid_Processor;
            else if (dynamic_cast<Solid::SerialInterface*>(sipCpp))
                sipClass = sipClass_Solid_SerialInterface;
            else if (dynamic_cast<Solid::SmartCardReader*>(sipCpp))
                sipClass = sipClass_Solid_SmartCardReader;
            else if (dynamic_cast<Solid::StorageAccess*>(sipCpp))
                sipClass = sipClass_Solid_StorageAccess;
            else if (dynamic_cast<Solid::StorageDrive*>(sipCpp))
                {
                    sipClass = sipClass_Solid_StorageDrive;
                    if (dynamic_cast<Solid::OpticalDrive*>(sipCpp))
                        sipClass = sipClass_Solid_OpticalDrive;
                }
            else if (dynamic_cast<Solid::StorageVolume*>(sipCpp))
                {
                    sipClass = sipClass_Solid_StorageVolume;
                    if (dynamic_cast<Solid::OpticalDisc*>(sipCpp))
                        sipClass = sipClass_Solid_OpticalDisc;
                }
            else if (dynamic_cast<Solid::Video*>(sipCpp))
                sipClass = sipClass_Solid_Video;
        }
    else if (dynamic_cast<Solid::DeviceNotifier*>(sipCpp))
        sipClass = sipClass_Solid_DeviceNotifier;
%End

};   // DeviceInterface

};   // Solid




