connectivitymodules/SeCon/clients/pcconn/inc/sconpcconnclient.h
branchRCL_3
changeset 20 4a793f564d72
parent 0 d0791faffa3f
equal deleted inserted replaced
19:0aa8cc770c8a 20:4a793f564d72
       
     1 /*
       
     2 * Copyright (c) 2005-2008 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:  PC Connectivity client
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __SCONPCCONNCLIENT_H__
       
    20 #define __SCONPCCONNCLIENT_H__
       
    21 
       
    22 // -----------------------------------------------------------------------------
       
    23 // class RSConPCConnSession - the client session
       
    24 // -----------------------------------------------------------------------------
       
    25 class RSConPCConnSession : public RSessionBase
       
    26 	{
       
    27 public:
       
    28 	IMPORT_C RSConPCConnSession();
       
    29 	IMPORT_C ~RSConPCConnSession();
       
    30 
       
    31         /**
       
    32         * Starts the server and connects to it
       
    33         * @param none
       
    34         * @return KerrNone or an error code
       
    35         */
       
    36 	IMPORT_C TInt Connect();
       
    37 	
       
    38 	/**
       
    39         *  Disconnects from the server and terminates the server
       
    40         * @param none
       
    41         * @return none
       
    42         */
       
    43 	IMPORT_C void Close();
       
    44 	
       
    45 	/**
       
    46         *  Passes an OBEX Put -message to the server
       
    47         * @param none
       
    48         * @return none
       
    49         */
       
    50 	IMPORT_C TInt PutPacketL( const TDesC& aNameHeader, 
       
    51 	                          const TDesC8& aTypeHeader, 
       
    52 	                          CBufFlat*& aBuffer );
       
    53 	
       
    54 	/**
       
    55         *  Passes an OBEX Get -message to the server
       
    56         * @param none
       
    57         * @return none
       
    58         */
       
    59 	IMPORT_C TInt GetPacketL( const TDesC& aNameHeader, 
       
    60 	                          const TDesC8& aTypeHeader, 
       
    61 	                          CBufFlat*& aBuffer );
       
    62 	
       
    63 	/**
       
    64         *  Passes an reset -message to the server
       
    65         * @param none
       
    66         * @return none
       
    67         */
       
    68 	IMPORT_C TInt ResetServer();	
       
    69 
       
    70 private:
       
    71 	TVersion Version() const;
       
    72 	TInt LaunchServer();
       
    73 	TInt CreateAndSendChunkHandle();
       
    74 
       
    75 private:
       
    76 	RChunk iChunk;
       
    77 	};
       
    78 	
       
    79 #endif