textinput/peninputarc/src/peninputserverapp/peninputcrpclient.cpp
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 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 "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 #include "peninputcrpmsg.h"
       
    20 #include "peninputcrpclient.h"
       
    21 
       
    22 #define SZ(x) (sizeof(x) / sizeof(TInt))
       
    23 	
       
    24 CPenInputCrpServiceClient* CPenInputCrpServiceClient::NewL()	
       
    25     {
       
    26     CPenInputCrpServiceClient* self = new(ELeave) CPenInputCrpServiceClient();
       
    27     CleanupStack::PushL(self);
       
    28     self->ConstructL();
       
    29     CleanupStack::Pop(self);
       
    30     return self;
       
    31     }
       
    32 	
       
    33 void CPenInputCrpServiceClient::ConstructL()
       
    34 	{
       
    35 	const TUid id = {0x2000B5E7};
       
    36 
       
    37 	BaseConstructL(id, KNullDesC8);
       
    38 	}	
       
    39 															 
       
    40 
       
    41 TBool CPenInputCrpServiceClient::IsDsaApp(TInt aGrpId)
       
    42     {
       
    43 	const TInt msg[] = {
       
    44 				NPenInputCRPServiceMsg::EIsDsaApp,
       
    45 				aGrpId
       
    46     			};
       
    47 	TPckgC<TInt[SZ(msg)]> buf(msg);
       
    48 	
       
    49     return  SendSynchronMessage(buf);
       
    50     }
       
    51     
       
    52 TBool CPenInputCrpServiceClient::IsDsaActive()
       
    53 	{
       
    54 	const TInt msg[] = {
       
    55 				NPenInputCRPServiceMsg::EIsDsaApp
       
    56     			};
       
    57 	TPckgC<TInt[SZ(msg)]> buf(msg);
       
    58 	
       
    59     return  SendSynchronMessage(buf);		
       
    60 	}
       
    61     
       
    62 void CPenInputCrpServiceClient::RemoveDsaApp(TInt aGrpId)
       
    63     {
       
    64 	const TInt msg[] = {
       
    65 				NPenInputCRPServiceMsg::ERemoveDsaApp,
       
    66 				aGrpId
       
    67     			};
       
    68 	TPckgC<TInt[SZ(msg)]> buf(msg);
       
    69 	SendMessage(buf);
       
    70 	Flush();
       
    71     
       
    72     }
       
    73     
       
    74 void CPenInputCrpServiceClient::HandleMessage(const TDesC8& /*aData*/)
       
    75 	{
       
    76 	
       
    77 	}
       
    78     
       
    79 void CPenInputCrpServiceClient::OnReplace()
       
    80 	{
       
    81 	/*empty*/
       
    82 	}
       
    83