epoc32/include/scs/scsclient.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of the License "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description: 
williamr@4
    15
* Defines the client-side classes which other client-side handles
williamr@4
    16
* derive from to use the SCS functionality.
williamr@4
    17
*
williamr@4
    18
*/
williamr@4
    19
williamr@4
    20
williamr@4
    21
/**
williamr@4
    22
 @file
williamr@4
    23
 @publishedAll
williamr@4
    24
 @released
williamr@4
    25
*/
williamr@4
    26
williamr@4
    27
#ifndef SCSCLIENT_H
williamr@4
    28
#define SCSCLIENT_H
williamr@4
    29
williamr@4
    30
#include <e32std.h>
williamr@4
    31
williamr@4
    32
williamr@4
    33
class RScsClientBase : public RSessionBase
williamr@4
    34
/**
williamr@4
    35
	Provides functionality to connect to the server, starting
williamr@4
    36
	the server process if necessary.  This class cannot be used
williamr@4
    37
	directly - the SCS implementor must define a subclass.
williamr@4
    38
 */
williamr@4
    39
	{
williamr@4
    40
public:
williamr@4
    41
	IMPORT_C void Close();
williamr@4
    42
	IMPORT_C TInt SetServerHeapFail(TInt aRate);
williamr@4
    43
	IMPORT_C TInt ResetServerHeapFail();
williamr@4
    44
williamr@4
    45
	IMPORT_C TInt ShutdownServer();
williamr@4
    46
	
williamr@4
    47
protected:
williamr@4
    48
	IMPORT_C RScsClientBase();
williamr@4
    49
	IMPORT_C TInt Connect(
williamr@4
    50
		const TDesC& aSvrName, const TVersion& aReqVer, const TDesC& aExeName, const TUidType& aFullExeUid);
williamr@4
    51
williamr@4
    52
	IMPORT_C TInt CallSessionFunction(TInt aFunction) const;
williamr@4
    53
	IMPORT_C TInt CallSessionFunction(TInt aFunction, const TIpcArgs& aArgs) const;
williamr@4
    54
	IMPORT_C void CallSessionFunction(TInt aFunction, const TIpcArgs& aArgs, TRequestStatus& aStatus) const;
williamr@4
    55
	IMPORT_C void CancelSessionFunction(TInt aFunction) const;
williamr@4
    56
	
williamr@4
    57
private:
williamr@4
    58
	TInt StartServerProcess(const TDesC& aExeName, const TUidType& aFullExeUid);	
williamr@4
    59
	};
williamr@4
    60
williamr@4
    61
class RScsClientSubsessionBase : public RSubSessionBase
williamr@4
    62
/**
williamr@4
    63
	This class is used to send messages to server-side SCS subsessions.
williamr@4
    64
	This class cannot be used directly - the implementor must define a
williamr@4
    65
	subclass.
williamr@4
    66
 */
williamr@4
    67
	{
williamr@4
    68
public:
williamr@4
    69
	IMPORT_C void Close();
williamr@4
    70
williamr@4
    71
protected:
williamr@4
    72
	IMPORT_C RScsClientSubsessionBase();
williamr@4
    73
	IMPORT_C TInt CreateSubsession(const RScsClientBase& aSession, TInt aFunction, const TIpcArgs& aArgs);
williamr@4
    74
williamr@4
    75
	IMPORT_C TInt CallSubsessionFunction(TInt aFunction) const;
williamr@4
    76
	IMPORT_C TInt CallSubsessionFunction(TInt aFunction, const TIpcArgs& aArgs) const;
williamr@4
    77
	IMPORT_C void CallSubsessionFunction(TInt aFunction, const TIpcArgs& aArgs, TRequestStatus& aStatus) const;
williamr@4
    78
	IMPORT_C void CancelSubsessionFunction(TInt aFunction) const;
williamr@4
    79
	};
williamr@4
    80
williamr@4
    81
#endif	// #ifndef SCSCLIENT_H
williamr@4
    82