1.1 --- a/epoc32/include/sipmanagedprofileregistry.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/sipmanagedprofileregistry.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,131 @@
1.4 -sipmanagedprofileregistry.h
1.5 +/*
1.6 +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +* Name : sipmanagedprofileregistry.h
1.20 +* Part of : SIP Profile Client
1.21 +* Interface : SDK API, SIP Profile API
1.22 +* The class for managing SIP profiles
1.23 +* Version : 1.0
1.24 +*
1.25 +*/
1.26 +
1.27 +
1.28 +
1.29 +#ifndef CSIPMANAGEDPROFILEREGISTRY_H
1.30 +#define CSIPMANAGEDPROFILEREGISTRY_H
1.31 +
1.32 +// INCLUDES
1.33 +#include <e32base.h>
1.34 +#include <e32std.h>
1.35 +#include "sipprofileregistrybase.h"
1.36 +
1.37 +// FORWARD DECLARATIONS
1.38 +class CSIPProfile;
1.39 +class CSIPManagedProfile;
1.40 +class MSIPProfileRegistryObserver;
1.41 +
1.42 +
1.43 +// CLASS DECLARATION
1.44 +/**
1.45 +* @publishedAll
1.46 +* @released
1.47 +*
1.48 +* The class for managing SIP profiles.
1.49 +* This class provides the functions for
1.50 +* adding/updating/removing profiles.
1.51 +*
1.52 +* @lib sipprofilecli.lib
1.53 +*/
1.54 +class CSIPManagedProfileRegistry: public CSIPProfileRegistryBase
1.55 + {
1.56 + public: // Constructors and destructor
1.57 + /**
1.58 + * Two-phased constructor.
1.59 + * @param aObserver a observer for SIP profile change events.
1.60 + */
1.61 + IMPORT_C static CSIPManagedProfileRegistry* NewL(
1.62 + MSIPProfileRegistryObserver& aObserver);
1.63 +
1.64 + /**
1.65 + * Two-phased constructor.
1.66 + * Constructs an object and adds the pointer to the cleanup stack;
1.67 + * @param aObserver a observer for SIP profile change events.
1.68 + */
1.69 + IMPORT_C static CSIPManagedProfileRegistry* NewLC(
1.70 + MSIPProfileRegistryObserver& aObserver);
1.71 +
1.72 + /**
1.73 + * Destructor
1.74 + */
1.75 + IMPORT_C ~CSIPManagedProfileRegistry();
1.76 + public: //new functions
1.77 +
1.78 + /**
1.79 + * Instantiates new profile with default values
1.80 + * for given type.
1.81 + * @param aType a SIP profile type to be created
1.82 + * @return pre-filled instance of given type profile type;
1.83 + * the ownership is transferred
1.84 + */
1.85 + IMPORT_C CSIPManagedProfile* CreateL(const TSIPProfileTypeInfo& aType);
1.86 +
1.87 + /**
1.88 + * Checks if profile is not used by other applications.
1.89 + * If no other application is using the profile, profile
1.90 + * can be updated.
1.91 + * @param aSIPProfile a SIP profile
1.92 + * @return ETrue if available for update, EFalse otherwise
1.93 + * @capability ReadUserData
1.94 + */
1.95 + IMPORT_C TBool IsInUseL(const CSIPProfile& aSIPProfile) const;
1.96 +
1.97 + /**
1.98 + * Saves new profile or changes to a profile to the persistent storage.
1.99 + * This function must be called after desired values are set or updated
1.100 + * in the SIP profile.
1.101 + * If the profile is marked for auto-registration and the profile is
1.102 + * updated the profile will be re-registered.
1.103 + * Function leaves on failure.
1.104 + * @pre IsInUse(aSIPProfile)==EFalse
1.105 + * @param aSIPProfile a sip profile to save
1.106 + * @capability WriteDeviceData
1.107 + * @capability NetworkServices
1.108 + */
1.109 + IMPORT_C void SaveL(CSIPProfile& aSIPProfile);
1.110 +
1.111 + /**
1.112 + * Removes and deletes SIP profile from the persistent storage.
1.113 + * Function leaves on failure.
1.114 + * If the profile is registered it will be de-registered before the
1.115 + * removal from the persistent storage.
1.116 + * @param aSIPProfile a sip profile to delete
1.117 + * @capability WriteDeviceData
1.118 + * @capability NetworkServices
1.119 + */
1.120 + IMPORT_C void DestroyL(CSIPProfile& aSIPProfile);
1.121 +
1.122 + private:
1.123 +
1.124 + CSIPManagedProfileRegistry(MSIPProfileRegistryObserver& aObserver);
1.125 +
1.126 + void ConstructL();
1.127 +
1.128 + /**
1.129 + * Creates a new instance of type CSIPManagedProfile
1.130 + * @return new instance
1.131 + */
1.132 + CSIPProfile* NewInstanceL();
1.133 + };
1.134 +
1.135 +#endif // CSIPMANAGEDPROFILEREGISTRY_H