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

📄 settings.h

📁 一个WinCE6。0下的IP phone的源代码
💻 H
字号:
//
// 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.
//
#ifndef _SETTINGS_H_203259956_ // To prevent multiple #includes
#define _SETTINGS_H_203259956_

#include "string.hxx"

#define INVALID_PARSE_INDEX -1

//layout of the datarecord for different parsing formats
#define CONTACTS_PARSE_DISPLAYNAME 0
#define CONTACTS_PARSE_WORKPHONE   1
#define CONTACTS_PARSE_HOMEPHONE   2
#define CONTACTS_PARSE_MOBILE      3
#define CONTACTS_PARSE_EMAIL       4
#define CONTACTS_PARSE_HOMEADDR    5
#define CONTACTS_PARSE_WORKADDR    6

#define NUM_CONTACTS_PROPERTIES    7

#define GAL_PARSE_DISPLAYNAME   0
#define GAL_PARSE_ALIAS         1
#define GAL_PARSE_OFFICE        2
#define GAL_PARSE_PHONE         3
#define GAL_PARSE_SMTP          4

#define NUM_GAL_PROPERTIES      5

#define FBD_PARSE_DISPLAYNAME   0
#define FBD_PARSE_FBDATA        1
#define FBD_PARSE_EMAIL         2

#define NUM_FBD_PROPERTIES      3

/*------------------------------------------------------------------------------
    OWAClientSetting
    
    Class defining a read-only setting. On dll initialization gets loaded from the
    registry
------------------------------------------------------------------------------*/
class OWAClientSetting
{
public:
    OWAClientSetting(
        const WCHAR *wszPath,
        const WCHAR *wszValue,
        const WCHAR *wszDefault
        )
    {
        m_wszRegKeyPath  = wszPath;
        m_wszValueName   = wszValue;
        m_wszDefaultData = wszDefault;
    }

    static HRESULT Initialize();

    //First const  -->  cannot change the data being pointed to
    //Second const --> cannot assign the returned pointer
    //Last const   --> method cannot change data of object
    operator WCHAR const* const() const    
    {
        return (const WCHAR*)m_wstrVal;
    }

public:
    HRESULT Load();

private:
    HRESULT Store();
    
private:
    const WCHAR  *m_wszRegKeyPath;
    const WCHAR  *m_wszValueName;
    const WCHAR  *m_wszDefaultData;
    ce::wstring   m_wstrVal;
};

//Settings objects (defined in the cpp file) that other 
//classes can use
const extern OWAClientSetting c_SettingContactsUrlFmt;
const extern OWAClientSetting c_SettingContactsMethod;
const extern OWAClientSetting c_SettingContactsBodyFmt;
const extern OWAClientSetting c_SettingContactsBodyStartFmt;
const extern OWAClientSetting c_SettingContactsBodyEndFmt;
const extern OWAClientSetting c_SettingContactsBodyFilterFNFmt;
const extern OWAClientSetting c_SettingContactsBodyFilterLNFmt;
const extern OWAClientSetting c_SettingContactsAdditionalHeaderName;
const extern OWAClientSetting c_SettingContactsAdditionalHeaderValue;

const extern OWAClientSetting c_SettingGALUrlFmt;
const extern OWAClientSetting c_SettingGALMethod;
const extern OWAClientSetting c_SettingGALBodyFmt;
const extern OWAClientSetting c_SettingGALAppendAlias;
const extern OWAClientSetting c_SettingGALAppendFirstName;
const extern OWAClientSetting c_SettingGALAppendLastName;
const extern OWAClientSetting c_SettingGALAdditionalHeaderName;
const extern OWAClientSetting c_SettingGALAdditionalHeaderValue;

const extern OWAClientSetting c_SettingFBSUrlFmt; 
const extern OWAClientSetting c_SettingFBSMethod;
const extern OWAClientSetting c_SettingFBSBodyFmt;
const extern OWAClientSetting c_SettingFBSSearchLength;
const extern OWAClientSetting c_SettingFBSIntervalLength;
const extern OWAClientSetting c_SettingFBSAdditionalHeaderName;
const extern OWAClientSetting c_SettingFBSAdditionalHeaderValue;

const extern OWAClientSetting c_SettingAuthUrlFmt;
const extern OWAClientSetting c_SettingAuthMethod;
const extern OWAClientSetting c_SettingAuthBodyFmt;
const extern OWAClientSetting c_SettingAuthLoginPageGUID;

const extern OWAClientSetting c_SettingContactsDispName;
const extern OWAClientSetting c_SettingContactsWorkPhone;
const extern OWAClientSetting c_SettingContactsHomePhone;
const extern OWAClientSetting c_SettingContactsMobile;   
const extern OWAClientSetting c_SettingContactsEmail;
const extern OWAClientSetting c_SettingContactsHomeAddr;
const extern OWAClientSetting c_SettingContactsWorkAddr;
const extern OWAClientSetting c_SettingContactsNewDataRecord;

const extern OWAClientSetting c_SettingGALDispName;       
const extern OWAClientSetting c_SettingGALAlias;    
const extern OWAClientSetting c_SettingGALOffice;   
const extern OWAClientSetting c_SettingGALPhone;   
const extern OWAClientSetting c_SettingGALSMTP;     
const extern OWAClientSetting c_SettingGALNewDataRecord;

const extern OWAClientSetting c_SettingFBDEmailAddress;
const extern OWAClientSetting c_SettingFBDDispName;
const extern OWAClientSetting c_SettingFBDFreeBusy;
const extern OWAClientSetting c_SettingFBDNewDataRecord;

//locale settings:
const extern OWAClientSetting c_SettingLocaleName;
const extern OWAClientSetting c_SettingLocaleDefaultValue;

#endif // !defined _SETTINGS_H_203259956_

⌨️ 快捷键说明

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