kitchensync Library API Documentation

kdevice.cpp

00001 /* 00002 This file is part of KitchenSync. 00003 00004 Copyright (c) 2002 Holger Freyther <freyther@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #include "kdevice.h" 00023 00024 using namespace KSync; 00025 00026 class Device::DevicePrivate 00027 { 00028 public: 00029 QString name; 00030 QString group; 00031 QString vendor; 00032 QString library; 00033 QString id; 00034 }; 00035 00036 Device::Device( const QString &ident, const QString &group, 00037 const QString &vendor, const QString &library, 00038 const QString &id ) 00039 { 00040 d = new DevicePrivate(); 00041 d->name= ident; 00042 d->group = group; 00043 d->vendor = vendor; 00044 d->library = library; 00045 d->id = id; 00046 } 00047 00048 Device::Device() 00049 { 00050 d = new DevicePrivate(); 00051 } 00052 00053 Device::Device( const Device &dev ) 00054 { 00055 d = new DevicePrivate(); 00056 d->name = dev.name(); 00057 d->group = dev.group(); 00058 d->vendor = dev.vendor(); 00059 d->library = dev.library(); 00060 d->id = dev.d->id; 00061 } 00062 00063 Device &Device::operator=( const Device &dev ) 00064 { 00065 d = new DevicePrivate; 00066 d->name = dev.d->name; 00067 d->group = dev.d->group; 00068 d->vendor = dev.d->vendor; 00069 d->library = dev.d->library; 00070 d->id = dev.d->id; 00071 00072 return *this; 00073 } 00074 00075 Device::~Device() 00076 { 00077 delete d; 00078 } 00079 00080 QString Device::name() const 00081 { 00082 return d->name; 00083 } 00084 00085 QString Device::group() const 00086 { 00087 return d->group; 00088 } 00089 00090 QString Device::vendor() const 00091 { 00092 return d->vendor; 00093 } 00094 00095 QString Device::library() const 00096 { 00097 return d->library; 00098 } 00099 00100 QString Device::identify() const 00101 { 00102 return d->id; 00103 } 00104 00105 bool Device::operator==( const Device &dest ) 00106 { 00107 if( identify() == dest.identify() && 00108 group() == dest.group() && 00109 vendor() == dest.vendor() ) { 00110 return true; 00111 } else { 00112 return false; 00113 } 00114 }
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:32 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003