authorisation/userpromptservice/policies/inc/promptrequest.h
changeset 8 35751d3474b7
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  @file
       
    21  @publishedPartner
       
    22  @released 
       
    23 */
       
    24 
       
    25 #ifndef PROMPTREQUEST_H
       
    26 #define PROMPTREQUEST_H
       
    27 
       
    28 #include <e32base.h>
       
    29 #include <e32cmn.h>
       
    30 #include <e32std.h>
       
    31 
       
    32 #include <ups/upstypes.h>
       
    33 
       
    34 namespace UserPromptService
       
    35 	{
       
    36 
       
    37 	/** 
       
    38 	 The data provided by the system server to the User Prompt Service in an Authorise request.
       
    39 	 */
       
    40 	NONSHARABLE_CLASS(CPromptRequest) : public CBase
       
    41 		{
       
    42 	public:				
       
    43 		IMPORT_C static CPromptRequest* NewL(
       
    44 			const TSecureId& aClientSid, const TVendorId& aClientVid, const TThreadId& aClientThreadId, TProcessId &aClientProcessId,
       
    45 			const TSecureId& aServerSid, const TServiceId& aServiceId, RBuf& aDestination, RBuf8& aOpaqueData, 
       
    46 			TBool aSecurityResult);
       
    47 
       
    48 		IMPORT_C static CPromptRequest* NewLC(
       
    49 			const TSecureId& aClientSid, const TVendorId& aClientVid, const TThreadId& aClientThreadId, TProcessId &aClientProcessId,
       
    50 			const TSecureId& aServerSid, const TServiceId& aServiceId, RBuf& aDestination, RBuf8& aOpaqueData, 
       
    51 			TBool aSecurityResult);
       
    52 
       
    53 		IMPORT_C const TSecureId& ClientSid() const;
       
    54 		IMPORT_C TBool IsClientSidProtected() const;		
       
    55 		IMPORT_C const TVendorId& ClientVid() const;
       
    56 		IMPORT_C const TSecureId& ServerSid() const;
       
    57 		IMPORT_C const TServiceId& ServiceId() const;
       
    58 		IMPORT_C const TDesC& Destination() const;
       
    59 		IMPORT_C const TDesC8& OpaqueData() const;
       
    60 		IMPORT_C const TThreadId& ClientThreadId() const;
       
    61 		IMPORT_C const TProcessId& ClientProcessId() const;
       
    62 		IMPORT_C TBool SecurityResult() const;
       
    63 
       
    64 		~CPromptRequest();
       
    65 	private:
       
    66 	
       
    67 	CPromptRequest(	const TSecureId& aClientSid, const TVendorId& aClientVid, const TThreadId& aClientThreadId, TProcessId &aClientProcessId,
       
    68 		const TSecureId& aServerSid, const TServiceId& aServiceId, 
       
    69 		RBuf& aDestination, RBuf8& aOpaqueData, 
       
    70 		TBool aSecurityResult);				
       
    71 
       
    72 		TSecureId iClientSid;		///< The secure id of the client process
       
    73 		TVendorId iClientVid;		///< The vendor id of the client process
       
    74 		TThreadId iClientThreadId;	///< The thread id of the client requesting the service
       
    75 		TProcessId iClientProcessId; ///< The process id of the client requesting the service
       
    76 		
       
    77 		TSecureId iServerSid;		///< The secure id of the system server
       
    78 		TServiceId iServiceId;		///< The ID of the server requested
       
    79 		
       
    80 		RBuf iDestination;			///< The destination e.g. the Internet Access Point
       
    81 		RBuf8 iOpaqueData;			///< Opaque data 
       
    82 		TBool iSecurityResult;		/// Whether the client pased the system server's security check.
       
    83 		};
       
    84 	}	
       
    85 
       
    86 #endif // PROMPTREQUEST_H
       
    87