×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    6

    How to get the Major Device Class at Discovery Time

    Hi,

    How to get the Device Class and Service Class while doing device discovery?

    I have something like this:

    iSocketServer.FindProtocol(_L("BTLinkManager"), iPInfo );
    iResolver.Open(iSocketServer,iPInfo.iAddrFamily,iPInfo.iProtocol);
    iInqSockAddr.SetIAC(KGIAC);
    iInqSockAddr.SetAction(KHostResInquiry | KHostResName | KHostResIgnoreCache);
    iResolver.GetByAddress(iInqSockAddr, iNameEntry, iStatus);
    SetActive();

    RunL:
    iDeviceName.Set(iNameEntry().iName);
    iDeviceAddr.Copy( ((TBTSockAddr)(iNameEntry().iAddr)).BTAddr().Des());

    The name and address can be found from iNameEntry but what about the device class and service class? I have read (Symbian OS Communications programming) that this information is returned in the iInqSockAddr object.
    iInqSockAddr.MajorClassOfDevice() always returns 0. Why?


    Thanks for any help,

    Hans

  2. #2
    Registered User
    Join Date
    Jan 2008
    Posts
    8

    Re: How to get the Major Device Class at Discovery Time

    I am also facing the same problem.


    can any body help with that.

    thanks in advance.

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: How to get the Major Device Class at Discovery Time

    Hi,
    Another way to get it

    In .h file
    RHostResolver iMyResolver;
    TInquirySockAddr iMySockAddr;
    TNameEntry iMyEntry;

    In cpp file.
    iMyResolver.GetByAddress( iMySockAddr, iMyEntry, iStatus );
    SetActive();

    In RunL()
    TInquirySockAddr& dev = TInquirySockAddr::Cast( iMyEntry().iAddr );

    Get the following
    dev.MajorServiceClass(),
    dev.MajorClassOfDevice(),
    dev.MinorClassOfDevice(),

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •