ipcm_plat/wlan_security_settings_ui_plugin_api/inc/cpwlansecurityplugininterface.h
changeset 20 9c97ad6591ae
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
       
     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 the License "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: 
       
    15 *   Control Panel plugin interface for WLAN security settings plugins.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef CPWLANSECURITYPLUGININTERFACE_H
       
    20 #define CPWLANSECURITYPLUGININTERFACE_H
       
    21 
       
    22 // System includes
       
    23 #include <QtPlugin>
       
    24 #include <cmmanagerdefines_shim.h>
       
    25 
       
    26 // User includes
       
    27 
       
    28 // Forward declarations
       
    29 class CmConnectionMethodShim;
       
    30 class CpSettingFormItemData;
       
    31 class CpItemDataHelper;
       
    32 
       
    33 // External data types
       
    34 
       
    35 // Constants
       
    36 
       
    37 // Class declaration
       
    38 
       
    39 /*!
       
    40     \class CpWlanSecurityPluginInterface
       
    41     \brief This class is an interface for WLAN security settings plugins
       
    42            which can be displayed in Control Panel application.
       
    43            
       
    44     Plugin stubs must be located in
       
    45     /resource/qt/plugins/controlpanel/wlansecurity directory.
       
    46  */
       
    47 
       
    48 class CpWlanSecurityPluginInterface
       
    49 {
       
    50 public:
       
    51     /*!
       
    52         Destructor.
       
    53      */
       
    54     virtual ~CpWlanSecurityPluginInterface() {}
       
    55 
       
    56     /*!
       
    57         Getter for security mode. Security modes are defined in Connection
       
    58         Settings Shim WlanSecMode enum, e.g. WlanSecModeWep.
       
    59 
       
    60         \return Security mode identifier.
       
    61      */
       
    62     virtual CMManagerShim::WlanSecMode securityMode() const = 0;
       
    63     
       
    64     /*!
       
    65         Getter for localization text identifier for the security mode,
       
    66         e.g. "txt_occ_setlabel_wlan_security_mode_val_wep". This localized
       
    67         text will be shown in the UI.
       
    68 
       
    69         \return Localization text ID.
       
    70      */
       
    71     virtual QString securityModeTextId() const = 0;
       
    72 
       
    73     /*! 
       
    74         Sets the database reference. Plugin can either use Connection
       
    75         Settings Shim to access the settings or some other way using the
       
    76         provided connection method ID.
       
    77 
       
    78         \param cmConnectionMethod Pointer to CmConnectionMethodShim instance
       
    79                which can be used for reading and writing of the settings. Not
       
    80                owned by the plugin.
       
    81         \param id Connection method ID.
       
    82      */
       
    83     virtual void setReference(
       
    84         CmConnectionMethodShim *cmConnectionMethod,
       
    85         uint id) = 0;
       
    86 
       
    87     /*!
       
    88         Getter for order number. This order number is used to put the
       
    89         security modes in correct order in the security mode list. Security
       
    90         mode with the lowest order number will be first and so on.
       
    91 
       
    92         E.g. WEP = 10, 802.1X = 20, WPA = 30, WPA2 = 40, WAPI = 50
       
    93 
       
    94         \return Order number.
       
    95      */
       
    96     virtual int orderNumber() const = 0;
       
    97 
       
    98     /*!
       
    99         Creates an UI instance ("Security settings" group with all settings
       
   100         for the security mode). Caller owns the object. The security plugin
       
   101         doesn't need to handle deletion of the UI instance, it will be
       
   102         handled by the caller and Control Panel framework. Every call shall
       
   103         create a new UI instance.
       
   104 
       
   105         \param dataHelper Item data helper.
       
   106         \return Pointer to an UI object.
       
   107      */
       
   108     virtual CpSettingFormItemData* uiInstance(
       
   109         CpItemDataHelper &dataHelper) = 0;
       
   110 
       
   111 signals:
       
   112 
       
   113 public slots:
       
   114 
       
   115 protected:
       
   116 
       
   117 protected slots:
       
   118 
       
   119 private:
       
   120 
       
   121 private slots:
       
   122 
       
   123 private: // data
       
   124 
       
   125 };
       
   126 
       
   127 Q_DECLARE_INTERFACE(
       
   128     CpWlanSecurityPluginInterface,
       
   129     "com.nokia.plugin.controlpanel.wlansecurity.platform.interface/1.0");
       
   130 
       
   131 #endif // CPWLANSECURITYPLUGININTERFACE_H