--- a/bluetoothengine/btserviceutil/src/btdevextension.cpp Fri May 14 16:01:46 2010 +0300
+++ b/bluetoothengine/btserviceutil/src/btdevextension.cpp Thu May 27 13:01:44 2010 +0300
@@ -90,7 +90,7 @@
// IsBonded
// ---------------------------------------------------------------------------
//
-TBool CBtDevExtension::IsBonded( const TBTNamelessDevice &dev )
+EXPORT_C TBool CBtDevExtension::IsBonded( const TBTNamelessDevice &dev )
{
// IsValidPaired tells if the paired bit of dev is valid
// and IsPaired tells if the device is paired or not:
@@ -105,7 +105,7 @@
// IsJustWorksBonded
// ---------------------------------------------------------------------------
//
-TBool CBtDevExtension::IsJustWorksBonded( const TBTNamelessDevice &dev )
+EXPORT_C TBool CBtDevExtension::IsJustWorksBonded( const TBTNamelessDevice &dev )
{
return IsBonded( dev ) &&
dev.LinkKeyType() == ELinkKeyUnauthenticatedNonUpgradable;
@@ -115,7 +115,7 @@
// IsUserAwareBonded
// ---------------------------------------------------------------------------
//
-TBool CBtDevExtension::IsUserAwareBonded( const TBTNamelessDevice &dev )
+EXPORT_C TBool CBtDevExtension::IsUserAwareBonded( const TBTNamelessDevice &dev )
{
if ( IsJustWorksBonded( dev ) )
{
@@ -130,6 +130,25 @@
return IsBonded( dev );
}
+// ---------------------------------------------------------------------------
+// IsHeadset
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CBtDevExtension::IsHeadset( const TBTDeviceClass &aCod )
+ {
+ if ( ( aCod.MajorServiceClass() & EMajorServiceAudioService ) &&
+ ( aCod.MajorDeviceClass() & EMajorDeviceAudioDevice ) )
+ {
+ if (aCod.MinorDeviceClass() == EMinorDeviceAVHandsfree ||
+ aCod.MinorDeviceClass() == EMinorDeviceAVCarAudio)
+ {
+ // This is the typical CoD setting used by carkits:
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
// ---------------------------------------------------------------------------
//
@@ -173,7 +192,7 @@
// ServiceConnectionStatus()
// ---------------------------------------------------------------------------
//
-TBTEngConnectionStatus CBtDevExtension::ServiceConnectionStatus() const
+EXPORT_C TBTEngConnectionStatus CBtDevExtension::ServiceConnectionStatus() const
{
return iServiceStatus;
}
@@ -219,8 +238,6 @@
iServiceStatus = aStatus;
}
-
-
// ---------------------------------------------------------------------------
// UpdateL()
// ---------------------------------------------------------------------------