smf/smfsettingsui/PlatfromIndependentSettings.cpp
changeset 14 a469c0e6e7fb
child 18 013a02bf2bb0
equal deleted inserted replaced
13:b5d63d5fc252 14:a469c0e6e7fb
       
     1 /**
       
     2 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "{License}"
       
     6 * which accompanies  this distribution, and is available
       
     7 * at the URL "{LicenseUrl}".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Platform Independent Settings Class
       
    16 */
       
    17 
       
    18 #include "PlatfromIndependentSettings.h"
       
    19 
       
    20 #ifndef __FOR_SYMBIAN__
       
    21 
       
    22 #include "SettingsConstants.h"
       
    23 
       
    24 CPFIndSettings::CPFIndSettings()
       
    25     {
       
    26 		iSettings = new QSettings(QSettings::SystemScope,"Sasken","SMF");
       
    27     }
       
    28 
       
    29 CPFIndSettings::~CPFIndSettings()
       
    30     {
       
    31 	 if(iSettings)
       
    32 		{
       
    33 			delete iSettings;
       
    34 			iSettings = NULL;
       
    35 		}
       
    36     }
       
    37 /*
       
    38 
       
    39  * Method to set the PluginDetails to  QSettings
       
    40  * Param - @aPluginStatus,holds the Plgugin Status.
       
    41  */
       
    42 void CPFIndSettings::SetPluginDetails(QString& aPluginName,QString& aPluginStatus)
       
    43 	{
       
    44 		iSettings->setValue(KSettingsUIPluginNameKey,aPluginName);
       
    45 		iSettings->setValue(KSettingsUIPluginStausKey,aPluginStatus);
       
    46 	}
       
    47 /*
       
    48  * Method to set the Auth Expiry Value to  QSettings
       
    49  * Param - @aVal,Auth Expiry Value
       
    50  */
       
    51 void CPFIndSettings::SetAuthExpirationValue(QString& aVal)
       
    52 	{
       
    53 		iSettings->setValue(KSettingsUIAuthExpLimitKey,aVal);
       
    54 	}
       
    55 /*
       
    56  * Method to set the Max. Data Transfer Limit to  QSettings
       
    57  * Param - @aVal,Max. Data Transfer Limit Value
       
    58  */
       
    59 void CPFIndSettings::SetMaxDataTransferLimit(QString& aVal)
       
    60 	{
       
    61 		iSettings->setValue(KSettingsUIMaxDataTransferLimitKey,aVal);
       
    62 	}
       
    63 /*
       
    64  * Method to set the Roaming Status for Data Transfer to  QSettings
       
    65  * Param - @aStatus,Rpaming Status value for Data Transfer
       
    66  */
       
    67 void CPFIndSettings::SetRoamingStatusforDataTransfer(QString& aStatus)
       
    68 	{
       
    69 		iSettings->setValue(KSettingsUIRoamingStatusKey,aStatus);
       
    70 	}
       
    71 /*
       
    72  * Method to set the Upload File Type to  QSettings
       
    73  * Param - @aStatus,Upload File Type Value
       
    74  */
       
    75 void CPFIndSettings::SetUploadFileType(QString& aFileType)
       
    76 	{
       
    77 		iSettings->setValue(KSettingsUIUploadFileTypeKey,aFileType);
       
    78 	}
       
    79 /*
       
    80  * Method to Get the PluginDetails from  QSettings
       
    81  */
       
    82 QStringList CPFIndSettings::GetPluginDetails() const
       
    83 	{
       
    84 		QVariant Value;
       
    85 		QStringList PluginDetails;
       
    86 
       
    87 		Value = iSettings->value(KSettingsUIPluginNameKey,Value);
       
    88 		PluginDetails.append(Value.toString());
       
    89 		
       
    90 		Value =  iSettings->value(KSettingsUIPluginStausKey,Value);
       
    91 		PluginDetails.append(Value.toString());
       
    92 		
       
    93 		return PluginDetails;
       
    94 	}
       
    95 /*
       
    96  * Method to Get the Auth Expiry Value from  QSettings
       
    97  */
       
    98 QString CPFIndSettings::GetAuthExpirationValue() const
       
    99 	{
       
   100 		QVariant Value;
       
   101 		Value = iSettings->value(KSettingsUIAuthExpLimitKey,Value);
       
   102 		return Value.toString();
       
   103 	}
       
   104 /*
       
   105  * Method to Get the Max. Data Transfer Limit from  QSettings
       
   106  */
       
   107 QString CPFIndSettings::GetMaxDataTransferLimit() const
       
   108 	{
       
   109 		QVariant Value;
       
   110 		Value = iSettings->value(KSettingsUIMaxDataTransferLimitKey,Value);
       
   111 		return Value.toString();
       
   112 	}
       
   113 /*
       
   114  * Method to Get the Roaming Status for Data Transfer from QSettings
       
   115  */
       
   116 QString CPFIndSettings::GetRoamingStatusforDataTransfer() const
       
   117 	{
       
   118 		QVariant Value;
       
   119 		Value = iSettings->value(KSettingsUIRoamingStatusKey,Value);
       
   120 		return Value.toString();
       
   121 	}
       
   122 /*
       
   123  * Method to Get the Upload File Type from QSettings
       
   124  */
       
   125 QString CPFIndSettings::GetUploadFileType() const
       
   126 	{
       
   127 		QVariant Value;
       
   128 		Value = iSettings->value(KSettingsUIUploadFileTypeKey,Value);
       
   129 		return Value.toString();
       
   130 	}
       
   131 
       
   132 #endif