⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdkemsviewerruleclient.h

📁 WIndows mobile 5.0 pocket pc sdk sample for win32
💻 H
📖 第 1 页 / 共 2 页
字号:
    TCHAR*  m_szUserData;   //Text associated with EMS
    BOOL    m_fValidated;   //Has object been validated?
    BOOL    m_fInitialized; //Derived objects should not proceed if FALSE
};

/******************************************************************************

    CEMSTextFormatting - Text formatting object.  This represents a sequential
    series of text characters that share a common formatting.

******************************************************************************/
class CEMSTextFormatting : public CEMSBaseObject
{
public:
    CEMSTextFormatting(LPBYTE lpData, ULONG cbData, ULONG ulBaseOffset, LPCTSTR szUserData);
    
    //Alignment options
    enum EMS_TF_ALIGNMENT {
        EMSTF_ALIGN_LEFT = 0,
        EMSTF_ALIGN_CENTER = 1,
        EMSTF_ALIGN_RIGHT = 2,
        EMSTF_ALIGN_LANGUAGEDEPENDENT = 3
    };

    //Font size options, a "size" in the sense we're used to in WIN32 is not
    //given, it's up to the manufacturer to decide what is 'normal' and 'large'
    enum EMS_TF_FONTSIZE {
        EMSTF_FONTSIZE_NORMAL = 0,
        EMSTF_FONTSIZE_LARGE = 1,
        EMSTF_FONTSIZE_SMALL = 2,
        EMSTF_FONTSIZE_RESERVED = 3
    };

    //Overloaded Methods
    BOOL ValidateData();
    BOOL ToString(LPTSTR* ppszObjectData);
    BOOL ExtractInfoFromHeader();
    
private:
    ULONG               m_ulBaseOffset;   //Need to save for validation
    BYTE                m_chLen;          //Length of chars formatted
    EMS_TF_ALIGNMENT    m_eAlignment;     //alignment of text
    EMS_TF_FONTSIZE     m_eFontSize;      //size of text
    BOOL                m_fBold;          //Bold?
    BOOL                m_fItalics;       //Italicized?
    BOOL                m_fUnderlined;    //Underlined?
    BOOL                m_fStrikethrough; //Strikethough?
};

/******************************************************************************

    CEMSPredefinedSound - A predefined sound object.  This is really just an 
    offset and an index into a predefined list of sounds.  The sounds are 
    described in the 3GPP spec, but are up to the manufacturer to supply

******************************************************************************/
class CEMSPredefinedSound : public CEMSBaseObject
{
public:
    CEMSPredefinedSound(LPBYTE lpData, ULONG cbData, ULONG ulBaseOffset, LPCTSTR szUserData);

    //List of available sounds as defined in 3GPP...
    enum EMS_PREDEFINEDSOUND {
        EMSPS_CHIMESHIGH = 0,
        EMSPS_CHIMESLOW = 1,
        EMSPS_DING = 2,
        EMSPS_TADA = 3,
        EMSPS_NOTIFY = 4,
        EMSPS_DRUM = 5,
        EMSPS_CLAPS = 6,
        EMSPS_FANFAR = 7,
        EMSPS_CHORDHIGH = 8,
        EMSPS_CHORDLOW = 9
    };

    //Overloaded Methods
    BOOL ValidateData();
    BOOL ToString(LPTSTR* ppszObjectData);
    BOOL ExtractInfoFromHeader();
    
private:
    EMS_PREDEFINEDSOUND m_eSound;
};

/******************************************************************************
    
    CEMSUserdefinedSound - A user defined sound.  This is an offset, and then
    a chunk of data representing the sound.  The data is in a format called
    iMelody and has a max length of 128 bytes (MAX_IMELODY_LEN)

******************************************************************************/
class CEMSUserdefinedSound : public CEMSBaseObject
{
public:
    CEMSUserdefinedSound(LPBYTE lpData, ULONG cbData, ULONG ulBaseOffset, LPCTSTR szUserData);
    ~CEMSUserdefinedSound();

    //Overloaded Methods
    BOOL ValidateData();
    BOOL ToString(LPTSTR* ppszObjectData);
    BOOL ExtractInfoFromHeader();

private:
    LPBYTE  m_lpiMelody;    //iMelody data
    ULONG   m_cbiMelody;    //size in bytes of iMelody data
};

/******************************************************************************
    
    CEMSPredefinedAnimation - A predefined animation object.  This is an offset
    and an index to a predefined animation.  The animations are defined in the
    3GPP spec, but again are up to the manufacturer to design.
    
******************************************************************************/
class CEMSPredefinedAnimation : public CEMSBaseObject
{
public:
    CEMSPredefinedAnimation(LPBYTE lpData, ULONG cbData, ULONG ulBaseOffset, LPCTSTR szUserData);

    //Animation list as defined in 3GPP
    enum EMS_PREDEFINEDANIM {
        EMSPA_IAMIRONICFLIRTY = 0,
        EMSPA_IAMGLAD = 1,
        EMSPA_IAMSCEPTIC = 2,
        EMSPA_IAMSAD = 3,
        EMSPA_WOW = 4,
        EMSPA_IAMCRYING = 5,
        EMSPA_IAMWINKING = 6,
        EMSPA_IAMLAUGHING = 7,
        EMSPA_IAMINDIFFERENT = 8,
        EMSPA_INLOVEKISSING = 9,
        EMSPA_IAMCONFUSED = 10,
        EMSPA_TONGUEHANGINGOUT = 11,
        EMSPA_IAMANGRY = 12,
        EMSPA_WEARINGGLASSES = 13,
        EMSPA_DEVIL = 14
    };

    //Overloaded Methods
    BOOL ValidateData();
    BOOL ToString(LPTSTR* ppszObjectData);
    BOOL ExtractInfoFromHeader();

private:
    EMS_PREDEFINEDANIM m_eAnimation;    
};

/******************************************************************************
    
    CEMSAnimation - Animation object.  Both small and large animations are 
    handled by this class.  Animations are always 4 pictures and are either
    16x16 each (small) or 32x32 each (large).
 
******************************************************************************/
class CEMSAnimation : public CEMSBaseObject
{
public:
    CEMSAnimation(LPBYTE lpData, ULONG cbData, ULONG ulBaseOffset, LPCTSTR szUserData, int iType);
    ~CEMSAnimation();

    //Supported animation types as defined in 3GPP
    enum EMS_ANIMATIONTYPE {
        EMSAT_LARGE = 0,
        EMSAT_SMALL = 1        
    };

    //Overloaded Methods
    BOOL ValidateData();
    BOOL ToString(LPTSTR* ppszObjectData);
    BOOL ExtractInfoFromHeader();

private:
    LPBYTE              m_rglpAnimData[NUM_ANIM_FRAMES];  //always 4 images
    UINT                m_uRes;             //16 or 32
    EMS_ANIMATIONTYPE   m_eAnimType;
};

/******************************************************************************

    CEMSPicture - A picture object.  Small, large, and variable picture types
    are handled by this class.  A picture can be small (16x16), large (32x32), 
    or variable, remembering that a single SM can only be 140 BYTES in size,
    including the other portions of the header data and any user data, so the
    total size of the picture is limited...

******************************************************************************/
class CEMSPicture : public CEMSBaseObject
{
public:
    CEMSPicture(LPBYTE lpData, ULONG cbData, ULONG ulBaseOffset, LPCTSTR szUserData, int iType);
    ~CEMSPicture();

    //Picture types as defined in 3GPP
    enum EMS_PICTURETYPE {
        EMSPT_LARGE = 0,
        EMSPT_SMALL = 1,
        EMSPT_VARIABLE = 2
    };

    //Overloaded Methods
    BOOL ValidateData();
    BOOL ToString(LPTSTR* ppszObjectData);
    BOOL ExtractInfoFromHeader();

private:
    LPBYTE          m_lpPicData;    //Picture data
    UINT            m_uHorzRes;     //Horizontal resolution in pixels
    UINT            m_uVertRes;     //Vertical resolution in pixels
    EMS_PICTURETYPE m_ePicType;     //Picture type
};

/******************************************************************************

    CEMSUserPrompt - A user prompt object.  This is an offset and a number of
    objects that follow the user prompt to be included in the prompt.  It would
    seem from the 3GPPP spec that this would not be included with other objects
    that aren't part of the prompt in the same EMS.  This really isn't of
    concern here, but the custom form should consider objects included in the
    prompt as candidates for "stitching" - e.g. joining images and sounds that
    follow each other in order.

******************************************************************************/
class CEMSUserPrompt : public CEMSBaseObject
{
public:
    CEMSUserPrompt(LPBYTE lpData, ULONG cbData, ULONG ulBaseOffset, LPCTSTR szUserData);

    //Overloaded Methods
    BOOL ValidateData();
    BOOL ToString(LPTSTR* ppszObjectData);
    BOOL ExtractInfoFromHeader();
        
private:
    ULONG m_ulNumObjects;   //Number of objects to follow to include in prompt
};

⌨️ 快捷键说明

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