debian/tmp/usr/include/syncmlcommon/DeviceInfo.h
/*
* This file is part of buteo-sync-plugins package
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef DEFAULTDEVICEINFO_H
#define DEFAULTDEVICEINFO_H
#include <QString>
#include <QStringList>
#include <QMutex>
#include <QMap>
#ifdef HAS_SYSTEMSETTINGS
#include <deviceinfo.h>
#else
#include <QDeviceInfo>
#endif
namespace Buteo {
class DeviceInfo
{
public:
enum Source {
ReadFromSystem,
ReadFromXml
};
DeviceInfo();
virtual ~DeviceInfo();
void setSourceToRead(Source &);
Source getSourceToRead();
bool setDeviceXmlFile(QString &fileName);
QString DeviceXmlFile();
QMap<QString,QString> getDeviceInformation();
void saveDevInfoToFile(QMap<QString,QString> &aDevInfo , QString &aFileName);
protected:
private:
Source iSource;
QStringList iProperties;
QString iDeviceInfoFile;
QString iManufacturer;
QString iModel;
QString iSwVersion;
QString iHwVersion;
QString iFwVersion;
QString iDeviceIMEI;
QString iDeviceType;
QString getManufacturer();
QString getModel();
QString getSwVersion();
QString getHwVersion();
QString getFwVersion();
QString getDeviceIMEI();
QString getDeviceType();
#if defined(HAS_SYSTEMSETTINGS)
::DeviceInfo deviceInfo;
#else
QDeviceInfo deviceInfo;
#endif
#ifdef SYNC_APP_UNITTESTS
friend class DeviceInfoTest;
#endif
};
}
#endif // DEFAULTDEVICEINFO_H
Buteo::DeviceInfo::getDeviceInformation
QMap< QString, QString > getDeviceInformation()
Retrieves Device Information as Map.
Buteo::DeviceInfo::DeviceInfo
DeviceInfo()
Constructor.
Buteo::DeviceInfo::DeviceXmlFile
QString DeviceXmlFile()
get the file name from where the device information is read from
Buteo::DeviceInfo::saveDevInfoToFile
void saveDevInfoToFile(QMap< QString, QString > &aDevInfo, QString &aFileName)
Saves Device Information to the filename.
Buteo::DeviceInfo::setDeviceXmlFile
bool setDeviceXmlFile(QString &fileName)
set the file path to read device information from
Buteo::DeviceInfo::setSourceToRead
void setSourceToRead(Source &)
set properties to read from the devicse
Buteo::DeviceInfo::getSourceToRead
Source getSourceToRead()
get method for source
Buteo::DeviceInfo::~DeviceInfo
virtual ~DeviceInfo()
Destructor.
Buteo::DeviceInfo::Source
Source
getDeviceInformation call checks this enum
Definition debian/tmp/usr/include/syncmlcommon/DeviceInfo.h:49
Buteo::DeviceInfo::ReadFromXml
@ ReadFromXml
read from xml
Definition debian/tmp/usr/include/syncmlcommon/DeviceInfo.h:54
Buteo::DeviceInfo::ReadFromSystem
@ ReadFromSystem
read from system
Definition debian/tmp/usr/include/syncmlcommon/DeviceInfo.h:51