windowing/windowserver/nga/CLIENT/MWSCLI.CPP
changeset 0 5d03bc08d59c
child 26 15986eb6c500
child 36 01a6848ebfd7
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Common client side class
       
    15 // 
       
    16 //
       
    17 
       
    18 #include <e32std.h>
       
    19 #include "../SERVER/w32cmd.h"
       
    20 #include "CLIENT.H"
       
    21 
       
    22 
       
    23 MWsClientClass::MWsClientClass() : iWsHandle(0), iBuffer(NULL)
       
    24 	{
       
    25 	}
       
    26 
       
    27 MWsClientClass::MWsClientClass(RWsBuffer *aBuffer) : iWsHandle(0), iBuffer(aBuffer)
       
    28 	{
       
    29 	}
       
    30 
       
    31 void MWsClientClass::Write(const TAny *aData1, TInt aLength1,const TAny *aData2, TInt aLength2,TUint aOpcode) const
       
    32 	{
       
    33 	iBuffer->Write(iWsHandle,aOpcode,aData1,aLength1,aData2,aLength2);
       
    34 	}
       
    35 
       
    36 void MWsClientClass::Write(const TAny *aData1, TInt aLength1,TUint aOpcode) const
       
    37 	{
       
    38 	iBuffer->Write(iWsHandle,aOpcode,aData1,aLength1);
       
    39 	}
       
    40 
       
    41 void MWsClientClass::Write(TUint aOpcode) const
       
    42 	{
       
    43 	iBuffer->Write(iWsHandle,aOpcode);
       
    44 	}
       
    45 
       
    46 void MWsClientClass::WriteInt(TInt aInt, TUint aOpcode) const
       
    47 	{
       
    48 	iBuffer->Write(iWsHandle,aOpcode,&aInt,sizeof(TInt));
       
    49 	}
       
    50 
       
    51 void MWsClientClass::WriteRect(const TRect &aRect, TUint aOpcode) const
       
    52 	{
       
    53 	Write(&aRect,sizeof(aRect),aOpcode);
       
    54 	}
       
    55 
       
    56 void MWsClientClass::WritePoint(const TPoint &aPoint, TUint aOpcode) const
       
    57 	{
       
    58 	Write(&aPoint,sizeof(aPoint),aOpcode);
       
    59 	}
       
    60 
       
    61 void MWsClientClass::WriteSize(const TSize &aSize, TUint aOpcode) const
       
    62 	{
       
    63 	Write(&aSize,sizeof(aSize),aOpcode);
       
    64 	}
       
    65 
       
    66 TInt MWsClientClass::WriteReply(TUint aOpcode,const TIpcArgs* aIpcArgs) const
       
    67 	{
       
    68 	return(iBuffer->WriteReply(iWsHandle,aOpcode,aIpcArgs));
       
    69 	}
       
    70 
       
    71 TInt MWsClientClass::WriteReplyInt(TInt aInt, TUint aOpcode,const TIpcArgs* aIpcArgs) const
       
    72 	{
       
    73 	return(iBuffer->WriteReply(iWsHandle,aOpcode,&aInt,sizeof(TInt),aIpcArgs));
       
    74 	}
       
    75 
       
    76 TInt MWsClientClass::WriteReply(const TAny *aData1, TInt aLength1,TUint aOpcode,const TIpcArgs* aIpcArgs) const
       
    77 	{
       
    78 	return(iBuffer->WriteReply(iWsHandle,aOpcode,aData1,aLength1,aIpcArgs));
       
    79 	}
       
    80 
       
    81 TInt MWsClientClass::WriteReply(const TAny *aData1, TInt aLength1,const TAny *aData2, TInt aLength2,TUint aOpcode,const TIpcArgs* aIpcArgs) const
       
    82 	{
       
    83 	return(iBuffer->WriteReply(iWsHandle,aOpcode,aData1,aLength1,aData2,aLength2,aIpcArgs));
       
    84 	}
       
    85 
       
    86 TInt MWsClientClass::WriteReplyP(const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const
       
    87 	{
       
    88 	return(iBuffer->WriteReplyP(iWsHandle,aOpcode,aReplyPackage));
       
    89 	}
       
    90 
       
    91 TInt MWsClientClass::WriteReplyIntP(TInt aInt, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const
       
    92 	{
       
    93 	return(iBuffer->WriteReplyP(iWsHandle,aOpcode,&aInt,sizeof(aInt),aReplyPackage));
       
    94 	}
       
    95 
       
    96 TInt MWsClientClass::WriteReplyP(const TAny *aData1, TInt aLength1, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const
       
    97 	{
       
    98 	return(iBuffer->WriteReplyP(iWsHandle,aOpcode,aData1,aLength1,aReplyPackage));
       
    99 	}
       
   100 
       
   101 TInt MWsClientClass::WriteReplyP(const TAny *aData1, TInt aLength1,const TAny *aData2, TInt aLength2, const TWriteDescriptorType& aReplyPackage,TUint aOpcode) const
       
   102 	{
       
   103 	return(iBuffer->WriteReplyP(iWsHandle,aOpcode,aData1,aLength1,aData2,aLength2,aReplyPackage));
       
   104 	}
       
   105 
       
   106 TInt MWsClientClass::WriteReplyByProvidingRemoteReadAccess(const TAny* aBuf, TInt aBufLen,const TReadDescriptorType& aRemoteReadBuffer, TUint aOpcode) const
       
   107 	{
       
   108 	return(iBuffer->WriteReplyByProvidingRemoteReadAccess(iWsHandle,aOpcode,aBuf,aBufLen,aRemoteReadBuffer));
       
   109 	}
       
   110 
       
   111 void MWsClientClass::AddToBitmapArray(const TInt aBitmapHandle)const
       
   112 	{
       
   113 	iBuffer->AddToBitmapArray(aBitmapHandle);
       
   114 	}
       
   115 
       
   116 void MWsClientClass::AsyncRequest(TRequestStatus& aStatus, TUint aOpcode) const
       
   117 	{
       
   118 	iBuffer->AsyncRequest(iWsHandle, aOpcode, aStatus);
       
   119 	}
       
   120 
       
   121 TBool MWsClientClass::WindowSizeCacheEnabled() const
       
   122     {
       
   123     return iBuffer->WindowSizeCacheEnabled();
       
   124     }
       
   125 
       
   126 void MWsClientClass::MarkWindowSizeCacheDirty()
       
   127     {
       
   128     iBuffer->MarkWindowSizeCacheDirty(iWsHandle);
       
   129     }
       
   130 
       
   131 void MWsClientClass::RefreshWindowSizeCache(const TSize& aNewSize) const
       
   132     {
       
   133     iBuffer->RefreshWindowSizeCache(iWsHandle,aNewSize);
       
   134     }
       
   135 
       
   136 TInt MWsClientClass::CachedWindowSize(TSize& aSize) const
       
   137     {
       
   138     return iBuffer->CachedWindowSize(iWsHandle, aSize);
       
   139     }
       
   140 
       
   141 void MWsClientClass::DestroyWindowSizeCacheEntry()
       
   142     {
       
   143     iBuffer->DestroyWindowSizeCacheEntry(iWsHandle);
       
   144     }