messagingfw/deprecate/senduiservices/src/SendUiImpl.cpp
branchRCL_3
changeset 23 d51193d814ea
parent 22 d2c4c66342f3
child 24 002ade1da91c
equal deleted inserted replaced
22:d2c4c66342f3 23:d51193d814ea
     1 /*
       
     2 * Copyright (c) 2002-2006 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:   Can be used to show "Send" list query and to create and send
       
    15 *                messages via available sending services. Created messages are
       
    16 *                sent directly or message editor is opened for editing,
       
    17 *                depending on the type of the selected service.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #include <coemain.h>
       
    23 #include <sendnorm.rsg>
       
    24 #include <aknlistquerydialog.h>
       
    25 #include <eikmenup.h>
       
    26 #include <data_caging_path_literals.hrh>
       
    27 #include <DRMHelper.h>
       
    28 #include <centralrepository.h>
       
    29 #include <e32cmn.h> // Uid
       
    30 #include <e32property.h>
       
    31 #include <barsread.h>
       
    32 #include <akninputblock.h>
       
    33 #include <centralrepository.h>
       
    34 #include <miutset.h>
       
    35 //#include <MessagingDomainCRKeys.h>
       
    36 
       
    37 // Features
       
    38 #include <featmgr.h>    
       
    39 #include <bldvariant.hrh>
       
    40 //#include <msgmimetypes.h>
       
    41 //#include <CSendingServiceInfo.h>
       
    42 //#include <CSendingService.h>
       
    43 //#include <CMessageData.h>
       
    44 //#include <SendUiConsts.h>
       
    45 //#include <senduisingleton.h>
       
    46 
       
    47 #include "SendUiImpl.h"
       
    48 #include "senduiserviceclient.h"
       
    49 #include "SendUiCapabilityCheck.h"
       
    50 #include "SendUiUtils.h"
       
    51 #include "senduiserviceslog.h"              // Logging
       
    52 #include "SendUiPrivateCRKeys.h"
       
    53 #include "senduiproperty.h"
       
    54 #include "propertyobserver.h"
       
    55 #include "senduilauncher.h"
       
    56 #include "SendUiInternalConsts.h"
       
    57 
       
    58 
       
    59 const TInt KArrayGranularity = 2;
       
    60 const TInt KSendUiServiceOrderArrayGranularity = 6;
       
    61 const TInt KTitleBufLength = 64;
       
    62 
       
    63 
       
    64 _LIT( KSendUiResourceFileName,"sendnorm.rsc" );
       
    65 
       
    66 // ======== MEMBER FUNCTIONS ========
       
    67 // -----------------------------------------------------------------------------
       
    68 // CSendUiImpl::NewL
       
    69 // Two-phased constructor.
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 CSendUiImpl* CSendUiImpl::NewL()
       
    73     {
       
    74     
       
    75     }
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // Destructor
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 CSendUiImpl::~CSendUiImpl()
       
    82     {
       
    83     
       
    84     }
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // AddTypedMenuItemL
       
    88 //
       
    89 // No menu item is added, if services are not found. This can happen if asyncronous
       
    90 // sending service update is not yet finished.
       
    91 // -----------------------------------------------------------------------------
       
    92 //
       
    93 void CSendUiImpl::AddTypedMenuItemL(
       
    94     CSendUi::TSendUiMenuType    aMenuType,
       
    95     CEikMenuPane&               aMenuPane,
       
    96     TInt                        aIndex,
       
    97     TInt                        aCommandId,
       
    98     TSendingCapabilities        aRequiredCapabilities )
       
    99     {
       
   100    
       
   101     }
       
   102 
       
   103 // -----------------------------------------------------------------------------
       
   104 // ShowTypedQueryAndSendL
       
   105 // First shows list query and then creates the message.
       
   106 // Editor is launched for editing the message or the message is sent
       
   107 // directly without opening the editor. Functionality depends on the
       
   108 // type of selected sending service.
       
   109 // -----------------------------------------------------------------------------
       
   110 //
       
   111 void CSendUiImpl::ShowTypedQueryAndSendL(
       
   112     CSendUi::TSendUiMenuType    aMenuType,
       
   113     const CMessageData*         aMessageData,
       
   114     TSendingCapabilities        aRequiredCapabilities,
       
   115     CArrayFix<TUid>*            aServicesToDim,
       
   116     TBool                       aLaunchEditorEmbedded,
       
   117     const TDesC&                aTitleText )
       
   118     {
       
   119    
       
   120     }
       
   121 
       
   122 // -----------------------------------------------------------------------------
       
   123 // ShowTypedQueryL
       
   124 // Shows list query and returns the user selection.
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 TUid CSendUiImpl::ShowTypedQueryL(
       
   128     CSendUi::TSendUiMenuType    aMenuType,
       
   129     const CMessageData*         aMessageData,
       
   130     TSendingCapabilities        aRequiredCapabilities,
       
   131     CArrayFix<TUid>*            aServicesToDim,
       
   132     const TDesC&                aTitleText )
       
   133     {
       
   134     }
       
   135 
       
   136 // -----------------------------------------------------------------------------
       
   137 // SendMessageL
       
   138 // -----------------------------------------------------------------------------
       
   139 TInt CSendUiImpl::SendMessageL(    
       
   140     TUid                    aServiceUid,
       
   141     const CMessageData*     aMessageData,
       
   142     TBool                   aLaunchEditorEmbedded)
       
   143     { 
       
   144     }
       
   145 
       
   146 // -----------------------------------------------------------------------------
       
   147 // SendMessageViaServer
       
   148 // -----------------------------------------------------------------------------
       
   149 //
       
   150 void CSendUiImpl::SendMessageViaServerL( 
       
   151     TUid                    aServiceUid,
       
   152     const CMessageData*     aMessageData,
       
   153     TBool                   aLaunchEditorEmbedded )
       
   154     {
       
   155    
       
   156     }
       
   157 
       
   158 // -----------------------------------------------------------------------------
       
   159 // CreateAndSendMessageL
       
   160 // Creates the message and launches the editor for editing the message
       
   161 // or sends the message directly without opening the editor. 
       
   162 // Functionality depends on the type of selected sending service.
       
   163 // -----------------------------------------------------------------------------
       
   164 //
       
   165 void CSendUiImpl::CreateAndSendMessageL(
       
   166     TUid                    aServiceUid,
       
   167     const CMessageData*     aMessageData,
       
   168     TBool                   aLaunchEditorEmbedded )
       
   169     {
       
   170    
       
   171    }
       
   172 
       
   173 // -----------------------------------------------------------------------------
       
   174 // ServiceCapabilitiesL
       
   175 // Returns sending capabilities of the sending service.
       
   176 // -----------------------------------------------------------------------------
       
   177 //
       
   178 TInt CSendUiImpl::ServiceCapabilities(
       
   179     TUid                    aServiceUid,
       
   180     TSendingCapabilities&   aServiceCapabilities )
       
   181     {
       
   182      }
       
   183 
       
   184 // -----------------------------------------------------------------------------
       
   185 // AvailableServicesL
       
   186 // Populates given list with the information about services
       
   187 // provided by specified ECom service provider.
       
   188 // (other items were commented in a header).
       
   189 // -----------------------------------------------------------------------------
       
   190 //
       
   191 
       
   192 void CSendUiImpl::AvailableServicesL(
       
   193     RPointerArray<CSendingServiceInfo>& aServiceList,
       
   194     TUid aServiceProvider)
       
   195     {
       
   196     
       
   197     }
       
   198 // -----------------------------------------------------------------------------
       
   199 // TechnologyType
       
   200 // -----------------------------------------------------------------------------
       
   201 //
       
   202 TUid CSendUiImpl::TechnologyType( TUid aServiceUid )
       
   203     {
       
   204     
       
   205     }
       
   206 
       
   207 // -----------------------------------------------------------------------------
       
   208 //
       
   209 // -----------------------------------------------------------------------------
       
   210 //
       
   211 TInt CSendUiImpl::ResolveServiceIndex( TUid aServiceUid )
       
   212     {
       
   213    
       
   214     }
       
   215 
       
   216 // -----------------------------------------------------------------------------
       
   217 // QueryCapabilities
       
   218 // -----------------------------------------------------------------------------
       
   219 //
       
   220 TBool CSendUiImpl::QueryCapabilities( 
       
   221     TInt index, 
       
   222     TSendingCapabilities aRequiredCapabilities )
       
   223     {
       
   224    
       
   225     }
       
   226 
       
   227 // -----------------------------------------------------------------------------
       
   228 // CSendUiImpl::GetServicesL
       
   229 // 
       
   230 // (other items were commented in a header).
       
   231 // -----------------------------------------------------------------------------
       
   232 //
       
   233 
       
   234 void CSendUiImpl::GetServicesL( )
       
   235 {
       
   236     
       
   237 }
       
   238 
       
   239 // ---------------------------------------------------------
       
   240 // ShowListQueryL(
       
   241 // Displays list query.
       
   242 // (other items were commented in a header).
       
   243 // ---------------------------------------------------------
       
   244 // 
       
   245 TUid CSendUiImpl::ShowListQueryL(
       
   246     MDesCArray*                 aListItems,
       
   247     const CArrayFix<TUid>&      aListItemUids,
       
   248     const TDesC&                aTitleText,
       
   249     CSendUi::TSendUiMenuType    aMenuType )
       
   250     {
       
   251    
       
   252     }
       
   253 
       
   254 
       
   255 // -----------------------------------------------------------------------------
       
   256 // CanSendContentL
       
   257 // -----------------------------------------------------------------------------
       
   258 //
       
   259 TBool CSendUiImpl::CanSendContentL(
       
   260     TUid                    aServiceUid,
       
   261     TUid                    aServiceProviderId,
       
   262     const CMessageData*     aMessageData,
       
   263     TDataType*              aMimeType )
       
   264     {
       
   265    
       
   266    }
       
   267 
       
   268 // -----------------------------------------------------------------------------
       
   269 // CSendUiImpl::FilterServicesL
       
   270 // 
       
   271 // (other items were commented in a header).
       
   272 // -----------------------------------------------------------------------------
       
   273 //
       
   274 void CSendUiImpl::FilterServicesL(
       
   275     CDesCArrayFlat&         aListItems,
       
   276     CArrayFix<TUid>&        aListItemUids,
       
   277     TSendingCapabilities    aRequiredCapabilities,
       
   278     const CMessageData*     aMessageData,
       
   279     CSendUi::TSendUiMenuType    aMenuType  )
       
   280     {
       
   281     
       
   282     }
       
   283 
       
   284 // -----------------------------------------------------------------------------
       
   285 // SortListL
       
   286 // Sets ECom services to correct positions in "Send"-list query.
       
   287 // -----------------------------------------------------------------------------
       
   288 //
       
   289 void CSendUiImpl::SortListL(
       
   290     CDesCArrayFlat&     aListItems,
       
   291     CArrayFix<TUid>&    aListItemUids )
       
   292     {
       
   293     
       
   294     }
       
   295 
       
   296 
       
   297 // ---------------------------------------------------------
       
   298 // ResetIsSending
       
   299 // Resets sending state flag.
       
   300 // ---------------------------------------------------------
       
   301 //    
       
   302 void CSendUiImpl::ResetIsSending( TAny* aAny )
       
   303     {
       
   304     }
       
   305 
       
   306 // -----------------------------------------------------------------------------
       
   307 // CheckServiceCapabilities
       
   308 // Compares ECom service sending capabilities to required capabilities.
       
   309 // (other items were commented in a header).
       
   310 // -----------------------------------------------------------------------------
       
   311 //
       
   312 TBool CSendUiImpl::CheckServiceCapabilities(
       
   313     TUid                    aServiceUid,
       
   314     TSendingCapabilities    aRequiredCapabilities )
       
   315     {
       
   316     
       
   317     }
       
   318 
       
   319 // -----------------------------------------------------------------------------
       
   320 // CSendUiImpl
       
   321 // C++ default constructor can NOT contain any code, that
       
   322 // might leave.
       
   323 // -----------------------------------------------------------------------------
       
   324 //
       
   325 CSendUiImpl::CSendUiImpl()
       
   326     :  iCoeEnv( CCoeEnv::Static() ),
       
   327         iFs( iCoeEnv->FsSession() ),
       
   328         iResourceLoader( *iCoeEnv )
       
   329         
       
   330     {
       
   331     }
       
   332 
       
   333 // -----------------------------------------------------------------------------
       
   334 // CSendUiImpl::FeatureStatus
       
   335 // -----------------------------------------------------------------------------
       
   336 //
       
   337 void CSendUiImpl::FeatureStatus( TInt aFeature, TInt &aNewFeatures, TInt aFeatureFlag )
       
   338     {
       
   339     
       
   340     }
       
   341 // ConstructL
       
   342 // Symbian 2nd phase constructor can leave.
       
   343 // -----------------------------------------------------------------------------
       
   344 //
       
   345 void CSendUiImpl::ConstructL()
       
   346     {
       
   347     
       
   348     }
       
   349 
       
   350 // end of file
       
   351