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