bluetoothengine/btui/btdevsettingframework/src/btabstractdevsetting.cpp
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  The plugin interface of Bluetooth device setting ui 
       
    15 *
       
    16 */
       
    17 
       
    18 #include <btabstractdevsetting.h>
       
    19 
       
    20 BtAbstractDevSetting::BtAbstractDevSetting(
       
    21         const QString &address, QObject *parent)
       
    22     : QObject( parent )
       
    23 {
       
    24     mRemote = address;
       
    25 }
       
    26 
       
    27 /*!
       
    28  Destructor of BtAbstractDevSetting.
       
    29  */
       
    30 BtAbstractDevSetting::~BtAbstractDevSetting()
       
    31 {
       
    32 }
       
    33 
       
    34 /*!
       
    35  Gets the BD_ADDR of the remote device which this setting 
       
    36  plugin is provided for.
       
    37  
       
    38  \return the device address of the remote device in hex string
       
    39  */
       
    40 const QString &BtAbstractDevSetting::getRemote() const
       
    41 {
       
    42     return mRemote;
       
    43 }
       
    44 
       
    45 /*!
       
    46  Tells if this setting plugin can provide a setting UI
       
    47  for the target device. If the answer is true, this plugin may be
       
    48  requested to create a setting widget by function 
       
    49  \code createSettingWidget() \endcode.
       
    50  
       
    51  \return true if a setting is currently available. false, otherwise.
       
    52  
       
    53  The default implementation returns false.
       
    54  */
       
    55 bool BtAbstractDevSetting::isSettingAvailable()
       
    56 {
       
    57     return false;
       
    58 }
       
    59 
       
    60 /*!
       
    61  Gets a \code HbDataForm \endcode instance which consists of the
       
    62  setting UI from this specific plugin. The loader of this plugin will
       
    63  add this dataform into its setting view if its setting is available at
       
    64  the time.
       
    65  
       
    66  The ownership of this widget is not transferred. That is, the plugin 
       
    67  is responsible to free it at plugin destruction.
       
    68  
       
    69  The default implementation returns 0. 
       
    70 
       
    71  \return an \code HbDataForm \endcode instance.
       
    72  */
       
    73 HbDataForm *BtAbstractDevSetting::getSettingWidget()
       
    74 {
       
    75     return 0;
       
    76 }
       
    77 
       
    78 /*!
       
    79  Informs that device setting is going to foreground. This 
       
    80  implies that the \code HbWidget \endcode from function 
       
    81  \code createSettingWidget \endcode will be shown if the setting
       
    82  from this plugin is available.
       
    83  
       
    84  The default implementation does nothing.
       
    85  */  
       
    86 void BtAbstractDevSetting::aboutToForeground()
       
    87 {
       
    88 }
       
    89 
       
    90 /*!
       
    91  Informs that device setting is going to background.
       
    92  
       
    93  The default implementation does nothing.
       
    94  */
       
    95 void BtAbstractDevSetting::aboutToBackground()
       
    96 {
       
    97 }
       
    98 
       
    99 /*!
       
   100  Informs that device setting is going to close.
       
   101  
       
   102  The default implementation does nothing.
       
   103  */
       
   104 void BtAbstractDevSetting::aboutToClose()
       
   105 {
       
   106 }