📄 dmapidefinitions.h
字号:
/*
==============================================================================
* Device Management API 3.2
*
Filename : DMAPIDefinitions.h
Description : Device Management API definitions
Version : 3.2
Copyright (c) 2005-2007 Nokia Corporation.
This software, including but not limited to documentation and any related
computer programs ("Software"), is protected by intellectual property rights
of Nokia Corporation and/or its licensors. All rights are reserved. By using
the Software you agree to the terms and conditions hereunder. If you do not
agree you must cease using the software immediately.
Reproducing, disclosing, modifying, translating, or distributing any or all
of the Software requires the prior written consent of Nokia Corporation.
Nokia Corporation retains the right to make changes to the Software at any
time without notice.
A copyright license is hereby granted to use of the Software to make, publish,
distribute, sub-license and/or sell new Software utilizing this Software.
The Software may not constitute the primary value of any new software utilizing
this software. No other license to any other intellectual property rights of
Nokia or a third party is granted.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF NON-INFRINGEMENT,
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
NOKIA CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL LOSS OR DAMAGES, INCLUDING BUT NOT LIMITED TO, LOST PROFITS
OR REVENUE, LOSS OF USE, COST OF SUBSTITUTE PROGRAM, OR LOSS OF DATA OR EQUIPMENT
ARISING OUT OF THE USE OR INABILITY TO USE THE MATERIAL, EVEN IF
NOKIA CORPORATION HAS BEEN ADVISED OF THE LIKELIHOOD OF SUCH DAMAGES OCCURRING.
==============================================================================
*/
#ifndef _DMAPIDEFINITIONS_H__
#define _DMAPIDEFINITIONS_H__
//=========================================================
// Common data type definitions used in Connectivity API
//
#include "PCCSTypeDefinitions.h"
//=========================================================
//=========================================================
// Device Management API definitions
// ----------------------------------------------------
// Device Management handle
typedef APIHANDLE DMHANDLE;
// ----------------------------------------------------
// ----------------------------------------------------
// Connection info structure
typedef struct
{
DWORD dwDeviceID;
DWORD dwMedia; // See definitions for media types in PCCSTypeDefinitions.h
WCHAR* pstrDeviceName;
WCHAR* pstrAddress;
DWORD dwState; // See definitions for State values
} CONAPI_CONNECTION_INFO;
// Device info structure
typedef struct
{
WCHAR* pstrSerialNumber;
WCHAR* pstrFriendlyName;
WCHAR* pstrModel;
WCHAR* pstrManufacturer;
DWORD dwNumberOfItems;
CONAPI_CONNECTION_INFO* pItems;
} CONAPI_DEVICE;
// General device info structure
typedef struct
{
DWORD dwSize;
DWORD dwType;
WCHAR* pstrTypeName;
WCHAR* pstrSWVersion;
WCHAR* pstrUsedLanguage;
DWORD dwSyncSupport;
DWORD dwFileSystemSupport;
} CONAPI_DEVICE_GEN_INFO;
// Device product info structure
typedef struct
{
DWORD dwSize;
LPAPIWCHAR pstrProductCode;
} CONAPI_DEVICE_INFO_PRODUCT;
// Device device icon structure
typedef struct
{
DWORD dwSize; // [in] Size
DWORD dwParam; // [in] Reserved for future use. Must be 0.
LPAPIWCHAR pstrTarget; // [in] Target drive info. Must include memory type (e.g. "MMC" or "DEV").
DWORD dwDataLength; // [out] Icon data length.
unsigned char* pData; // [out] Icon data.
} CONAPI_DEVICE_INFO_ICON;
// Device property info structure
typedef struct
{
DWORD dwSize; // [in] Size
DWORD dwTargetPropertyType; // [in] Target property type
LPAPIWCHAR pstrPropertyName; // [in] Target Property name
DWORD dwResult; // [out] Result code. CONA_OK if succeeded, otherwise error code
LPAPIWCHAR pstrPropertyValue; // [out] Result string. If not found pointer is NULL
} CONAPI_GET_PROPERTY;
typedef struct
{
DWORD dwSize; // [in] Size
DWORD dwNumberOfStructs; // [in] Count of CONAPI_GET_PROPERTY struct
CONAPI_GET_PROPERTY* pGetPropertyInfoStructs; // [in] Pointer toCONAPI_GET_PROPERTY structs
} CONAPI_DEVICE_INFO_PROPERTIES;
// ----------------------------------------------------
// Definitions used with swState value in CONAPI_CONNECTION_INFO stucture:
#define CONAPI_DEVICE_NOT_FUNCTIONAL 0x00000000 // Device is not working or unsupported device.
#define CONAPI_DEVICE_UNPAIRED 0x00000001 // Device is not paired
#define CONAPI_DEVICE_PAIRED 0x00000002 // Device is paired
#define CONAPI_DEVICE_PCSUITE_TRUSTED 0x00000004 // Device is PC Suite trusted
#define CONAPI_DEVICE_WRONG_MODE 0x00000008 // Device is connected in wrong mode.
// Macros used to check device's swState value:
#define CONAPI_IS_DEVICE_UNPAIRED(dwState) (dwState & 0x01) // Returns 1 if true
#define CONAPI_IS_DEVICE_PAIRED(dwState) ((dwState >> 1) & 0x01) // Returns 1 if true
#define CONAPI_IS_PCSUITE_TRUSTED(dwState) ((dwState >> 2) & 0x01) // Returns 1 if true
#define CONAPI_IS_DEVICE_WRONG_MODE(dwState)((dwState >> 3) & 0x01) // Returns 1 if true
// Definitions used with CONASearchDevices function:
#define CONAPI_ALLOW_TO_USE_CACHE 0x00001000 // Get all devices from cache if available
#define CONAPI_GET_ALL_PHONES 0x00002000 // Get all devices from target media
#define CONAPI_GET_PAIRED_PHONES 0x00004000 // Get all paired devices from target media
#define CONAPI_GET_TRUSTED_PHONES 0x00008000 // Get all PC Suite trusted devices from target media.
// Definitions used with CONAChangeDeviceTrustedState function:
#define CONAPI_PAIR_DEVICE 0x00000100 // Pair device
#define CONAPI_UNPAIR_DEVICE 0x00000200 // Unpair device
#define CONAPI_SET_PCSUITE_TRUSTED 0x00000400 // Set device to PC Suite trusted
#define CONAPI_SET_PCSUITE_UNTRUSTED 0x00000800 // Remove PC Suite trusted information.
// Definitions used with CONAGetDeviceInfo function:
#define CONAPI_DEVICE_GENERAL_INFO 0x00010000 // Get CONAPI_DEVICE_GEN_INFO struct.
#define CONAPI_DEVICE_PRODUCT_INFO 0x00100000 // Get CONAPI_DEVICE_INFO_PRODUCT struct.
#define CONAPI_DEVICE_PROPERTIES_INFO 0x01000000 // Get CONAPI_DEVICE_INFO_PROPERTIES struct.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -