vghwinterface/vghwserialiser/inc/eglrfc.inl
branchbug235_bringup_0
changeset 51 4f400a6ea71f
parent 22 b801ed730c0a
equal deleted inserted replaced
49:3b4f7e9d873f 51:4f400a6ea71f
       
     1 // Copyright (c) 2010 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 
       
    15 inline void EglRFC::GetTUint64( TUint64& aParam, TInt aIndex )
       
    16     {
       
    17     // note that 64-bit values consume 2 param slots!
       
    18     TUint32 lower, upper;
       
    19     iData.GetParamValue( EglRFC::EEGLint, (TUint8*)&lower, aIndex );
       
    20     iData.GetParamValue( EglRFC::EEGLint, (TUint8*)&upper, aIndex+1 );
       
    21     aParam = ((TUint64)upper << 32) + lower;
       
    22     }
       
    23 inline void EglRFC::GetEGLBoolean( EGLBoolean& aParam, TInt aIndex )
       
    24 	{
       
    25 	iData.GetParamValue( EglRFC::EEGLBoolean, (TUint8*)&aParam, aIndex );
       
    26 	}
       
    27 
       
    28 inline void EglRFC::GetEGLint( EGLint& aParam, TInt aIndex )
       
    29 	{
       
    30 	iData.GetParamValue( EglRFC::EEGLint, (TUint8*)&aParam, aIndex );
       
    31 	}
       
    32 
       
    33 inline void EglRFC::GetEGLenum( EGLenum& aParam, TInt aIndex )
       
    34 	{
       
    35 	iData.GetParamValue( EglRFC::EEGLenum, (TUint8*)&aParam, aIndex );
       
    36 	}
       
    37 
       
    38 inline void EglRFC::GetEGLDisplay( EGLDisplay& aParam, TInt aIndex )
       
    39 	{
       
    40 	iData.GetParamValue( EglRFC::EEGLDisplay, (TUint8*)&aParam, aIndex );
       
    41 	}
       
    42 
       
    43 inline void EglRFC::GetEGLConfig( EGLConfig& aParam, TInt aIndex )
       
    44 	{
       
    45 	iData.GetParamValue( EglRFC::EEGLConfig, (TUint8*)&aParam, aIndex );
       
    46 	}
       
    47 
       
    48 inline void EglRFC::GetEGLSurface( EGLSurface& aParam, TInt aIndex )
       
    49 	{
       
    50 	iData.GetParamValue( EglRFC::EEGLSurface, (TUint8*)&aParam, aIndex );
       
    51 	}
       
    52 
       
    53 inline void EglRFC::GetEGLContext( EGLContext& aParam, TInt aIndex )
       
    54 	{
       
    55 	iData.GetParamValue( EglRFC::EEGLContext, (TUint8*)&aParam, aIndex );
       
    56 	}
       
    57 
       
    58 inline void EglRFC::GetEGLClientBuffer( EGLClientBuffer& aParam, TInt aIndex )
       
    59 	{
       
    60 	iData.GetParamValue( EglRFC::EEGLClientBuffer, (TUint8*)&aParam, aIndex );
       
    61 	}
       
    62 
       
    63 inline void EglRFC::GetEGLImageKHR( EGLImageKHR& aParam, TInt aIndex )
       
    64 	{
       
    65 	iData.GetParamValue( EglRFC::EEGLImageKHR, (TUint8*)&aParam, aIndex );
       
    66 	}
       
    67 
       
    68 inline void EglRFC::GetEGLNativeDisplayType( NativeDisplayType& aParam, TInt aIndex )
       
    69 	{
       
    70 	iData.GetParamValue( EglRFC::EEGLNativeDisplayType, (TUint8*)&aParam, aIndex );
       
    71 	}
       
    72 
       
    73 inline void EglRFC::GetEGLNativeWindowType( NativeWindowType& aParam, TInt aIndex )
       
    74 	{
       
    75 	iData.GetParamValue( EglRFC::EEGLNativeWindowType, (TUint8*)&aParam, aIndex );
       
    76 	}
       
    77 
       
    78 inline void EglRFC::GetEGLNativePixmapType( NativePixmapType& aParam, TInt aIndex )
       
    79 	{
       
    80 	iData.GetParamValue( EglRFC::EEGLNativePixmapType, (TUint8*)&aParam, aIndex );
       
    81 	}
       
    82 
       
    83 inline void EglRFC::GetEGLintVectorData( EGLint* &aData, TInt& aSize, TInt aIndex )
       
    84 	{
       
    85 	iData.GetVectorData( EEGLint, (void**)&aData, aSize, aIndex );
       
    86 	}
       
    87 
       
    88 inline void EglRFC::GetEGLConfigVectorData( EGLConfig* &aData, TInt& aSize, TInt aIndex )
       
    89 	{
       
    90 	iData.GetVectorData( EEGLConfig, (void**)&aData, aSize, aIndex );
       
    91 	}
       
    92 
       
    93 inline void EglRFC::SetEGLintVectorData( const EGLint* aData, TInt aLength, TInt aIndex )
       
    94 	{
       
    95 	RemoteFunctionCall::SetVectorData( EEGLint, reinterpret_cast<const TUint8*>(aData), aLength, aIndex );
       
    96 	}
       
    97 
       
    98 inline void EglRFC::SetEGLConfigVectorData( const EGLConfig* aData, TInt aLength, TInt aIndex )
       
    99 	{
       
   100 	RemoteFunctionCall::SetVectorData( EEGLConfig, reinterpret_cast<const TUint8*>(aData), aLength, aIndex );
       
   101 	}
       
   102     
       
   103 
       
   104 inline void EglRFC::AppendTUint64( const TUint64& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   105     {
       
   106     // note that 64-bit values consume 2 param slots!
       
   107     TUint32 lower = (TUint32)(aParam & 0xFFFFFFFF);
       
   108     TUint32 upper = (TUint32)((aParam >> 32) & 0xFFFFFFFF);
       
   109     AppendParam( EEGLint, reinterpret_cast<const TUint8*>(&lower), aDir );
       
   110     AppendParam( EEGLint, reinterpret_cast<const TUint8*>(&upper), aDir );
       
   111     }
       
   112 
       
   113 inline void EglRFC::AppendEGLBoolean( const EGLBoolean& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   114     {
       
   115     AppendParam( EEGLBoolean, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   116     }
       
   117 
       
   118 inline void EglRFC::AppendEGLint( const EGLint& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   119     {
       
   120     AppendParam( EEGLint, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   121     }
       
   122 
       
   123 inline void EglRFC::AppendEGLenum( const EGLenum& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   124     {
       
   125     AppendParam( EEGLenum, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   126     }
       
   127 
       
   128 inline void EglRFC::AppendEGLDisplay( const EGLDisplay& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   129     {
       
   130     AppendParam( EEGLDisplay, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   131     }
       
   132 
       
   133 inline void EglRFC::AppendEGLConfig( const EGLConfig& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   134     {
       
   135     AppendParam( EEGLConfig, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   136     }
       
   137 
       
   138 inline void EglRFC::AppendEGLSurface( const EGLSurface& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   139     {
       
   140     AppendParam( EEGLSurface, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   141     }
       
   142 
       
   143 inline void EglRFC::AppendEGLContext( const EGLContext& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   144     {
       
   145     AppendParam( EEGLContext, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   146     }
       
   147 
       
   148 inline void EglRFC::AppendEGLClientBuffer( const EGLClientBuffer& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   149     {
       
   150     AppendParam( EEGLClientBuffer, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   151     }
       
   152 
       
   153 inline void EglRFC::AppendEGLImageKHR( const EGLImageKHR& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   154     {
       
   155     AppendParam( EEGLImageKHR, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   156     }
       
   157 
       
   158 inline void EglRFC::AppendEGLNativeDisplayType( const NativeDisplayType& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   159     {
       
   160     AppendParam( EEGLNativeDisplayType, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   161     }
       
   162 
       
   163 inline void EglRFC::AppendEGLNativeWindowType( const NativeWindowType& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   164     {
       
   165     AppendParam( EEGLNativeWindowType, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   166     }
       
   167 
       
   168 inline void EglRFC::AppendEGLNativePixmapType( const NativePixmapType& aParam, RemoteFunctionCallData::TParamDirection aDir )
       
   169     {
       
   170     AppendParam( EEGLNativePixmapType, reinterpret_cast<const TUint8*>(&aParam), aDir );
       
   171     }
       
   172 
       
   173 inline void EglRFC::AppendEGLintVector( const EGLint* aData, TInt aLength, RemoteFunctionCallData::TParamDirection aDir )
       
   174     {
       
   175     RemoteFunctionCall::AppendVector( EEGLint, aLength, reinterpret_cast<const TUint8*>( aData ), aDir );
       
   176     }
       
   177 
       
   178 inline void EglRFC::AppendEGLConfigVector( const EGLConfig* aData, TInt aLength, RemoteFunctionCallData::TParamDirection aDir )
       
   179     {
       
   180     RemoteFunctionCall::AppendVector( EEGLConfig, aLength, reinterpret_cast<const TUint8*>( aData ), aDir );
       
   181     }
       
   182 
       
   183 #ifdef __SYMBIAN32__
       
   184 // Appends Symbian TSize object as 2 integers, for width and height
       
   185 inline void EglRFC::AppendEGLSize( const TSize& aSize, RemoteFunctionCallData::TParamDirection aDir )
       
   186     {
       
   187     AppendParam( EEGLint, reinterpret_cast<const TUint8*>(&aSize.iWidth), aDir );
       
   188     AppendParam( EEGLint, reinterpret_cast<const TUint8*>(&aSize.iHeight), aDir );
       
   189     }
       
   190 #endif
       
   191 
       
   192 inline void EglRFC::AppendVector( const void* aData, TInt aLength, RemoteFunctionCallData::TParamDirection aDir )
       
   193     {
       
   194     RemoteFunctionCall::AppendVector( EEGLVoid, aLength, reinterpret_cast<const TUint8*>( aData ), aDir );
       
   195     }
       
   196 
       
   197 inline void EglRFC::GetVectorData( void* &aData, TInt& aSize, TInt aIndex )
       
   198 	{
       
   199 	iData.GetVectorData( EEGLVoid, &aData, aSize, aIndex );
       
   200 	}
       
   201 
       
   202 inline void EglRFC::SetVectorData( const void* aData, TInt aLength, TInt aIndex )
       
   203 	{
       
   204 	RemoteFunctionCall::SetVectorData( EEGLVoid, reinterpret_cast<const TUint8*>(aData), aLength, aIndex );
       
   205 	}