dcmofw/dcmoclient/src/dcmoclient.cpp
changeset 55 1c556dee8eb1
parent 0 b497e44ab2fc
child 73 ae69c2e8bc34
equal deleted inserted replaced
54:085438c28042 55:1c556dee8eb1
    85 // -----------------------------------------------------------------------------
    85 // -----------------------------------------------------------------------------
    86 // RDCMOClient::~RDCMOClient()
    86 // RDCMOClient::~RDCMOClient()
    87 // Destructor.
    87 // Destructor.
    88 // -----------------------------------------------------------------------------
    88 // -----------------------------------------------------------------------------
    89 //
    89 //
    90 RDCMOClient::~RDCMOClient()
    90 EXPORT_C RDCMOClient::~RDCMOClient()
    91 {
    91 {
    92     Close();
    92     Close();
    93 }	
    93 }	
    94 
    94 
    95 // ---------------------------------------------------------------------------
    95 // ---------------------------------------------------------------------------
    96 // RDCMOClient::OpenL()
    96 // RDCMOClient::OpenL()
    97 // ---------------------------------------------------------------------------
    97 // ---------------------------------------------------------------------------
    98 TInt RDCMOClient::OpenL()
    98 EXPORT_C TInt RDCMOClient::OpenL()
    99 	{	
    99 	{	
   100 	RDEBUG("RDCMOClient::OpenL()- Begin");
   100 	RDEBUG("RDCMOClient::OpenL()- Begin");
   101 	TInt res = KErrNone;	
   101 	TInt res = KErrNone;	
   102 	res = CreateSession( KDCMOServerName,TVersion(KDCMOServerMajorVersionNumber, KDCMOServerMinorVersionNumber, KDCMOServerBuildVersionNumber), KDCMOServerMessageSlotNumber );
   102 	res = CreateSession( KDCMOServerName,TVersion(KDCMOServerMajorVersionNumber, KDCMOServerMinorVersionNumber, KDCMOServerBuildVersionNumber), KDCMOServerMessageSlotNumber );
   103 	if ( res == KErrNotFound || res == KErrServerTerminated )
   103 	if ( res == KErrNotFound || res == KErrServerTerminated )
   113 	}
   113 	}
   114 
   114 
   115 // ---------------------------------------------------------------------------
   115 // ---------------------------------------------------------------------------
   116 // RDCMOClient::Close()
   116 // RDCMOClient::Close()
   117 // ---------------------------------------------------------------------------
   117 // ---------------------------------------------------------------------------
   118 void RDCMOClient::Close()
   118 EXPORT_C void RDCMOClient::Close()
   119 	{
   119 	{
   120 	RDEBUG(" RDCMOClient::Close");
   120 	RDEBUG(" RDCMOClient::Close");
   121 	RSessionBase::Close();  //basecall
   121 	RSessionBase::Close();  //basecall
   122 	}
   122 	}
   123 
   123 
   124 
   124 
   125 // ----------------------------------------------------------------------------
   125 // ----------------------------------------------------------------------------
   126 // RDCMOClient::GetDCMOIntAttributeValue()
   126 // RDCMOClient::GetDCMOIntAttributeValue()
   127 // ----------------------------------------------------------------------------	
   127 // ----------------------------------------------------------------------------	
   128 TDCMOStatus RDCMOClient::GetDCMOIntAttributeValue(TDes& aCategory, TDCMONode aId, TInt& aValue)
   128 EXPORT_C TDCMOStatus RDCMOClient::GetDCMOIntAttributeValue(TDes& aCategory, TDCMONode aId, TInt& aValue)
   129 	{		
   129 	{		
   130     RDEBUG(" RDCMOClient::GetDCMOIntAttributeValue--Begin");
   130     RDEBUG(" RDCMOClient::GetDCMOIntAttributeValue--Begin");
   131 	TPckg<TDCMONode> p(aId);
   131 	TPckg<TDCMONode> p(aId);
   132 	TPckg<TInt> intValue(aValue);
   132 	TPckg<TInt> intValue(aValue);
   133 	TDCMOStatus status(EDcmoSuccess);
   133 	TDCMOStatus status(EDcmoSuccess);
   140 	}
   140 	}
   141 
   141 
   142 // ----------------------------------------------------------------------------
   142 // ----------------------------------------------------------------------------
   143 // RDCMOClient::GetDCMOStrAttributeValue()
   143 // RDCMOClient::GetDCMOStrAttributeValue()
   144 // ----------------------------------------------------------------------------	
   144 // ----------------------------------------------------------------------------	
   145 TDCMOStatus RDCMOClient::GetDCMOStrAttributeValue(TDes& aCategory, TDCMONode aId, TDes& aStrValue)
   145 EXPORT_C TDCMOStatus RDCMOClient::GetDCMOStrAttributeValue(TDes& aCategory, TDCMONode aId, TDes& aStrValue)
   146 	{		
   146 	{		
   147 	RDEBUG(" RDCMOClient::GetDCMOStrAttributeValue--Begin");
   147 	RDEBUG(" RDCMOClient::GetDCMOStrAttributeValue--Begin");
   148 	TPckg<TDCMONode> p(aId);
   148 	TPckg<TDCMONode> p(aId);
   149 	TDCMOStatus status(EDcmoSuccess);
   149 	TDCMOStatus status(EDcmoSuccess);
   150 	TPckg<TDCMOStatus> statusValue(status);
   150 	TPckg<TDCMOStatus> statusValue(status);
   156 	}
   156 	}
   157 
   157 
   158 // ----------------------------------------------------------------------------
   158 // ----------------------------------------------------------------------------
   159 // RDCMOClient::SetDCMOIntAttributeValue()
   159 // RDCMOClient::SetDCMOIntAttributeValue()
   160 // ----------------------------------------------------------------------------	
   160 // ----------------------------------------------------------------------------	
   161 TDCMOStatus RDCMOClient::SetDCMOIntAttributeValue(TDes& aCategory, TDCMONode aId, TInt aValue)
   161 EXPORT_C TDCMOStatus RDCMOClient::SetDCMOIntAttributeValue(TDes& aCategory, TDCMONode aId, TInt aValue)
   162 	{		
   162 	{		
   163 	RDEBUG(" RDCMOClient::SetDCMOIntAttributeValue--Begin");
   163 	RDEBUG(" RDCMOClient::SetDCMOIntAttributeValue--Begin");
   164 	TPckg<TDCMONode> p(aId);
   164 	TPckg<TDCMONode> p(aId);
   165 	TPckg<TInt> intValue(aValue);
   165 	TPckg<TInt> intValue(aValue);
   166 	TDCMOStatus status(EDcmoSuccess);
   166 	TDCMOStatus status(EDcmoSuccess);
   173 	}
   173 	}
   174 	
   174 	
   175 // ----------------------------------------------------------------------------
   175 // ----------------------------------------------------------------------------
   176 // RDCMOClient::SetDCMOStrAttributeValue()
   176 // RDCMOClient::SetDCMOStrAttributeValue()
   177 // ----------------------------------------------------------------------------	
   177 // ----------------------------------------------------------------------------	
   178 TDCMOStatus RDCMOClient::SetDCMOStrAttributeValue(TDes& aCategory, TDCMONode aId, TDes& aStrValue)
   178 EXPORT_C TDCMOStatus RDCMOClient::SetDCMOStrAttributeValue(TDes& aCategory, TDCMONode aId, TDes& aStrValue)
   179 	{		
   179 	{		
   180 	RDEBUG(" RDCMOClient::SetDCMOStrAttributeValue--Begin");
   180 	RDEBUG(" RDCMOClient::SetDCMOStrAttributeValue--Begin");
   181 	TPckg<TDCMONode> p(aId);
   181 	TPckg<TDCMONode> p(aId);
   182 	TDCMOStatus status(EDcmoSuccess);
   182 	TDCMOStatus status(EDcmoSuccess);
   183 	TPckg<TDCMOStatus> statusValue(status);
   183 	TPckg<TDCMOStatus> statusValue(status);
   189 	}	
   189 	}	
   190 
   190 
   191 // ----------------------------------------------------------------------------
   191 // ----------------------------------------------------------------------------
   192 // RDCMOClient::SearchByGroupValue()
   192 // RDCMOClient::SearchByGroupValue()
   193 // ----------------------------------------------------------------------------	
   193 // ----------------------------------------------------------------------------	
   194 void RDCMOClient::SearchByGroupValue(TDes& aGroup, TDes& aAdapterList)
   194 EXPORT_C void RDCMOClient::SearchByGroupValue(TDes& aGroup, TDes& aAdapterList)
   195 	{		
   195 	{		
   196 	RDEBUG(" RDCMOClient::SearchByGroupValue--Begin");
   196 	RDEBUG(" RDCMOClient::SearchByGroupValue--Begin");
   197 	TInt err = SendReceive( EDcmoSearchAdapter, TIpcArgs(&aGroup, &aAdapterList));
   197 	TInt err = SendReceive( EDcmoSearchAdapter, TIpcArgs(&aGroup, &aAdapterList));
   198 	RDEBUG_2(" RDCMOClient::SearchByGroupValue--End error as %d",err);
   198 	RDEBUG_2(" RDCMOClient::SearchByGroupValue--End error as %d",err);
   199 	}		
   199 	}