securitydialogs/lockclient/inc/lockaccessextension.h
changeset 0 164170e6151a
child 26 aad866c37519
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2007 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 "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:  Extension to lockapp clients.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __LOCKACCESSEXTENSION_H__
       
    20 #define __LOCKACCESSEXTENSION_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class RWsSession;
       
    25 
       
    26 /**
       
    27  *  RLockAccessExtension class.
       
    28  *  Extension class used to access lockapp.
       
    29  *
       
    30  *  @lib    lockclient
       
    31  *  @since  5.0
       
    32  *  @author Tamas Koteles
       
    33  */
       
    34 class RLockAccessExtension : public RSessionBase
       
    35 	{
       
    36 	public:
       
    37 
       
    38 		/**
       
    39 		 * From @c RSessionBase. Sends a message.
       
    40 		 * @return KErrNone if succeeded or already connected.
       
    41 		 *         KErrNotReady if the server is not yet fully initialized.
       
    42 		 *         otherwise standard RSessionBase error values.
       
    43 		 */
       
    44 		TInt SendMessage( TInt aMessage );
       
    45 
       
    46 		/**
       
    47 		 * From @c RSessionBase. Sends a message with a parameter.
       
    48 		 * @return KErrNone if succeeded or already connected.
       
    49 		 *         KErrNotReady if the server is not yet fully initialized.
       
    50 		 *         otherwise standard RSessionBase error values.
       
    51 		 */
       
    52 		TInt SendMessage( TInt aMessage, TInt aParam1 );
       
    53 
       
    54 		/**
       
    55 		 * From @c RSessionBase. Sends a message with two parameter.
       
    56 		 * @return KErrNone if succeeded or already connected.
       
    57 		 *         KErrNotReady if the server is not yet fully initialized.
       
    58 		 *         otherwise standard RSessionBase error values.
       
    59 		 */
       
    60 		TInt SendMessage( TInt aMessage, TInt aParam1, TInt aParam2 );
       
    61 
       
    62 	private:
       
    63 
       
    64 		/**
       
    65 		 * Returns the server's version.
       
    66 		 */
       
    67 		TVersion GetVersion( );
       
    68 
       
    69 		/**
       
    70 		 * Tries to create session to service.
       
    71 		 * Must be called before accessing other methods in the API.
       
    72 		 *
       
    73 		 * @return KErrNone if succeeded or already connected.
       
    74 		 *         KErrNotReady if the server is not yet fully initialized.
       
    75 		 *         KErrNotSupported if the CoeEnv is not available
       
    76 		 *         otherwise standard RSessionBase error values.
       
    77 		 */
       
    78 		TInt TryConnect( RWsSession& aWsSession );
       
    79 
       
    80 		/**
       
    81 		 * Ensures that the connection to the service is alive.
       
    82 		 * Tries to connect to service if not connected.
       
    83 		 *
       
    84 		 * @return KErrNone if succeeded or already connected.
       
    85 		 *         KErrNotReady if the server is not yet fully initialized.
       
    86 		 *         KErrNotSupported if the CoeEnv is not available
       
    87 		 *         otherwise standard RSessionBase error values.
       
    88 		 */
       
    89 		TInt EnsureConnected( );
       
    90 
       
    91 	};
       
    92 
       
    93 #endif // __LOCKACCESSEXTENSION_H__