connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/MCAPIDefinitions.java
author Chad Peckham <chad.peckham@nokia.com>
Thu, 11 Feb 2010 16:12:28 -0600
changeset 942 2ed87b202d5c
parent 868 089762ea5b6d
permissions -rw-r--r--
PnP for switching USB personalities. Bug 10604.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
868
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     1
/*
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     3
* All rights reserved.
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     4
* This component and the accompanying materials are made available
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     6
* which accompanies this distribution, and is available
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     8
*
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
     9
* Initial Contributors:
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    11
*
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    12
* Contributors:
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    13
*
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    14
* Description: 
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    15
*
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    16
*/
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    17
package com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    18
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    19
public class MCAPIDefinitions {
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    20
	//=========================================================
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    21
	// Media Control API versions 
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    22
	//
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    23
	public static final int  MCAPI_VERSION_30		=30;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    24
	public static final int  MCAPI_VERSION_31		=31;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    25
	public static final int  MCAPI_VERSION_32		=32;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    26
	//=========================================================
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    27
 	// ----------------------------------------------------
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    28
	// Media types used in CONAPI_MEDIA
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    29
	//
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    30
	public static final int CONAPI_MEDIA_ALL			= 0x01;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    31
	public static final int CONAPI_MEDIA_IRDA			= 0x02;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    32
	public static final int CONAPI_MEDIA_SERIAL			= 0x04;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    33
	public static final int CONAPI_MEDIA_BLUETOOTH		= 0x08;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    34
	public static final int CONAPI_MEDIA_USB			= 0x10;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    35
	// ----------------------------------------------------
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    36
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    37
 	// ----------------------------------------------------
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    38
	// Media sub types used in CONAPI_MEDIA_INFO
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    39
	//
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    40
		// Infrared media
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    41
	public static final int API_MEDIA_TYPE_INFRARED		= 0x00000002;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    42
		// Serial media
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    43
	public static final int API_MEDIA_TYPE_SERIAL		= 0x00000004;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    44
		// Bluetooth media
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    45
	public static final int	API_MEDIA_TYPE_BLUETOOTH	= 0x00000008;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    46
	public static final int	API_MEDIA_TYPE_BT_MS		= 0x00010008;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    47
	public static final int	API_MEDIA_TYPE_BT_BC		= 0x00020008;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    48
	public static final int	API_MEDIA_TYPE_BT_TO		= 0x00030008;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    49
	public static final int	API_MEDIA_TYPE_BT_IVT		= 0x00040008;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    50
		// USB media
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    51
	public static final int	API_MEDIA_TYPE_USB			= 0x00000010;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    52
 	// ----------------------------------------------------
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    53
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    54
 	// ----------------------------------------------------
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    55
	// Media specific parameters
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    56
	//
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    57
	public static final int  CONAPI_MEDIA_ACTIVE 			=0x00000001;	// Media is active.
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    58
	public static final int  CONAPI_MEDIA_NOT_ACTIVE 		=0x00000002;	// Media is not active.
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    59
	public static final int  CONAPI_MEDIA_FUNCTIONAL		=0x00000004;	// Media is active and functional.
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    60
	public static final int  CONAPI_MEDIA_NOT_FUNCTIONAL	=0x00000008;	// Media is active but not functional.
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    61
	public static final int  CONAPI_MEDIA_IC_SUPPORTED 		=0x00000010;	// Media is supporting incoming connections. 
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    62
	public static final int  CONAPI_MEDIA_IC_NOT_SUPPORTED	=0x00000020;	// Media is not supporting incoming connections.
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    63
 	// ----------------------------------------------------
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    64
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    65
 	// ----------------------------------------------------
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    66
	// Macros. Use these to check values in the CONAPI_MEDIA structure.
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    67
	//
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    68
//		#define	CONAPI_GET_MEDIA_TYPE(dwMedia)			(0x000000FF & dwMedia)
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    69
	public static int CONAPI_GET_MEDIA_TYPE(int dwMedia) {
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    70
		return (0x000000FF & dwMedia);
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    71
	}
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    72
//		#define	CONAPI_IS_MEDIA_ACTIVE(dwState)			(0x00000001 & dwState)
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    73
	public static boolean CONAPI_IS_MEDIA_ACTIVE(int dwState) {
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    74
		return (0x00000001 & dwState) > 0;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    75
	}
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    76
//		#define	CONAPI_IS_MEDIA_UNACTIVE(dwState)		((0x00000002 & dwState)>>1)
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    77
	public static boolean CONAPI_IS_MEDIA_UNACTIVE(int dwState) {
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    78
		return ((0x00000002 & dwState)>>1) > 0;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    79
	}
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    80
//		#define	CONAPI_IS_MEDIA_FUNCTIONAL(dwState)		((0x00000004 & dwState)>>2)
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    81
	public static boolean CONAPI_IS_MEDIA_FUNCTIONAL(int dwState) {
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    82
		return ((0x00000004 & dwState)>>2) > 0;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    83
	}
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    84
//		#define	CONAPI_IS_MEDIA_NOT_FUNCTIONAL(dwState)	((0x00000008 & dwState)>>3)
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    85
	public static boolean CONAPI_IS_MEDIA_NOT_FUNCTIONAL(int dwState) {
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    86
		return ((0x00000008 & dwState)>>3) > 0;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    87
	}
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    88
//		#define	CONAPI_IS_IC_SUPPORTED(dwOptions)		((0x00000010 & dwOptions)>>4)
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    89
	public static boolean CONAPI_IS_IC_SUPPORTED(int dwOptions) {
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    90
		return ((0x00000010 & dwOptions)>>4) > 0;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    91
	}
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    92
//		#define	CONAPI_IS_IC_UNSUPPORTED(dwOptions)		((0x00000020 & dwOptions)>>5)
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    93
	public static boolean CONAPI_IS_IC_UNSUPPORTED(int dwOptions) {
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    94
		return ((0x00000020 & dwOptions)>>5) > 0;
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    95
	}
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    96
 	// ----------------------------------------------------
089762ea5b6d move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff changeset
    97
}