idlefw/tsrc/framework/ut_aifw/stub/src/aiuicontroller_stub.cpp
branchRCL_3
changeset 27 2c7f27287390
equal deleted inserted replaced
25:9e077f9a342c 27:2c7f27287390
       
     1 /*
       
     2 * Copyright (c) 2005-2008 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:  UI controller stub
       
    15 *
       
    16 */
       
    17 
       
    18 // System includes
       
    19 #include <coemain.h>
       
    20 
       
    21 // User includes
       
    22 #include "aiuicontroller_stub.h"
       
    23 
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 // ----------------------------------------------------------------------------
       
    28 // CAiUiControllerStub::CAiUiControllerStub()
       
    29 //
       
    30 // ----------------------------------------------------------------------------
       
    31 //
       
    32 CAiUiControllerStub::CAiUiControllerStub()
       
    33     {
       
    34     }
       
    35 
       
    36 // ----------------------------------------------------------------------------
       
    37 // CAiUiControllerStub::NewL()
       
    38 //
       
    39 // ----------------------------------------------------------------------------
       
    40 //
       
    41 CAiUiControllerStub* CAiUiControllerStub::NewL()
       
    42     {
       
    43     CAiUiControllerStub* self = 
       
    44         new ( ELeave ) CAiUiControllerStub;
       
    45     
       
    46     CleanupStack::PushL( self );
       
    47     self->ConstructL();
       
    48     CleanupStack::Pop( self ); 
       
    49     
       
    50     return self;    
       
    51     }
       
    52 
       
    53 // ----------------------------------------------------------------------------
       
    54 // CAiUiControllerStub::NewL()
       
    55 //
       
    56 // ----------------------------------------------------------------------------
       
    57 //
       
    58 CAiUiControllerStub* CAiUiControllerStub::NewL( TUid /*aImpUid*/ )
       
    59     {
       
    60     return CAiUiControllerStub::NewL();
       
    61     }
       
    62 
       
    63 // ----------------------------------------------------------------------------
       
    64 // CAiUiControllerStub::~CAiUiControllerStub()
       
    65 //
       
    66 // ----------------------------------------------------------------------------
       
    67 //
       
    68 CAiUiControllerStub::~CAiUiControllerStub()
       
    69     {    
       
    70     }
       
    71 
       
    72 // ----------------------------------------------------------------------------
       
    73 // CAiUiControllerStub::ConstructL()
       
    74 //
       
    75 // ----------------------------------------------------------------------------
       
    76 //
       
    77 void CAiUiControllerStub::ConstructL()
       
    78     {    
       
    79     }
       
    80 
       
    81 // ----------------------------------------------------------------------------
       
    82 // CAiUiControllerStub::LoadUIDefinitionL()
       
    83 //
       
    84 // ----------------------------------------------------------------------------
       
    85 //
       
    86 void CAiUiControllerStub::LoadUIDefinitionL()
       
    87     {
       
    88     iUiDefinition = ETrue;
       
    89     }
       
    90 
       
    91 // ----------------------------------------------------------------------------
       
    92 // CAiUiControllerStub::GetSettingsL()
       
    93 //
       
    94 // ----------------------------------------------------------------------------
       
    95 //
       
    96 void CAiUiControllerStub::GetSettingsL( 
       
    97     const THsPublisherInfo& /*aPublisherInfo*/, 
       
    98     RAiSettingsItemArray& /*aSettings*/ )          
       
    99     {
       
   100     iSettings = ETrue;
       
   101     }
       
   102 
       
   103 // ----------------------------------------------------------------------------
       
   104 // CAiUiControllerStub::ActivateUI()
       
   105 //
       
   106 // ----------------------------------------------------------------------------
       
   107 //
       
   108 void CAiUiControllerStub::ActivateUI()
       
   109     {    
       
   110     iActive = ETrue;
       
   111     }
       
   112 
       
   113 // ----------------------------------------------------------------------------
       
   114 // CAiUiControllerStub::GetContentObserver()
       
   115 //
       
   116 // ----------------------------------------------------------------------------
       
   117 //
       
   118 MAiContentObserver& CAiUiControllerStub::GetContentObserver()
       
   119     {
       
   120     return *this;
       
   121     }
       
   122 
       
   123 // ----------------------------------------------------------------------------
       
   124 // CAiUiControllerStub::SetEventHandler()
       
   125 //
       
   126 // ----------------------------------------------------------------------------
       
   127 //
       
   128 void CAiUiControllerStub::SetEventHandler( 
       
   129     MAiFwEventHandler& /*aEventHandler*/ )
       
   130     {
       
   131     iEventHandler = ETrue;
       
   132     }
       
   133 
       
   134 // ----------------------------------------------------------------------------
       
   135 // CAiUiControllerStub::SetStateHandler()
       
   136 //
       
   137 // ----------------------------------------------------------------------------
       
   138 //
       
   139 void CAiUiControllerStub::SetStateHandler( 
       
   140     MAiFwStateHandler& /*aStateHandler*/ )
       
   141     {
       
   142     iStateHandler = ETrue;
       
   143     }
       
   144 
       
   145 // ----------------------------------------------------------------------------
       
   146 // CAiUiControllerStub::MainInterface()
       
   147 //
       
   148 // ----------------------------------------------------------------------------
       
   149 //
       
   150 MAiMainUiController* CAiUiControllerStub::MainInterface()
       
   151     {
       
   152     if ( iMain )
       
   153         {
       
   154         return this;
       
   155         }
       
   156     
       
   157     return NULL;
       
   158     }
       
   159 
       
   160 // ----------------------------------------------------------------------------
       
   161 // CAiUiControllerStub::SecondaryInterface()
       
   162 //
       
   163 // ----------------------------------------------------------------------------
       
   164 //
       
   165 MAiSecondaryUiController* CAiUiControllerStub::SecondaryInterface()
       
   166     {
       
   167     if ( !iMain )
       
   168         {
       
   169         return this;
       
   170         }
       
   171     
       
   172     return NULL;
       
   173     }
       
   174 
       
   175 // ----------------------------------------------------------------------------
       
   176 // CAiUiControllerStub::SecondaryInterface()
       
   177 //
       
   178 // ----------------------------------------------------------------------------
       
   179 //
       
   180 void CAiUiControllerStub::RunApplicationL()
       
   181     {
       
   182     iRunning = ETrue;
       
   183     }
       
   184 
       
   185 // ----------------------------------------------------------------------------
       
   186 // CAiUiControllerStub::SecondaryInterface()
       
   187 //
       
   188 // ----------------------------------------------------------------------------
       
   189 //
       
   190 CCoeEnv& CAiUiControllerStub::CoeEnv()
       
   191     {
       
   192     return *CCoeEnv::Static();
       
   193     }
       
   194 
       
   195 // ----------------------------------------------------------------------------
       
   196 // CAiUiControllerStub::SecondaryInterface()
       
   197 //
       
   198 // ----------------------------------------------------------------------------
       
   199 //
       
   200 void CAiUiControllerStub::Exit()
       
   201     {
       
   202     iExit = ETrue;
       
   203     }
       
   204 
       
   205 // ----------------------------------------------------------------------------
       
   206 // CAiUiControllerStub::IsMenuOpen()
       
   207 //
       
   208 // ----------------------------------------------------------------------------
       
   209 //
       
   210 TBool CAiUiControllerStub::IsMenuOpen()
       
   211     {
       
   212     return EFalse;
       
   213     }
       
   214 
       
   215 // ----------------------------------------------------------------------------
       
   216 // CAiUiControllerStub::SetCoeEnv()
       
   217 //
       
   218 // ----------------------------------------------------------------------------
       
   219 //
       
   220 void CAiUiControllerStub::SetCoeEnv( CCoeEnv& /*aCoeEnv*/ )
       
   221     {    
       
   222     }
       
   223 
       
   224 // ----------------------------------------------------------------------------
       
   225 // CAiUiControllerStub::StartTransaction()
       
   226 //
       
   227 // ----------------------------------------------------------------------------
       
   228 //
       
   229 TInt CAiUiControllerStub::StartTransaction( TInt /*aTxId*/ )
       
   230     {    
       
   231     return KErrNotSupported;
       
   232     }
       
   233 
       
   234 // ----------------------------------------------------------------------------
       
   235 // CAiUiControllerStub::Commit()
       
   236 //
       
   237 // ----------------------------------------------------------------------------
       
   238 //
       
   239 TInt CAiUiControllerStub::Commit( TInt /*aTxId*/ )
       
   240     {
       
   241     return KErrNotSupported;
       
   242     }
       
   243 
       
   244 // ----------------------------------------------------------------------------
       
   245 // CAiUiControllerStub::CancelTransaction()
       
   246 //
       
   247 // ----------------------------------------------------------------------------
       
   248 //
       
   249 TInt CAiUiControllerStub::CancelTransaction( TInt /*aTxId*/ )
       
   250     {
       
   251     return KErrNotSupported;
       
   252     }
       
   253 
       
   254 // ----------------------------------------------------------------------------
       
   255 // CAiUiControllerStub::CanPublish()
       
   256 //
       
   257 // ----------------------------------------------------------------------------
       
   258 //
       
   259 TBool CAiUiControllerStub::CanPublish( CHsContentPublisher& /*aPlugin*/, 
       
   260     TInt /*aContent*/, TInt /*aIndex*/ )     
       
   261     {
       
   262     return EFalse;
       
   263     }
       
   264 
       
   265 // ----------------------------------------------------------------------------
       
   266 // CAiUiControllerStub::Publish()
       
   267 //
       
   268 // ----------------------------------------------------------------------------
       
   269 //
       
   270 TInt CAiUiControllerStub::Publish( CHsContentPublisher& /*aPlugin*/, 
       
   271     TInt /*aContent*/, TInt /*aResource*/, TInt /*aIndex*/ )
       
   272     {
       
   273     return KErrNotSupported;
       
   274     }
       
   275 
       
   276 // ----------------------------------------------------------------------------
       
   277 // CAiUiControllerStub::Publish()
       
   278 //
       
   279 // ----------------------------------------------------------------------------
       
   280 //
       
   281 TInt CAiUiControllerStub::Publish( CHsContentPublisher& /*aPlugin*/, 
       
   282     TInt /*aContent*/, const TDesC16& /*aText*/, TInt /*aIndex*/ )
       
   283     {
       
   284     return KErrNotSupported;
       
   285     }
       
   286 
       
   287 // ----------------------------------------------------------------------------
       
   288 // CAiUiControllerStub::Publish()
       
   289 //
       
   290 // ----------------------------------------------------------------------------
       
   291 //
       
   292 TInt CAiUiControllerStub::Publish( CHsContentPublisher& /*aPlugin*/, 
       
   293     TInt /*aContent*/, const TDesC8& /*aBuf*/, TInt /*aIndex*/ )
       
   294     {
       
   295     return KErrNotSupported;
       
   296     }
       
   297 
       
   298 // ----------------------------------------------------------------------------
       
   299 // CAiUiControllerStub::Publish()
       
   300 //
       
   301 // ----------------------------------------------------------------------------
       
   302 //
       
   303 TInt CAiUiControllerStub::Publish( CHsContentPublisher& /*aPlugin*/, 
       
   304     TInt /*aContent*/, RFile& /*aFile*/, TInt /*aIndex*/ )
       
   305     {
       
   306     return KErrNotSupported;
       
   307     }
       
   308 
       
   309 // ----------------------------------------------------------------------------
       
   310 // CAiUiControllerStub::Clean()
       
   311 //
       
   312 // ----------------------------------------------------------------------------
       
   313 //
       
   314 TInt CAiUiControllerStub::Clean( CHsContentPublisher& /*aPlugin*/, 
       
   315     TInt /*aContent*/, TInt /*aIndex*/ )
       
   316     {
       
   317     return KErrNotSupported;
       
   318     }
       
   319 
       
   320 // ----------------------------------------------------------------------------
       
   321 // CAiUiControllerStub::Extension()
       
   322 //
       
   323 // ----------------------------------------------------------------------------
       
   324 //
       
   325 TAny* CAiUiControllerStub::Extension( TUid /*aUid*/ )
       
   326     {
       
   327     return NULL;
       
   328     }
       
   329 
       
   330 // ----------------------------------------------------------------------------
       
   331 // CAiUiControllerStub::RequiresSubscription()
       
   332 //
       
   333 // ----------------------------------------------------------------------------
       
   334 //
       
   335 TBool CAiUiControllerStub::RequiresSubscription( 
       
   336     const THsPublisherInfo& /*aPublisherInfo*/ ) const     
       
   337     {
       
   338     if ( iMain )
       
   339         {
       
   340         return ETrue;
       
   341         }
       
   342     
       
   343     return EFalse;
       
   344     }
       
   345 
       
   346 // ----------------------------------------------------------------------------
       
   347 // CAiUiControllerStub::SetProperty()
       
   348 //
       
   349 // ----------------------------------------------------------------------------
       
   350 //
       
   351 TInt CAiUiControllerStub::SetProperty( CHsContentPublisher& /*aPlugin*/,
       
   352         const TDesC8& /*aElementId*/,
       
   353         const TDesC8& /*aPropertyName*/,
       
   354         const TDesC8& /*aPropertyValue*/ )
       
   355     {
       
   356     return KErrNotSupported;
       
   357     }
       
   358 
       
   359 // ----------------------------------------------------------------------------
       
   360 // CAiUiControllerStub::SetProperty()
       
   361 //
       
   362 // ----------------------------------------------------------------------------
       
   363 //
       
   364 TInt CAiUiControllerStub::SetProperty( CHsContentPublisher& /*aPlugin*/,
       
   365         const TDesC8& /*aElementId*/,
       
   366         const TDesC8& /*aPropertyName*/,
       
   367         const TDesC8& /*aPropertyValue*/,  
       
   368         MAiContentObserver::TValueType /*aValueType*/ )
       
   369     {
       
   370     return KErrNotSupported;
       
   371     }
       
   372 
       
   373 // End of file