equal
deleted
inserted
replaced
25 #include "DunBtPlugin.h" |
25 #include "DunBtPlugin.h" |
26 #include "DunDebug.h" |
26 #include "DunDebug.h" |
27 |
27 |
28 const TInt KListenQueSize = 1; |
28 const TInt KListenQueSize = 1; |
29 const TInt KDunFixedChannel = 22; // Hack/kludge for Apple Bug ID 6527598 |
29 const TInt KDunFixedChannel = 22; // Hack/kludge for Apple Bug ID 6527598 |
|
30 |
|
31 //Service Class Bits supported by DUN |
|
32 static const TUint16 KCoDDunServiceClass = EMajorServiceTelephony | EMajorServiceNetworking; |
30 |
33 |
31 // ======== MEMBER FUNCTIONS ======== |
34 // ======== MEMBER FUNCTIONS ======== |
32 |
35 |
33 // --------------------------------------------------------------------------- |
36 // --------------------------------------------------------------------------- |
34 // Two-phased constructor. |
37 // Two-phased constructor. |
338 aInUse = ETrue; |
341 aInUse = ETrue; |
339 FTRACE(FPrint(_L("CDunBtListen::ReserveLocalChannel() Bind() complete (%d)"), retTemp)); |
342 FTRACE(FPrint(_L("CDunBtListen::ReserveLocalChannel() Bind() complete (%d)"), retTemp)); |
340 return KErrInUse; |
343 return KErrInUse; |
341 } |
344 } |
342 aChannelNum = aListenSocket.LocalPort(); |
345 aChannelNum = aListenSocket.LocalPort(); |
|
346 |
|
347 // We try to set the Telephony and Networking bits in our service class. If this fails we |
|
348 // ignore it, as it's better to carry on without it than to fail to start listening. |
|
349 (void)aListenSocket.SetOpt(KBTRegisterCodService, KSolBtRFCOMM, KCoDDunServiceClass); |
|
350 |
343 retTemp = aListenSocket.Listen( KListenQueSize ); |
351 retTemp = aListenSocket.Listen( KListenQueSize ); |
344 if ( retTemp != KErrNone ) |
352 if ( retTemp != KErrNone ) |
345 { |
353 { |
346 aListenSocket.Close(); |
354 aListenSocket.Close(); |
347 FTRACE(FPrint(_L("CDunBtListen::ReserveLocalChannel() Listen() complete (%d)"), retTemp)); |
355 FTRACE(FPrint(_L("CDunBtListen::ReserveLocalChannel() Listen() complete (%d)"), retTemp)); |