sipplugins/sippsipsettingsui/tsrc/UT_sipsettingsui/src/sipprofileregistrybasestub.cpp
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2003 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:  implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //  INCLUDE FILES
       
    20 
       
    21 #include "sip.h"
       
    22 #include "sipprofileregistrybase.h"
       
    23 #include "sipprofileregistryobserver.h"
       
    24 #include "sipprofileregistry.h"
       
    25 #include "sipprofileregistryobserver.h"
       
    26 #include "sipmanagedprofile.h"
       
    27 
       
    28 // ============================ MEMBER FUNCTIONS ===============================
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // CSIPProfileRegistryBase::~CSIPProfileRegistryBase
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 EXPORT_C CSIPProfileRegistryBase::~CSIPProfileRegistryBase()
       
    35 	{
       
    36 	
       
    37 		
       
    38 	//iProfiles.ResetAndDestroy();
       
    39 	//iProfiles.Close();
       
    40 	
       
    41 	}
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CSIPProfileRegistryBase::ProfilesL
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 EXPORT_C void CSIPProfileRegistryBase::ProfilesL(
       
    48 			 RPointerArray<CSIPProfile>& aProfiles)
       
    49 	{
       
    50 	// stubs
       
    51 	CSIPProfileRegistry* reg = (CSIPProfileRegistry*) this;
       
    52 	CSIPProfile* profile = CSIPProfile::NewLC(reg);
       
    53 	
       
    54 	aProfiles.AppendL ( profile  );
       
    55 	
       
    56 	CleanupStack::Pop( profile );
       
    57 
       
    58 	
       
    59 	}
       
    60 	
       
    61 // -----------------------------------------------------------------------------
       
    62 // CSIPProfileRegistryBase::ProfilesL
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 EXPORT_C void CSIPProfileRegistryBase::ProfilesL(
       
    66 			 const TSIPProfileTypeInfo& /*aType*/,
       
    67 			 RPointerArray<CSIPProfile>& aProfiles)
       
    68 	{
       
    69 		// stubs
       
    70 	CSIPProfileRegistry* reg = (CSIPProfileRegistry*) this;
       
    71 	
       
    72 	CSIPProfile* profile = CSIPProfile::NewLC( reg );
       
    73 	aProfiles.AppendL ( profile  );
       
    74 
       
    75 	CleanupStack::Pop( profile );
       
    76 	
       
    77 	}
       
    78 
       
    79 // -----------------------------------------------------------------------------
       
    80 // CSIPProfileRegistryBase::ProfilesL
       
    81 // -----------------------------------------------------------------------------
       
    82 //
       
    83 EXPORT_C void CSIPProfileRegistryBase::ProfilesL(
       
    84 			 const TDesC8& /*aAOR*/,
       
    85 			 RPointerArray<CSIPProfile>& aProfiles)
       
    86 	{
       
    87 	// stubs
       
    88 	ProfilesL( aProfiles );
       
    89 	}
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 // CSIPProfileRegistryBase::ProfilesCommonL
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 void CSIPProfileRegistryBase::ProfilesCommonL(
       
    96 			 				RPointerArray<CSIPProfile>& /*aProfiles*/,
       
    97 			 				CSIPConcreteProfileHolder* /*aHolder */)
       
    98 	{
       
    99 	User::Leave( KErrNotSupported );
       
   100 	}
       
   101 
       
   102 // -----------------------------------------------------------------------------
       
   103 // CSIPProfileRegistryBase::ProfileL
       
   104 // -----------------------------------------------------------------------------
       
   105 //
       
   106 EXPORT_C CSIPProfile* CSIPProfileRegistryBase::ProfileL(TUint32 /*aId*/)
       
   107     {
       
   108 	return NewInstanceL();
       
   109 	}
       
   110 
       
   111 	
       
   112 //
       
   113 // -----------------------------------------------------------------------------
       
   114 // CSIPProfileRegistryBase::DefaultProfileL
       
   115 // -----------------------------------------------------------------------------
       
   116 //
       
   117 EXPORT_C CSIPProfile* CSIPProfileRegistryBase::DefaultProfileL()
       
   118 	{
       
   119 	CSIPProfile* defaultProfile = NewInstanceL();
       
   120     defaultProfile->iIsDefaultProfile = ETrue;
       
   121 	return defaultProfile;
       
   122 	}
       
   123 
       
   124 // -----------------------------------------------------------------------------
       
   125 // CSIPProfileRegistryBase::SupportedProfileTypesL
       
   126 // -----------------------------------------------------------------------------
       
   127 //
       
   128 EXPORT_C void CSIPProfileRegistryBase::SupportedProfileTypesL(
       
   129 					RArray<TSIPProfileTypeInfo>& /*aSupportedProfileTypes*/ )
       
   130 	{
       
   131 	User::Leave( KErrNotSupported );
       
   132 	}
       
   133 
       
   134 // -----------------------------------------------------------------------------
       
   135 // CSIPProfileRegistryBase::LastRegistrationError
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 EXPORT_C TInt CSIPProfileRegistryBase::LastRegistrationError(
       
   139 			 const CSIPProfile& /*aProfile*/) const
       
   140 	{
       
   141 	return KErrNone;
       
   142 	}
       
   143 
       
   144 // -----------------------------------------------------------------------------
       
   145 // CSIPProfileRegistryBase::CSIPProfileRegistryBase
       
   146 // -----------------------------------------------------------------------------
       
   147 //
       
   148 CSIPProfileRegistryBase::CSIPProfileRegistryBase(
       
   149 	MSIPProfileRegistryObserver& aObserver):
       
   150 	iObserver(aObserver)
       
   151 	{
       
   152 
       
   153 	}
       
   154 
       
   155 // -----------------------------------------------------------------------------
       
   156 // CSIPProfileRegistryBase::ProfileDeleted
       
   157 // -----------------------------------------------------------------------------
       
   158 //
       
   159 void CSIPProfileRegistryBase::ProfileDeleted(CSIPProfile& /*aProfile*/)
       
   160 	{
       
   161 	}
       
   162 
       
   163 // -----------------------------------------------------------------------------
       
   164 // CSIPProfileRegistryBase::EnableProfileL
       
   165 // -----------------------------------------------------------------------------
       
   166 //
       
   167 void CSIPProfileRegistryBase::EnableProfileL(
       
   168 	CSIPProfile& /*aProfile*/)
       
   169 	{
       
   170 	User::Leave( KErrNotSupported );
       
   171 	}
       
   172 
       
   173 // -----------------------------------------------------------------------------
       
   174 // CSIPProfileRegistryBase::DisableProfileL
       
   175 // -----------------------------------------------------------------------------
       
   176 //
       
   177 void CSIPProfileRegistryBase::DisableProfileL(CSIPProfile& /*aProfile*/)
       
   178 	{
       
   179 	User::Leave( KErrNotSupported );
       
   180 	}
       
   181 
       
   182 // -----------------------------------------------------------------------------
       
   183 // CSIPProfileRegistryBase::UsageL
       
   184 // -----------------------------------------------------------------------------
       
   185 //
       
   186 TInt CSIPProfileRegistryBase::UsageL(const CSIPProfile& /*aProfile*/) const
       
   187 	{
       
   188 	User::Leave( KErrNotSupported );
       
   189 	return KErrNone;
       
   190 	}
       
   191 
       
   192 // -----------------------------------------------------------------------------
       
   193 // CSIPProfileRegistryBase::AddProfileL
       
   194 // -----------------------------------------------------------------------------
       
   195 //
       
   196 void CSIPProfileRegistryBase::AddProfileL(CSIPProfile& /*aProfile*/)
       
   197 	{
       
   198 	User::Leave( KErrNotSupported );
       
   199 	}
       
   200 
       
   201 // -----------------------------------------------------------------------------
       
   202 // CSIPProfileRegistryBase::UpdateProfileL
       
   203 // -----------------------------------------------------------------------------
       
   204 //
       
   205 void CSIPProfileRegistryBase::UpdateProfileL(CSIPProfile& /*aProfile*/)
       
   206 	{	
       
   207 	User::Leave( KErrNotSupported );
       
   208 	}
       
   209 
       
   210 // -----------------------------------------------------------------------------
       
   211 // CSIPProfileRegistryBase::RemoveProfileL
       
   212 // -----------------------------------------------------------------------------
       
   213 //
       
   214 void CSIPProfileRegistryBase::RemoveProfileL(CSIPProfile& /*aProfile*/)
       
   215 	{
       
   216 	User::Leave( KErrNotSupported );
       
   217 	}
       
   218 
       
   219 // -----------------------------------------------------------------------------
       
   220 // CSIPProfileRegistryBase::IsDefaultProfileL
       
   221 // -----------------------------------------------------------------------------
       
   222 //
       
   223 TBool CSIPProfileRegistryBase::IsDefaultProfileL(const CSIPProfile& /*aProfile*/)
       
   224 	{
       
   225 	User::Leave( KErrNotSupported );
       
   226 	return ETrue;
       
   227 	}
       
   228 
       
   229 // -----------------------------------------------------------------------------
       
   230 // CSIPProfileRegistryBase::RegistrationStatusChangedL
       
   231 // -----------------------------------------------------------------------------
       
   232 //
       
   233 void CSIPProfileRegistryBase::NegotiatedSecurityMechanismL(
       
   234 	CSIPConcreteProfile& /*aProfile*/)
       
   235 	{
       
   236 	User::Leave( KErrNotSupported );
       
   237 	}
       
   238 
       
   239 // -----------------------------------------------------------------------------
       
   240 // CSIPProfileRegistryBase::RegisteredAORsL
       
   241 // -----------------------------------------------------------------------------
       
   242 //
       
   243 void CSIPProfileRegistryBase::RegisteredAORsL(CSIPConcreteProfile& /*aProfile*/)
       
   244 	{
       
   245 	User::Leave( KErrNotSupported );
       
   246 	}
       
   247 
       
   248 // -----------------------------------------------------------------------------
       
   249 // CSIPProfileRegistryBase::SIPProfileL
       
   250 // -----------------------------------------------------------------------------
       
   251 //
       
   252 CSIPProfile* CSIPProfileRegistryBase::SIPProfileL(TUint32 aId, TInt /*aSize*/)
       
   253 	{
       
   254 	__ASSERT_ALWAYS (aId > 1, User::Leave (KErrArgument));
       
   255 	return NULL;
       
   256 	}
       
   257 
       
   258 // -----------------------------------------------------------------------------
       
   259 // CSIPProfileRegistryBase::StoreProfileL
       
   260 // -----------------------------------------------------------------------------
       
   261 //
       
   262 void CSIPProfileRegistryBase::StoreProfileL(CSIPProfileCleanupItem* /*aCleanupItem*/)
       
   263 	{
       
   264 	User::Leave( KErrNotSupported );
       
   265 	}
       
   266 
       
   267 // -----------------------------------------------------------------------------
       
   268 // CSIPProfileRegistryBase::StoreProfileL
       
   269 // -----------------------------------------------------------------------------
       
   270 //
       
   271 void CSIPProfileRegistryBase::StoreArrayL(
       
   272 	RPointerArray<CSIPConcreteProfile>& /*aProfiles*/,
       
   273 	RPointerArray<CSIPProfile>& /*aRetProfiles*/)
       
   274 	{
       
   275 	User::Leave( KErrNotSupported );
       
   276 	}
       
   277 
       
   278 // -----------------------------------------------------------------------------
       
   279 // CSIPProfileRegistryBase::ProfileItemL
       
   280 // -----------------------------------------------------------------------------
       
   281 //
       
   282 /*
       
   283 CSIPProfileItem* CSIPProfileRegistryBase::ProfileItemL(TUint aProfileId )
       
   284 	{
       
   285 	User::Leave( KErrNotSupported );
       
   286 	return NULL;
       
   287 	}
       
   288 */
       
   289 
       
   290 // -----------------------------------------------------------------------------
       
   291 // CSIPProfileRegistryBase::ProfileIndex
       
   292 // -----------------------------------------------------------------------------
       
   293 //
       
   294 TInt CSIPProfileRegistryBase::ProfileIndex (TUint /*profileId*/)
       
   295 	{
       
   296 	return 0;
       
   297 	}
       
   298 
       
   299 // -----------------------------------------------------------------------------
       
   300 // CSIPProfileRegistryBase::ProfileItemByIndex
       
   301 // -----------------------------------------------------------------------------
       
   302 //
       
   303 CSIPProfileItem* CSIPProfileRegistryBase::ProfileItemByIndex(TUint /*aIndex*/)
       
   304 	{
       
   305 	return NULL;
       
   306 	}
       
   307 
       
   308 
       
   309 // -----------------------------------------------------------------------------
       
   310 // CSIPProfileRegistryBase::RegistrationStatusChangedL
       
   311 // -----------------------------------------------------------------------------
       
   312 //
       
   313 void CSIPProfileRegistryBase::RegistrationStatusChangedL(TUint32 /*aProfileId*/,
       
   314 							  TInt /*aStatus*/,
       
   315 							  TUint32 /*aStatusId*/)
       
   316 	{
       
   317 	User::Leave( KErrNotSupported );
       
   318 	}
       
   319 
       
   320 // -----------------------------------------------------------------------------
       
   321 // CSIPProfileRegistryBase::UpdatedL
       
   322 // -----------------------------------------------------------------------------
       
   323 //
       
   324 void CSIPProfileRegistryBase::UpdatedL(TUint32 /*aProfileId*/, TUint /*aSize*/)
       
   325 	{
       
   326 	User::Leave( KErrNotSupported );
       
   327 	}
       
   328 
       
   329 // -----------------------------------------------------------------------------
       
   330 // CSIPProfileRegistryBase::AddedL
       
   331 // -----------------------------------------------------------------------------
       
   332 //
       
   333 void CSIPProfileRegistryBase::AddedL(TUint32 /*aProfileId*/) 
       
   334 	{
       
   335 	User::Leave( KErrNotSupported );
       
   336 	}
       
   337 
       
   338 // -----------------------------------------------------------------------------
       
   339 // CSIPProfileRegistryBase::RemovedL
       
   340 // -----------------------------------------------------------------------------
       
   341 //
       
   342 void CSIPProfileRegistryBase::RemovedL(TUint32 /*aProfileId*/)
       
   343 	{
       
   344 	User::Leave( KErrNotSupported );
       
   345 	}	
       
   346 
       
   347 // -----------------------------------------------------------------------------
       
   348 // CSIPProfileRegistryBase::ErrorOccurredL
       
   349 // -----------------------------------------------------------------------------
       
   350 //
       
   351 void CSIPProfileRegistryBase::ErrorOccurredL(TUint32 /*aProfileId*/,
       
   352 										   TInt /*aStatus*/,
       
   353 										   TInt /*aError*/ )
       
   354 	{
       
   355 	User::Leave( KErrNotSupported );
       
   356 	}
       
   357 
       
   358 // -----------------------------------------------------------------------------
       
   359 // CSIPProfileRegistryBase::BaseConstructL
       
   360 // -----------------------------------------------------------------------------
       
   361 //
       
   362 void CSIPProfileRegistryBase::BaseConstructL()
       
   363 	{
       
   364 
       
   365 	}
       
   366 
       
   367 // -----------------------------------------------------------------------------
       
   368 // CSIPProfileRegistryBase::CrashRevert
       
   369 // -----------------------------------------------------------------------------
       
   370 //
       
   371 void CSIPProfileRegistryBase::CrashRevert (TAny* /*aItem*/)
       
   372 	{
       
   373 	}
       
   374 
       
   375 // -----------------------------------------------------------------------------
       
   376 // CSIPProfileRegistryBase::LocalCrashRevert
       
   377 // -----------------------------------------------------------------------------
       
   378 //
       
   379 void CSIPProfileRegistryBase::LocalCrashRevert (TAny* /*aItem*/)
       
   380 	{
       
   381 	}
       
   382