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

📄 serversettings.hpp

📁 一个WinCE6。0下的IP phone的源代码
💻 HPP
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
#pragma once

#ifndef __SERVERSETTINGS_HPP__
#define __SERVERSETTINGS_HPP__

#include "SettingsDialog.hpp"
#include <regext.h>
#include <atlbase.h>
#include <msxml2.h>
#include <string.hxx>

class ServerSettings_t
{
public:
    ServerSettings_t();
    ~ServerSettings_t();

    HRESULT 
    RetrieveSettingsFromProvision(
        void
        );

private:
    HRESULT
    RetriveDataFromXML(
        BSTR bstrXML
        ); 

    HRESULT
    DispatchSettings(
        IXMLDOMNode *pCurrentNode
        ); 

    HRESULT
    ParseEachSetting(
        void
        ); 

public:
    enum ServerSettings_e
    {
        AccountName = 0, 
        Password, 
        PhoneNumber, 
        SIPProxy, 
        SIPRegistrar, 
        SIPTransport, 
        BackupSIPProxy, 
        BackupSIPRegistrar, 
        VoicemailProxy, 
        VoicemailNumber, 
        ExchangeServer, 
        ExchangeProxy, 
        LastSetting, 
    }; 

    enum SettingCategory_e
    {
        SIPSettings  = 0, 
        VoicemailSettings, 
        BackupSIPSettings, 
        ProvisionSettings, 
        ExchangeProxySetting,
        ExchangeServerSetting, 
        LastCategory, 
    }; 
    
    typedef HRESULT (*pfnGetSettingValue)(
                IXMLDOMDocument*    pXMLDocument,
                BSTR*               pbstrValue
                ); 

    struct ServerSettingData
    {
        ServerSettings_e    SettingName;    //setting name
        SettingCategory_e   Category;       //category specify where this setting value will be taken from         
        pfnGetSettingValue  GetSettingValue;//function to get setting value 
        UINT                ImeType;        //Ime Type
        UINT                EsExtra;        //Extra Edit Style
        UINT                LabelId;        //control id for the associated display item label
        UINT                NotificationId; //control id for the status region text to display when the item is selected
    };

    static const    ServerSettingData   sc_ServerSettings[];     
    static ce::wstring                  s_ServerSettings[LastSetting];
    static const    unsigned int        sc_ServerSettingsItems;
  
private:

    static const    WCHAR       sc_QueryXML[]; 
    static const    WCHAR       sc_NameAttribute[]; 
    static const    WCHAR       sc_ValueAttribute[]; 
    static const    WCHAR       sc_SIPSettings[]; 
    static const    WCHAR       sc_BackupSIPSettings[]; 
    static const    WCHAR       sc_VoicemailSettings[]; 

    CComPtr<IXMLDOMDocument>    m_cpProvision; 
    CComPtr<IXMLDOMDocument>    m_cpSIPSettings; 
    CComPtr<IXMLDOMDocument>    m_cpVoicemailSettings; 
    CComPtr<IXMLDOMDocument>    m_cpBackupSIPSettings; 
};

#endif // !defined __SERVERSETTINGS_HPP__

⌨️ 快捷键说明

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