Update contrib.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
30 #include <ups/upstypes.h>
31 #include "serviceconfig.h"
33 namespace UserPromptService
35 // Functions are only exported to support unit tests.
36 // Not intended for use outside UPS policy library.
41 NONSHARABLE_CLASS(CPolicyList) : public CBase
46 Converts between UPS policy filenames and system server secure ids & service ids.
48 NONSHARABLE_CLASS(TId)
52 IMPORT_C TId(const TSecureId& iServerSid, const TServiceId& iServiceId);
53 IMPORT_C static void IdL(const TDesC& aPolicyFile, TId& aId);
54 IMPORT_C void AppendNameToPath(TDes& aFileName) const;
55 IMPORT_C TBool operator==(const TId& aId) const;
58 TServiceId iServiceId;
61 IMPORT_C static CPolicyList* NewL(const TId& aId, CPolicyReader& aReader);
62 IMPORT_C static CPolicyList* NewLC(const TId& aId, CPolicyReader& aReader);
63 IMPORT_C const CPolicy* Match(const CPromptRequest& aRequest) const;
64 IMPORT_C const TId& Id() const;
65 IMPORT_C const TServiceConfig& ServiceConfig() const;
69 CPolicyList(const TId& aId);
70 void ConstructL(CPolicyReader& aReader);
72 CPolicy* iDefaultPolicy; ///< The policy to use if no other policy matches.
73 RPointerArray<CPolicy> iPolicies; ///< An ordered list of policies read from the policy file.
74 /** Associates the policy list with a system server secure id and a service id. */
76 TServiceConfig iServiceConfig; ///< The policy header
80 #endif // POLICYLIST_H