tbluetoothattributeparser.h

来自「series60 应用程序开发的源代码 series60 应用程序开发的源代码」· C头文件 代码 · 共 66 行

H
66
字号
#ifndef __TBLUETOOTHATTRIBUTEPARSER_H__
#define __TBLUETOOTHATTRIBUTEPARSER_H__

// System includes
#include <btsdp.h>

// Forward Declaration
class MBluetoothAttributeObserver;

// CLASS DECLARATION

/**
*
* @class    TBluetoothAttributeParser TBluetoothAttributeParser.h 
* @brief    This class provides a mechanism for parsing a CSdpAttrValueDES type object
* It requires a reference to a MBluetoothAttributeObserver
*
* Copyright (c) EMCC Software Ltd 2003
* @version    1.0
* 
*/
class TBluetoothAttributeParser : public MSdpAttributeValueVisitor
{
    public: // Constructors - this is a T class therefore no need for 2nd stage
        TBluetoothAttributeParser(MBluetoothAttributeObserver& aObserver, TBool& aContinueSearching);

    public: // Getters and Setters
        inline TBool             Finished() const { return ( iProcessingState == EFinished ); }

    public: // MSdpAttributeValueVisitor
        void                 VisitAttributeValueL(CSdpAttrValue& aValue, TSdpElementType aType);
        void                 StartListL(CSdpAttrValueList& aList);
        void                 EndListL();

    private: // data structures
        enum EProcessingState
        {
            EStartOfDesOne,
            EStartOfDesTwo,
            EL2Cap,
            EEndOfDesTwo,
            EStartDesThree,
            ERFComm,
            ERFCommPort,
            EEndOfDesThree,
            EEndOfDesOne,
            EFinished
        };

    private: // Member functions - helper functions
        void                Next();
        void                CompareRFCOMM( CSdpAttrValue& aAttrValue );
        void                GetPort( CSdpAttrValue& aAttrValue );

    private: // Member data
        EProcessingState        iProcessingState;
        TBool                iFinished;
        MBluetoothAttributeObserver&    iObserver;
        TUint                iPort;
        TBool&                iContinueSearching;
};

#endif // __TBLUETOOTHATTRIBUTEPARSER_H__

// End of file

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?