epoc32/include/mw/sipmanagedprofileregistry.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100 (2010-03-31)
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:
williamr@2
    15
* Name        : sipmanagedprofileregistry.h
williamr@2
    16
* Part of     : SIP Profile Client
williamr@2
    17
* Interface   : SDK API, SIP Profile API
williamr@2
    18
* The class for managing SIP profiles
williamr@2
    19
* Version     : 1.0
williamr@2
    20
*
williamr@2
    21
*/
williamr@2
    22
williamr@2
    23
williamr@2
    24
williamr@2
    25
#ifndef CSIPMANAGEDPROFILEREGISTRY_H
williamr@2
    26
#define CSIPMANAGEDPROFILEREGISTRY_H
williamr@2
    27
williamr@2
    28
//  INCLUDES
williamr@2
    29
#include <e32base.h>
williamr@2
    30
#include <e32std.h>
williamr@2
    31
#include "sipprofileregistrybase.h"
williamr@2
    32
williamr@2
    33
// FORWARD DECLARATIONS
williamr@2
    34
class CSIPProfile;
williamr@2
    35
class CSIPManagedProfile;
williamr@2
    36
class MSIPProfileRegistryObserver;
williamr@2
    37
williamr@2
    38
williamr@2
    39
// CLASS DECLARATION
williamr@2
    40
/**
williamr@2
    41
*  @publishedAll
williamr@2
    42
*  @released
williamr@2
    43
*
williamr@2
    44
*  The class for managing SIP profiles.
williamr@2
    45
*  This class provides the functions for
williamr@2
    46
*  adding/updating/removing profiles.
williamr@2
    47
*
williamr@2
    48
*  @lib sipprofilecli.lib
williamr@2
    49
*/
williamr@2
    50
class CSIPManagedProfileRegistry: public CSIPProfileRegistryBase
williamr@2
    51
    {
williamr@2
    52
    public:  // Constructors and destructor
williamr@2
    53
        /**
williamr@2
    54
        * Two-phased constructor.
williamr@2
    55
        * @param aObserver a observer for SIP profile change events.
williamr@2
    56
        */
williamr@2
    57
        IMPORT_C static CSIPManagedProfileRegistry* NewL(
williamr@2
    58
                        MSIPProfileRegistryObserver& aObserver);
williamr@2
    59
williamr@2
    60
        /**
williamr@2
    61
        * Two-phased constructor.
williamr@2
    62
        * Constructs an object and adds the pointer to the cleanup stack;
williamr@2
    63
        * @param aObserver a observer for SIP profile change events.
williamr@2
    64
        */
williamr@2
    65
        IMPORT_C static CSIPManagedProfileRegistry* NewLC(
williamr@2
    66
                        MSIPProfileRegistryObserver& aObserver);
williamr@2
    67
williamr@2
    68
        /**
williamr@2
    69
        * Destructor
williamr@2
    70
        */
williamr@2
    71
        IMPORT_C ~CSIPManagedProfileRegistry();
williamr@2
    72
    public: //new functions
williamr@2
    73
williamr@2
    74
        /**
williamr@2
    75
        * Instantiates new profile with default values 
williamr@2
    76
        * for given type.
williamr@2
    77
        * @param aType a SIP profile type to be created
williamr@2
    78
        * @return pre-filled instance of given type profile type;
williamr@2
    79
                * the ownership is transferred
williamr@2
    80
        */
williamr@2
    81
        IMPORT_C CSIPManagedProfile* CreateL(const TSIPProfileTypeInfo& aType); 
williamr@2
    82
williamr@2
    83
        /**
williamr@4
    84
        * Checks if profile is not used by other applications.
williamr@2
    85
        * @param aSIPProfile a SIP profile
williamr@4
    86
        * @return ETrue if its being used by other applications, EFalse otherwise
williamr@2
    87
        * @capability ReadUserData
williamr@2
    88
        */
williamr@2
    89
        IMPORT_C TBool IsInUseL(const CSIPProfile& aSIPProfile) const; 
williamr@2
    90
williamr@2
    91
        /**
williamr@2
    92
        * Saves new profile or changes to a profile to the persistent storage.
williamr@2
    93
        * This function must be called after desired values are set or updated
williamr@2
    94
        * in the SIP profile. 
williamr@2
    95
        * If the profile is marked for auto-registration and the profile is 
williamr@2
    96
        * updated the profile will be re-registered.
williamr@2
    97
        * Function leaves on failure.
williamr@2
    98
        * @param aSIPProfile a sip profile to save
williamr@2
    99
        * @capability WriteDeviceData
williamr@2
   100
        * @capability NetworkServices
williamr@2
   101
        */
williamr@2
   102
        IMPORT_C void SaveL(CSIPProfile& aSIPProfile);
williamr@2
   103
williamr@2
   104
        /**
williamr@2
   105
        * Removes and deletes SIP profile from the persistent storage.
williamr@2
   106
        * Function leaves on failure.
williamr@2
   107
        * If the profile is registered it will be de-registered before the
williamr@2
   108
        * removal from the persistent storage.
williamr@2
   109
        * @param aSIPProfile a sip profile to delete
williamr@2
   110
        * @capability WriteDeviceData
williamr@2
   111
        * @capability NetworkServices
williamr@2
   112
        */
williamr@2
   113
        IMPORT_C void DestroyL(CSIPProfile& aSIPProfile);
williamr@2
   114
williamr@2
   115
    private:
williamr@2
   116
williamr@2
   117
        CSIPManagedProfileRegistry(MSIPProfileRegistryObserver& aObserver);
williamr@2
   118
williamr@2
   119
        void ConstructL();
williamr@2
   120
williamr@2
   121
        /**
williamr@2
   122
        * Creates a new instance of type CSIPManagedProfile
williamr@2
   123
        * @return new instance
williamr@2
   124
        */
williamr@2
   125
        CSIPProfile* NewInstanceL();
williamr@2
   126
    };
williamr@2
   127
williamr@2
   128
#endif // CSIPMANAGEDPROFILEREGISTRY_H