epoc32/include/mw/mproengprofile.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/mproengprofile.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/mproengprofile.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,169 @@
     1.4 -mproengprofile.h
     1.5 +/*
     1.6 +* Copyright (c) 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:  Profile settings interface.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +#ifndef MPROENGPROFILE_H
    1.25 +#define MPROENGPROFILE_H
    1.26 +
    1.27 +//  INCLUDES
    1.28 +#include <cntdef.h> // TContactItemId
    1.29 +
    1.30 +// FORWARD DECLARATIONS
    1.31 +class MProEngProfileName;
    1.32 +class MProEngTones;
    1.33 +class MProEngToneSettings;
    1.34 +class MProEngProfileExt;
    1.35 +
    1.36 +// CLASS DECLARATION
    1.37 +
    1.38 +/**
    1.39 +*  Profile settings interface.
    1.40 +*  MProEngProfile offers methods to get the alert for items, profile settings
    1.41 +*  and profile name interface.
    1.42 +*  How to use:
    1.43 +*  @code
    1.44 +*  // Get active profile with MProEngEngine::ActiveProfileL().
    1.45 +*  MProEngProfile* profile = iProfileEngine->ActiveProfileL();
    1.46 +*
    1.47 +*  // Use profile object here...
    1.48 +*
    1.49 +*  // When you are ready, free resources with MProEngProfile::Release()
    1.50 +*  profile->Release();
    1.51 +*
    1.52 +*  // If you release resources in destructor then:
    1.53 +*  if( iProfile )
    1.54 +*      {
    1.55 +*      iProfile->Release();
    1.56 +*      }
    1.57 +*
    1.58 +*  // If you put this class to CleanupStack then use void CleanupReleasePushL()
    1.59 +*  CleanupReleasePushL( *profile );
    1.60 +*  @endcode
    1.61 +*
    1.62 +*  @lib ProfileEngine.lib
    1.63 +*  @since 3.1
    1.64 +*/
    1.65 +class MProEngProfile
    1.66 +    {
    1.67 +    protected:  // Destructor
    1.68 +
    1.69 +        virtual ~MProEngProfile() {};
    1.70 +
    1.71 +    public: // New functions
    1.72 +
    1.73 +        /**
    1.74 +        * Free resources of the profile.
    1.75 +        * @since 3.1
    1.76 +        */
    1.77 +        virtual void Release() = 0;
    1.78 +
    1.79 +        /**
    1.80 +        * Return the alert for item array.
    1.81 +        * Only the calls coming from people who belong to one or more
    1.82 +        * "Alert for" groups returned here trigger an audible alert.
    1.83 +        * @since 3.1
    1.84 +        * @return Alert for array
    1.85 +        */
    1.86 +        virtual const TArray<TContactItemId> AlertForL() = 0;
    1.87 +
    1.88 +        /**
    1.89 +        * This method set alert for items to the profile.
    1.90 +        * Only the calls coming from people who belong to one or more
    1.91 +        * "Alert for" groups set here trigger an audible alert.
    1.92 +        * @since 3.1
    1.93 +        * @param aAlertFor Alert for array. If the length of this array is 0,
    1.94 +        *        it is interpreted: "alert for all calls".
    1.95 +        * @return KErrAccessDenied, if the "Alert for" groups setting of the
    1.96 +        *         profile is unmodifiable.
    1.97 +        *         KErrArgument, if the argument array is too large.
    1.98 +        *         KErrNone, if succesful.
    1.99 +        */
   1.100 +        virtual TInt SetAlertForL(
   1.101 +            const TArray<TContactItemId>& aAlertFor ) = 0;
   1.102 +
   1.103 +        /**
   1.104 +        * Return whether this profile is silent. A profile being silent means
   1.105 +        * that either the ringing type is silent or all the alert tones are set
   1.106 +        * to "None".
   1.107 +        * @since 3.1
   1.108 +        * @return ETrue if this profile is silent.
   1.109 +        */
   1.110 +        virtual TBool IsSilent() const = 0;
   1.111 +
   1.112 +        /**
   1.113 +        * Return profile name interface.
   1.114 +        * @since 3.1
   1.115 +        * @return Instance of the profile name interface.
   1.116 +        */
   1.117 +        virtual MProEngProfileName& ProfileName() const = 0;
   1.118 +
   1.119 +        /**
   1.120 +        * Return profile tones interface.
   1.121 +        * @since 3.1
   1.122 +        * @return Instance of the profile tones interface.
   1.123 +        */
   1.124 +        virtual MProEngTones& ProfileTones() const = 0;
   1.125 +
   1.126 +        /**
   1.127 +        * Returns tone settings of this profile.
   1.128 +        * @since 3.1
   1.129 +        * @return Returns tone settings of this profile.
   1.130 +        */
   1.131 +        virtual MProEngToneSettings& ToneSettings() const = 0;
   1.132 +
   1.133 +        /**
   1.134 +        * Store profile settings.
   1.135 +        * Leaves with:
   1.136 +        * KErrAccessDenied if one or more of the settings of this profile is/are
   1.137 +        * read-only,<br>
   1.138 +        * KErrAlreadyExists if the profile name has been changed and there
   1.139 +        * already is a profile with the same name,<br>
   1.140 +        * KErrNotFound if a file set as an alert tone cannot be found,<br>
   1.141 +        * KErrNotSupported if the MIME type of a file set as an alert tone is
   1.142 +        * not supported to be used as an alert tone,<br>
   1.143 +        * KErrArgument if a file set as an alert tone is DRM-protected but the
   1.144 +        * platform does not allow the files of this MIME type to be set as alert
   1.145 +        * tones when protected,<br>
   1.146 +        * KErrPermissionDenied, if a file set as an alert tone is not
   1.147 +        * DRM-protected and the platform does not allow the files of this MIME
   1.148 +        * type to be set as alert tones when unprotected,<br>
   1.149 +        * KErrCancel, if a file set as an alert tone is an unactivated DRM file
   1.150 +        * and user does not want to activate it,<br>
   1.151 +        * KErrTooBig if the tone file set for ringing tone (line 1 or line 2) is
   1.152 +        * too big in case the platform has this kind of limitation set,<br>
   1.153 +        * another system-wide error code.
   1.154 +        * 
   1.155 +        * Only processes with WriteDeviceData capability can succesfully call
   1.156 +        * this method.
   1.157 +        * @since 3.1
   1.158 +        */
   1.159 +        virtual void CommitChangeL() = 0;
   1.160 +
   1.161 +    private: // Extension interface
   1.162 +
   1.163 +        /**
   1.164 +        * This member is internal and not intended for use.
   1.165 +        */
   1.166 +        virtual MProEngProfileExt* Extension() { return NULL; }
   1.167 +
   1.168 +    };
   1.169 +
   1.170 +#endif      //  MPROENGPROFILE_H
   1.171 +
   1.172 +// End of File
   1.173 +