cbs/cbsui/src/cbsuiutility.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
       
     2 * Copyright (c) 2002 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: 
       
    15 *   Implementation of CbsUiClenaupHandler     
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 // INCLUDES
       
    22 #include    "CbsUiUtility.h"
       
    23 #include    "MSaveMessageController.h"
       
    24 #include    "CbsUiDebug.h"
       
    25 #include    "MCbs.h"
       
    26 
       
    27 
       
    28 
       
    29 // =================== MEMBER FUNCTIONS ====================
       
    30 
       
    31 
       
    32 // ---------------------------------------------------------
       
    33 // CbsUiUtility::ShowConfirmationNoteL
       
    34 // 
       
    35 // 
       
    36 // ---------------------------------------------------------
       
    37 //
       
    38 void CbsUiUtility::ShowConfirmationNoteL(
       
    39     const TInt aResourceId, TBool aWaitingDialog )
       
    40     {
       
    41     /*HBufC* text = CCoeEnv::Static()->AllocReadResourceLC(aResourceId);
       
    42     CAknConfirmationNote* note = 
       
    43         new (ELeave) CAknConfirmationNote(aWaitingDialog);
       
    44     note->ExecuteLD(*text);
       
    45     CleanupStack::PopAndDestroy(text);*/
       
    46     }
       
    47 
       
    48 // ---------------------------------------------------------
       
    49 // CbsUiUtility::ShowErrorNoteL
       
    50 // 
       
    51 // 
       
    52 // ---------------------------------------------------------
       
    53 //
       
    54 void CbsUiUtility::ShowErrorNoteL( const TInt aResourceId )
       
    55     {
       
    56     /*HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId );
       
    57     CAknErrorNote* note = new (ELeave) CAknErrorNote;
       
    58     note->ExecuteLD( *text );
       
    59     CleanupStack::PopAndDestroy( text );*/
       
    60     }
       
    61 
       
    62 // ---------------------------------------------------------
       
    63 // CbsUiUtility::ShowWarningNoteL
       
    64 // 
       
    65 // 
       
    66 // ---------------------------------------------------------
       
    67 //
       
    68 void CbsUiUtility::ShowWarningNoteL( const TInt aResourceId )
       
    69     {
       
    70    /* HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId );
       
    71     CAknWarningNote* note = new (ELeave) CAknWarningNote;
       
    72     note->ExecuteLD( *text );
       
    73     CleanupStack::PopAndDestroy( text );*/
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------
       
    77 // CbsUiUtility::CreateEmptyNavigationPaneL
       
    78 // 
       
    79 // 
       
    80 // ---------------------------------------------------------
       
    81 //
       
    82 /*CAknNavigationDecorator* CbsUiUtility::CreateEmptyNavigationPaneL()
       
    83     {
       
    84     CEikStatusPane* statusPane = 
       
    85         STATIC_CAST( CAknAppUi*, 
       
    86             CEikonEnv::Static()->EikAppUi() )->StatusPane();
       
    87 
       
    88     CAknNavigationControlContainer* naviContainer = 
       
    89         STATIC_CAST( CAknNavigationControlContainer*, statusPane->
       
    90         ControlL(TUid::Uid(EEikStatusPaneUidNavi)) );
       
    91 
       
    92     CAknNavigationDecorator* decorator;
       
    93     decorator = naviContainer->CreateNavigationLabelL();
       
    94 
       
    95     naviContainer->PushL(*decorator);
       
    96 
       
    97     return decorator;
       
    98     }*/
       
    99 
       
   100 // ---------------------------------------------------------
       
   101 // CbsUiUtility::IsSavedL
       
   102 // 
       
   103 // 
       
   104 // ---------------------------------------------------------
       
   105 //
       
   106 TBool CbsUiUtility::IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer )
       
   107     {
       
   108     /*__ASSERT_DEBUG(&aServer, CbsUiPanic(EErrNullPointer) );
       
   109     __ASSERT_DEBUG(aServer.Connected(), CbsUiPanic(EErrServerDisconnected) );
       
   110 
       
   111     TCbsMessage message;
       
   112     
       
   113     TInt ret = aServer.FindMessageByHandle(aHandle, message);
       
   114 
       
   115     __CBSUI_ASSERT( ret == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) );
       
   116 
       
   117     User::LeaveIfError(ret);
       
   118     TBool saved(EFalse);
       
   119 
       
   120     if ( message.iPermanent )
       
   121         {
       
   122         saved = ETrue;
       
   123         }
       
   124            */
       
   125     return EFalse; //saved;
       
   126     }
       
   127 
       
   128 // ---------------------------------------------------------
       
   129 // CbsUiUtility::SaveCurrentMessageL
       
   130 // 
       
   131 // 
       
   132 // ---------------------------------------------------------
       
   133 //
       
   134 TInt CbsUiUtility::SaveCurrentMessageL(
       
   135     const TCbsMessageHandle aHandle, MSaveMessageController& aSaver )
       
   136     {    
       
   137    /* __ASSERT_DEBUG(&aSaver, CbsUiPanic(EErrNullPointer) );
       
   138 
       
   139     TInt resultCode( aSaver.SaveMessage(aHandle) );
       
   140     
       
   141     switch ( resultCode )
       
   142         {
       
   143         case KErrDiskFull:
       
   144             {
       
   145             User::Leave( KErrDiskFull );
       
   146             break;
       
   147             }
       
   148         case KErrNone: // Normal case
       
   149             {
       
   150             // do nothing
       
   151             break;
       
   152             }
       
   153         default:
       
   154             {          
       
   155             //CbsUiUtility::ShowErrorNoteL(R_TEXT_NOTE_MEMORY_FULL_ERROR);
       
   156             break;
       
   157             } 
       
   158         }  */
       
   159 
       
   160     return 0; //resultCode;
       
   161     }
       
   162 
       
   163 //  End of File