mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-23 18:04:18 +08:00
Add PNRP* API 1 und 2.
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@5995 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
parent
50b4db8a3f
commit
263724d897
80
mingw-w64-headers/include/pnrpdef.h
Executable file
80
mingw-w64-headers/include/pnrpdef.h
Executable file
@ -0,0 +1,80 @@
|
||||
/**
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#include <winapifamily.h>
|
||||
|
||||
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
|
||||
|
||||
#if defined (PNRP_USE_V1_API) && defined (PNRP_USE_V2_API)
|
||||
#error either define PNRP_USE_V1_API, or PNRP_USE_V2_API
|
||||
#endif
|
||||
|
||||
#if !defined (PNRP_USE_V1_API) && !defined (PNRP_USE_V2_API)
|
||||
#if _WIN32_WINNT >= 0x0600
|
||||
#define PNRP_USE_V2_API
|
||||
#else
|
||||
#define PNRP_USE_V1_API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define PNRP_MAX_ENDPOINT_ADDRESSES (10)
|
||||
#define PNRP_MAX_EXTENDED_PAYLOAD_BYTES (0x1000)
|
||||
|
||||
#define WSZ_SCOPE_GLOBAL L"GLOBAL"
|
||||
#define WSZ_SCOPE_SITELOCAL L"SITELOCAL"
|
||||
#define WSZ_SCOPE_LINKLOCAL L"LINKLOCAL"
|
||||
|
||||
typedef enum _PNRP_SCOPE {
|
||||
PNRP_SCOPE_ANY = 0,
|
||||
PNRP_GLOBAL_SCOPE = 1,
|
||||
PNRP_SITE_LOCAL_SCOPE = 2,
|
||||
PNRP_LINK_LOCAL_SCOPE = 3
|
||||
} PNRP_SCOPE,*PPNRP_SCOPE;
|
||||
|
||||
typedef enum _PNRP_CLOUD_STATE {
|
||||
PNRP_CLOUD_STATE_VIRTUAL = 0,
|
||||
PNRP_CLOUD_STATE_SYNCHRONISING = 1,
|
||||
PNRP_CLOUD_STATE_ACTIVE = 2,
|
||||
PNRP_CLOUD_STATE_DEAD = 3,
|
||||
PNRP_CLOUD_STATE_DISABLED = 4,
|
||||
PNRP_CLOUD_STATE_NO_NET = 5,
|
||||
PNRP_CLOUD_STATE_ALONE = 6
|
||||
} PNRP_CLOUD_STATE;
|
||||
|
||||
typedef enum _PNRP_CLOUD_FLAGS {
|
||||
PNRP_CLOUD_NO_FLAGS = 0,
|
||||
PNRP_CLOUD_NAME_LOCAL = 1,
|
||||
PNRP_CLOUD_RESOLVE_ONLY = 2,
|
||||
PNRP_CLOUD_FULL_PARTICIPANT = 4
|
||||
} PNRP_CLOUD_FLAGS;
|
||||
|
||||
typedef enum _PNRP_REGISTERED_ID_STATE {
|
||||
PNRP_REGISTERED_ID_STATE_OK = 1,
|
||||
PNRP_REGISTERED_ID_STATE_PROBLEM = 2
|
||||
} PNRP_REGISTERED_ID_STATE;
|
||||
|
||||
typedef enum _PNRP_RESOLVE_CRITERIA {
|
||||
PNRP_RESOLVE_CRITERIA_DEFAULT = 0,
|
||||
PNRP_RESOLVE_CRITERIA_REMOTE_PEER_NAME = 1,
|
||||
PNRP_RESOLVE_CRITERIA_NEAREST_REMOTE_PEER_NAME = 2,
|
||||
PNRP_RESOLVE_CRITERIA_NON_CURRENT_PROCESS_PEER_NAME = 3,
|
||||
PNRP_RESOLVE_CRITERIA_NEAREST_NON_CURRENT_PROCESS_PEER_NAME = 4,
|
||||
PNRP_RESOLVE_CRITERIA_ANY_PEER_NAME = 5,
|
||||
PNRP_RESOLVE_CRITERIA_NEAREST_PEER_NAME = 6
|
||||
} PNRP_RESOLVE_CRITERIA;
|
||||
|
||||
typedef struct _PNRP_CLOUD_ID {
|
||||
INT AddressFamily;
|
||||
PNRP_SCOPE Scope;
|
||||
ULONG ScopeId;
|
||||
} PNRP_CLOUD_ID,*PPNRP_CLOUD_ID;
|
||||
|
||||
typedef enum _PNRP_EXTENDED_PAYLOAD_TYPE {
|
||||
PNRP_EXTENDED_PAYLOAD_TYPE_NONE = 0,
|
||||
PNRP_EXTENDED_PAYLOAD_TYPE_BINARY,
|
||||
PNRP_EXTENDED_PAYLOAD_TYPE_STRING,
|
||||
} PNRP_EXTENDED_PAYLOAD_TYPE,*PPNRP_EXTENDED_PAYLOAD_TYPE;
|
||||
|
||||
#endif
|
82
mingw-w64-headers/include/pnrpns.h
Executable file
82
mingw-w64-headers/include/pnrpns.h
Executable file
@ -0,0 +1,82 @@
|
||||
/**
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#ifndef _PNRPNS_H_
|
||||
#define _PNRPNS_H_
|
||||
|
||||
#include <winapifamily.h>
|
||||
|
||||
#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
|
||||
|
||||
#include "pnrpdef.h"
|
||||
|
||||
#ifndef NS_PNRPNAME
|
||||
#define NS_PNRPNAME (38)
|
||||
#endif
|
||||
|
||||
#ifndef NS_PNRPCLOUD
|
||||
#define NS_PNRPCLOUD (39)
|
||||
#endif
|
||||
|
||||
#define PNRPINFO_HINT 0x1
|
||||
|
||||
typedef struct _PNRPINFO_V1 {
|
||||
DWORD dwSize;
|
||||
LPWSTR lpwszIdentity;
|
||||
DWORD nMaxResolve;
|
||||
DWORD dwTimeout;
|
||||
DWORD dwLifetime;
|
||||
PNRP_RESOLVE_CRITERIA enResolveCriteria;
|
||||
DWORD dwFlags;
|
||||
SOCKET_ADDRESS saHint;
|
||||
PNRP_REGISTERED_ID_STATE enNameState;
|
||||
} PNRPINFO_V1,*PPNRPINFO_V1;
|
||||
|
||||
typedef struct _PNRPINFO_V2 {
|
||||
DWORD dwSize;
|
||||
LPWSTR lpwszIdentity;
|
||||
DWORD nMaxResolve;
|
||||
DWORD dwTimeout;
|
||||
DWORD dwLifetime;
|
||||
PNRP_RESOLVE_CRITERIA enResolveCriteria;
|
||||
DWORD dwFlags;
|
||||
SOCKET_ADDRESS saHint;
|
||||
PNRP_REGISTERED_ID_STATE enNameState;
|
||||
PNRP_EXTENDED_PAYLOAD_TYPE enExtendedPayloadType;
|
||||
__C89_NAMELESS union {
|
||||
BLOB blobPayload;
|
||||
PWSTR pwszPayload;
|
||||
};
|
||||
} PNRPINFO_V2,*PPNRPINFO_V2;
|
||||
|
||||
#ifdef PNRP_USE_V1_API
|
||||
typedef PNRPINFO_V1 PNRPINFO;
|
||||
typedef PPNRPINFO_V1 PPNRPINFO;
|
||||
#else
|
||||
typedef PNRPINFO_V2 PNRPINFO;
|
||||
typedef PPNRPINFO_V2 PPNRPINFO;
|
||||
#endif
|
||||
|
||||
typedef struct _PNRPCLOUDINFO {
|
||||
DWORD dwSize;
|
||||
PNRP_CLOUD_ID Cloud;
|
||||
PNRP_CLOUD_STATE enCloudState;
|
||||
PNRP_CLOUD_FLAGS enCloudFlags;
|
||||
} PNRPCLOUDINFO,*PPNRPCLOUDINFO;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEFINE_GUID
|
||||
DEFINE_GUID (NS_PROVIDER_PNRPNAME, 0x03fe89cd, 0x766d, 0x4976, 0xb9, 0xc1, 0xbb, 0x9b, 0xc4, 0x2c, 0x7b, 0x4d);
|
||||
DEFINE_GUID (NS_PROVIDER_PNRPCLOUD, 0x03fe89ce, 0x766d, 0x4976, 0xb9, 0xc1, 0xbb, 0x9b, 0xc4, 0x2c, 0x7b, 0x4d);
|
||||
DEFINE_GUID (SVCID_PNRPCLOUD, 0xc2239ce6, 0x00c0, 0x4fbf, 0xba, 0xd6, 0x18, 0x13, 0x93, 0x85, 0xa4, 0x9a);
|
||||
DEFINE_GUID (SVCID_PNRPNAME_V1, 0xc2239ce5, 0x00c0, 0x4fbf, 0xba, 0xd6, 0x18, 0x13, 0x93, 0x85, 0xa4, 0x9a);
|
||||
DEFINE_GUID (SVCID_PNRPNAME_V2, 0xc2239ce7, 0x00c0, 0x4fbf, 0xba, 0xd6, 0x18, 0x13, 0x93, 0x85, 0xa4, 0x9a);
|
||||
#ifdef PNRP_USE_V1_API
|
||||
#define SVCID_PNRPNAME SVCID_PNRPNAME_V1
|
||||
#else
|
||||
#define SVCID_PNRPNAME SVCID_PNRPNAME_V2
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user