tsrc/propertystub/src/e32property.cpp
branchRCL_3
changeset 22 73a1feb507fb
parent 0 f0cf47e981f9
child 23 bc78a40cd63c
equal deleted inserted replaced
21:33a5d2bbf6fc 22:73a1feb507fb
    14 * Description:
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include "e32property.h"
    18 #include "e32property.h"
       
    19 #include "mussessionproperties.h"
       
    20 #include "mussesseioninformationapi.h"
    19 #include <e32cmn.h>
    21 #include <e32cmn.h>
    20 
    22 
    21 static RArray<TUint> iIntProperty;
    23 static RArray<TUint> iIntProperty;
    22 static TInt iErrorCode = KErrNone;
    24 static TInt iErrorCode = KErrNone;
    23 static RProperty::TPropertyCalledFunctions iCalledFunction = RProperty::ENone;
    25 static RProperty::TPropertyCalledFunctions iCalledFunction = RProperty::ENone;
    24 static TName iString = KNullDesC();
    26 // Large enough to store maximum length descriptor for RProperty
       
    27 static TBuf<RProperty::KMaxPropertySize> iString = KNullDesC();
       
    28 static TBuf<RProperty::KMaxPropertySize> iVideoCodecList = KNullDesC();
       
    29 static TBuf<RProperty::KMaxPropertySize> iSessionRecipient = KNullDesC();
       
    30 static TBuf<RProperty::KMaxPropertySize> iEngineName = KNullDesC();
    25 static TInt iValue = KErrNotFound;
    31 static TInt iValue = KErrNotFound;
    26 
    32 
    27 
    33 
    28 _LIT( KMusTestPropertyReadDesc, "TEST" );
    34 _LIT( KMusTestPropertyReadDesc, "TEST" );
    29 
    35 
    76     TInt error = iErrorCode;
    82     TInt error = iErrorCode;
    77     aValue = iPValue;
    83     aValue = iPValue;
    78     return error;
    84     return error;
    79     }
    85     }
    80 
    86 
       
    87 
    81 TInt RProperty::Get( TUid /*aCategory*/, TUint /*aKey*/, TDes8& aValue)
    88 TInt RProperty::Get( TUid /*aCategory*/, TUint /*aKey*/, TDes8& aValue)
    82     {
    89     {
    83     // This is not widely used in Mush , so who cares in stub.
    90     // This is not widely used in Mush , so who cares in stub.
    84     aValue.Append( KMusTestPropertyReadDesc );
    91     aValue.Append( KMusTestPropertyReadDesc );
    85     return iErrorCode;
    92     return iErrorCode;
    86     }
    93     }
    87 
    94 
    88 TInt RProperty::Get( TUid /*aCategory*/, TUint /*aKey*/, TDes16& aValue )
    95 
    89     {
    96 TInt RProperty::Get( TUid /*aCategory*/, TUint aKey, TDes16& aValue )
    90     // This is not widely used in Mush , so who cares in stub.
    97     {
    91     aValue = iString;
    98     if ( aKey == NMusSessionInformationApi::KMUSCallProvider )
       
    99          {
       
   100          aValue = iEngineName;
       
   101          }
       
   102     else if ( aKey == NMusSessionApi::KVideoCodecs )
       
   103         {
       
   104         aValue = iVideoCodecList;
       
   105         }
       
   106     else if ( aKey == NMusSessionApi::KRemoteSipAddress )
       
   107         {
       
   108         aValue = iSessionRecipient;
       
   109         }
       
   110     else
       
   111         {
       
   112         aValue = iString;
       
   113         }
       
   114     
    92     return iErrorCode;
   115     return iErrorCode;
    93     }
   116     }
    94 
   117 
    95 TInt RProperty::Set( TUid /*aCategory*/, TUint aKey, TInt aValue)
   118 TInt RProperty::Set( TUid /*aCategory*/, TUint aKey, TInt aValue)
    96     {    
   119     {    
   116     {
   139     {
   117     // This is not widely used in Mush , so who cares in stub.
   140     // This is not widely used in Mush , so who cares in stub.
   118     return iErrorCode;
   141     return iErrorCode;
   119     }
   142     }
   120 
   143 
   121 TInt RProperty::Set( TUid /*aCategory*/, TUint /*aKey*/, const TDesC& aValue )
   144 
   122     {
   145 TInt RProperty::Set( TUid /*aCategory*/, TUint aKey, const TDesC& aValue )
   123     // This is not widely used in Mush , so who cares in stub.
   146     {
   124     iString = aValue;
   147 
       
   148     if ( aKey == NMusSessionInformationApi::KMUSCallProvider )
       
   149         {
       
   150         iEngineName = aValue;
       
   151         }
       
   152     
       
   153     else if ( aKey == NMusSessionApi::KVideoCodecs )
       
   154         {
       
   155         iVideoCodecList = aValue;
       
   156         }
       
   157     else if ( aKey == NMusSessionApi::KRemoteSipAddress )
       
   158         {
       
   159         iSessionRecipient = aValue;
       
   160         }
       
   161     else
       
   162         {
       
   163         iString = aValue;
       
   164         }
   125     return iErrorCode;
   165     return iErrorCode;
   126     }
   166     }
   127 
   167 
   128 
   168 
   129 TInt RProperty::Attach(  TUid /*aCategory*/, TUint /*aKey*/)
   169 TInt RProperty::Attach(  TUid /*aCategory*/, TUint /*aKey*/)
   191     {
   231     {
   192     iIntProperty.Close();
   232     iIntProperty.Close();
   193     iErrorCode = KErrNone;
   233     iErrorCode = KErrNone;
   194     iCalledFunction = RProperty::ENone;
   234     iCalledFunction = RProperty::ENone;
   195     iString = KNullDesC();
   235     iString = KNullDesC();
       
   236     iEngineName = KNullDesC();
   196     iValue = KErrNotFound;
   237     iValue = KErrNotFound;
   197     }
   238     }
   198 
   239 
   199