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

📄 ms_upnp.h

📁 1. 8623L平台
💻 H
字号:
/* * * Copyright (c) Sigma Designs, Inc. 2005. All rights reserved. * */#ifndef __MS_UPNP_H__#define __MS_UPNP_H__#include "rmdef/rmdef.h"/* Flags for device status */#define MS_ISAUTHORIZED 	1	/* The server has authorized us */#define MS_WAITREGISTRATION	2	/* We are waiting for the server registration response */#define MS_ISVALIDATED	 	4	/* We are registered to the server */#define MS_WAITPROXYMITY	8	/* We are waiting for proximity detection to finish */#define MS_PROXYMITYOK		16	/* We are have been detected as near by the server */#define MS_FORCEREGISTER	32	/* Force registration, even if already registered *//* WMDRM errors *//* The DMR's certificate is corrupted or its signature cannot be verified. */#define DRM_INVALID_CERTIFICATE  		100/* A hash of the DMR's certificate is listed in the transmitter's Certificate * Revocation List. */#define	DRM_CERTIFICATE_REVOKED  		101/* The DMR must be approved before it can execute the intended operation. */#define	DRM_MUST_APPROVE  			102/* The transmitter does not hold a license for the requested action. */#define	DRM_LICENSE_UNAVAILABLE  		103/* The transmitter encountered a generic failure. */#define	DRM_TRANSMITTER_FAILURE  		104/* The transmitter cannot execute the requested action because the number of * devices in use has already reached the maximum permitted. */#define	DRM_DEVICE_LIMIT_REACHED  		105/* The proximity detection procedure could not determine that the DMR is near * the transmitter. */#define	DRM_UNABLE_TO_VERIFY_PROXIMITY  	106/* The DMR must be registered before it can execute the intended operation. */#define	DRM_MUST_REGISTER  			107/* The DMR must be revalidated before it can execute the intended operation. */#define	DRM_MUST_REVALIDATE  			108/* The DMR has responded to the proximity challenge message incorrectly. */#define	DRM_INVALID_PROXIMITY_RESPONSE  	109/* The session is no longer available. */#define	DRM_INVALID_SESSION  			110/* The transmitter cannot open the requested file. */#define	DRM_UNABLE_TO_OPEN_FILE  		111/* The request received by the transmitter is based on an unsupported protocol * version. */#define	DRM_UNSUPPORTED_PROTOCOL_VERSION  	112/* The format of the request is not valid. */#define	DRM_BAD_REQUEST  			113struct ms_upnp_extension_s;typedef struct ms_upnp_extension_s ms_upnp_extension;/**  * Operation used by the CARDEA lib to register a device.  * @param upnp_stack_data - private data from the ms_upnp_extension (given on *                          init, see new_ms_device) * @param message -  registration message to send * @param message_size - size of the registration message * @return < 0 on error */typedef RMint32 (*registration_start_op_t) (void * upnp_stack_data, RMascii *message, RMuint32 message_size);/**  * Operation used by the CARDEA lib to verify we have been validated by a device.  * @param upnp_stack_data - private data from the ms_upnp_extension (given on *                          init, see new_ms_device) * @return < 0 on error */typedef RMint32 (*validation_check_op_t) (void * upnp_stack_data);/** * Initialize internals * @param registration_start_op - operation used to start registration process, see above * @param validation_check_op - operation used to vefiry the device has been validated */void init_ms_upnp(registration_start_op_t registration_start_op,                  validation_check_op_t validation_check_op);/** * Creates a new MS UPnP server extension * @param name - A name for this device * @param upnp_stack_data - private data needed by the UPnP stack * @return void * - opaque pointer to the MS UPnP server extension */void * new_ms_device(RMascii *name, void *upnp_stack_data);/** * Destroy a MS UPnP server * @param ms_upnp - handle to MS extension */void destroy_ms_device(ms_upnp_extension * ms_upnp);/** * Get the status of the device with a MS server * @param ms_upnp - handle to MS extension */RMuint32 ms_device_status(ms_upnp_extension *ms_upnp);/** * Try to register the client to the given device * @param ms_upnp - MS UPnP server handle * @return < 0 on error */RMint32 register_ms_client(ms_upnp_extension *ms_upnp);/** * Get a license for a given URL, on the given device * @param ms_upnp - MS UPnP server * @param uri - URL to get * @param session_header - returns the session header for this URL, should not *                         be freed or modified. * @return 0 on success, < 0 on error */RMint32 get_ms_license(		ms_upnp_extension *ms_upnp,		RMascii *url, 		RMascii **session_header);/** * Callback for the UPnP stack when a registration response is received * @param ms_upnp - opaque ms_upnp handle * @param error - 0 on success * @param message - registration response message * @param message_size */void cardea_registration_event_handler(		void *ms_upnp_handle, 		int error, 		unsigned char *message, 		int message_size);/** * Callback for the UPnP stack when a validation event is received * @param ms_upnp - opaque ms_upnp handle * @param error - 0 on success * @param result - validation result */void cardea_validation_event_handler(		void *ms_upnp_handle, 		int error, 		int result);/** * Callback for the UPnP stack when am authorization event is received * @param ms_upnp - opaque ms_upnp handle * @param error - 0 on success * @param result - authorization result */void cardea_authorization_event_handler(		void *ms_upnp_handle, 		int error, 		int result);#endif /* __MS_UPNP_H__ */

⌨️ 快捷键说明

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