equal
deleted
inserted
replaced
160 // --------------------------------------------------------------------------- |
160 // --------------------------------------------------------------------------- |
161 // |
161 // |
162 TInt CHidHeadsetDriver::DataIn( CHidTransport::THidChannelType aChannel, |
162 TInt CHidHeadsetDriver::DataIn( CHidTransport::THidChannelType aChannel, |
163 const TDesC8& aPayload ) |
163 const TDesC8& aPayload ) |
164 { |
164 { |
|
165 // validate input data |
|
166 if (0 >= aPayload.Length()) |
|
167 { |
|
168 return KErrArgument; |
|
169 } |
|
170 |
165 TInt retVal = KErrNone; |
171 TInt retVal = KErrNone; |
|
172 |
166 switch ( aChannel ) |
173 switch ( aChannel ) |
167 { |
174 { |
168 case CHidTransport::EHidChannelInt: |
175 case CHidTransport::EHidChannelInt: |
169 if ( EInitialised == iDriverState ) |
176 if ( EInitialised == iDriverState ) |
170 { |
177 { |