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