apengine/apsettingshandlerui/src/ApSelectorListBoxModel.cpp
changeset 66 ed07dcc72692
parent 0 5a93021fdf25
--- a/apengine/apsettingshandlerui/src/ApSelectorListBoxModel.cpp	Fri Sep 17 08:32:43 2010 +0300
+++ b/apengine/apsettingshandlerui/src/ApSelectorListBoxModel.cpp	Mon Oct 04 00:43:42 2010 +0300
@@ -57,8 +57,6 @@
 iFeatureInitialised(EFalse),
 iProtectionSupported(EFalse)
     {
-    APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::CApSelectorListboxModel<->")
-    iGraphicType = aGraphicType;
     }
 
 // ---------------------------------------------------------
@@ -67,8 +65,6 @@
 //
 CApSelectorListboxModel::~CApSelectorListboxModel()
     {
-    APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::~CApSelectorListboxModel<->")
-    ResetAndDestroy(); // deletes all elements...
     }
 
 // ---------------------------------------------------------
@@ -77,9 +73,7 @@
 //
 TInt CApSelectorListboxModel::MdcaCount() const
     {
-    APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::MdcaCount<->")
-    
-    return Count();
+    return 0;
     }
 
 // ---------------------------------------------------------
@@ -88,15 +82,7 @@
 //
 TPtrC CApSelectorListboxModel::MdcaPoint( TInt aIndex ) const
     {
-    APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::MdcaPoint")
-    
-    // We need to cast away the const-ness from the buffer.
-    // It was definitely made for formatting!
-    FormatListboxText( aIndex,
-        ( MUTABLE_CAST(  TBuf<KMaxApSelectorListboxName>&, iBuf ) ) );
-
-    APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::MdcaPoint")
-    return iBuf;
+    User::Leave( KErrNotSupported );
     }
 
 
@@ -106,25 +92,7 @@
 //
 TInt CApSelectorListboxModel::Item4Uid( TUint32 aUid, TInt& aErr ) const
     {
-    APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::Item4Uid")
-    
-    aErr = KErrNone;
-    TInt retval( KErrNotFound );
-    for ( TInt i=0; i<Count(); i++ )
-        {
-        if ( At( i )->Uid() == aUid )
-            {
-            retval = i;
-            break;
-            }
-        }
-    if ( retval == KErrNotFound )
-        {
-        aErr = KErrNotFound;
-        }
-    
-    APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::Item4Uid")
-    return retval;
+    return KErrNotFound;
     }
 
 
@@ -135,9 +103,6 @@
 //
 void CApSelectorListboxModel::SetOwnIconOffset( TInt aOffset )
     {
-    APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::SetOwnIconOffset<->")
-    
-    iOffset = aOffset;
     }
 
 
@@ -148,205 +113,6 @@
 void CApSelectorListboxModel::FormatListboxText( TInt aIndex,
                                                 TDes& aBuf ) const
     {
-    APSETUILOGGER_ENTERFN( EListbox,"SelListboxModel::FormatListboxText")
-    
-    if ( !iFeatureInitialised )
-        {
-        TRAPD(err, FeatureManager::InitializeLibL());
-        if (err == KErrNone)
-            {
-            CApSelectorListboxModel* tmp = CONST_CAST(CApSelectorListboxModel*, this);
-            tmp->iProtectionSupported = FeatureManager::FeatureSupported( 
-                                            KFeatureIdSettingsProtection );
-            FeatureManager::UnInitializeLib();
-            tmp->iFeatureInitialised = ETrue;
-            }
-        }
-    switch ( iGraphicType )
-        {
-        case EGraphicBearer:
-            {
-            TInt iIconId;
-            switch ( At( aIndex )->BearerType() )
-                {
-                case EApBearerTypeCDMA:
-                    {
-                    iIconId = KCDMA_ICON_ID;
-                    break;
-                    }
-                case EApBearerTypeGPRS:
-                    {
-                    iIconId = KGPRS_ICON_ID;
-                    break;
-                    }
-                case EApBearerTypeCSD:
-                    {
-                    iIconId = KCSD_ICON_ID;
-                    break;
-                    }
-                case EApBearerTypeHSCSD:
-                    {
-                    iIconId = KHSCSD_ICON_ID;
-                    break;
-                    }
-                case EApBearerTypeWLAN:
-                    {
-                    iIconId = KWLAN_ICON_ID;
-                    break;
-                    }
-#ifdef __TEST_LAN_BEARER
-                case EApBearerTypeLAN:
-                    {
-                    iIconId = KLAN_ICON_ID;
-                    break;
-                    }
-#endif // __TEST_LAN_BEARER
-                case EApBearerTypeLANModem:
-                    { // LANMODEM get real icon ID
-                    iIconId = KWLAN_ICON_ID;
-                    break;
-                    }
-                default:
-                    {
-                    // in release, shall not leave here,
-                    // it is checked when filled...
-                    __ASSERT_DEBUG( EFalse, Panic( EInvalidBearerType ) );
-                    iIconId = KGPRS_ICON_ID;
-                    break;
-                    }
-                }
-            if ( iProtectionSupported )
-                {
-                if ( At( aIndex )->IsReadOnly() )
-                    {
-                    TInt iProtectedIconId = KPROTECTED_ICON_ID;
-                    aBuf.Format(
-                                KListItemFormatGraphicProtected,
-                                iOffset+iIconId,
-                                Min( At( aIndex )->Name().Length(),
-                                KMaxListItemNameLength ),
-                                &At( aIndex )->Name(),
-                                iOffset+iProtectedIconId
-                                );
-                    }
-                else
-                    { // protection supported, but not protected
-                    aBuf.Format(
-                                KListItemFormatGraphicBearer,
-                                iOffset+iIconId,
-                                Min( At( aIndex )->Name().Length(),
-                                KMaxListItemNameLength ),
-                                &At( aIndex )->Name()
-                                );
-                    }
-                }
-            else
-                { // protection not supported
-                aBuf.Format(
-                            KListItemFormatGraphicBearer,
-                            iOffset+iIconId,
-                            Min( At( aIndex )->Name().Length(),
-                            KMaxListItemNameLength ),
-                            &At( aIndex )->Name()
-                            );
-                }
-            break;
-            }
-        case EGraphicNone:
-            {
-            aBuf.Format(
-                        KListItemFormatGraphicNone,
-                        Min( At( aIndex )->Name().Length(),
-                        KMaxListItemNameLength ),
-                        &At( aIndex )->Name()
-                        );
-            break;
-            }
-        case EGraphicOnOff:
-            {
-            if ( iProtectionSupported )
-                {
-                TInt ProtectedIconId( 0 );
-                if ( At( aIndex )->IsReadOnly() )
-                    {
-                    ProtectedIconId = KPROTECTED_ICON_ID;
-                    aBuf.Format( 
-                                KListItemFormatGraphicOnOffWithLock,
-                                1, 
-                                Min( At( aIndex )->Name().Length(), 
-                                KMaxListItemNameLength ), 
-                                &At( aIndex )->Name(),
-                                iOffset + ProtectedIconId
-                                );
-                    }
-                else
-                    {
-                    aBuf.Format(
-                            KListItemFormatGraphicOnOff, 
-                            1, 
-                            Min( At( aIndex )->Name().Length(), 
-                            KMaxListItemNameLength ), 
-                            &At( aIndex )->Name() 
-                            ); // magic Number, does not works with anything else
-                    }
-                }
-            else
-                {
-                aBuf.Format(
-                            KListItemFormatGraphicOnOff,
-                            1,
-                            Min( At( aIndex )->Name().Length(),
-                            KMaxListItemNameLength ),
-                            &At( aIndex )->Name()
-                            );
-                }
-            break;
-            }
-        case EGraphicProtection:
-            {
-            if ( iProtectionSupported )
-                {
-                TInt ProtectedIconId( 0 );
-                if ( At( aIndex )->IsReadOnly() )
-                    {
-                    ProtectedIconId = 0;
-                    aBuf.Format( 
-                                KListItemFormatGraphicWithLock,
-                                Min( At( aIndex )->Name().Length(), 
-                                KMaxListItemNameLength ), 
-                                &At( aIndex )->Name(),
-                                iOffset + ProtectedIconId
-                                );
-                    }
-                else
-                    {
-                    aBuf.Format(
-                                KListItemFormatGraphicNone, 
-                                Min( At( aIndex )->Name().Length(), 
-                                KMaxListItemNameLength ), 
-                                &At( aIndex )->Name() 
-                                ); 
-                    }                
-                }
-            else
-                {
-                aBuf.Format(
-                            KListItemFormatGraphicNone, 
-                            Min( At( aIndex )->Name().Length(), 
-                            KMaxListItemNameLength ), 
-                            &At( aIndex )->Name() 
-                            );
-                }
-            break;
-            }
-        default:
-            {
-            __ASSERT_DEBUG( EFalse, Panic( EInvalidBitmapType ) );
-            break;
-            }
-        }
-    
-    APSETUILOGGER_LEAVEFN( EListbox,"SelListboxModel::FormatListboxText")
     }
 
 // End of File