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-- |
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 |
|
942
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
19 |
import com.sun.jna.Pointer; |
868
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
20 |
import com.sun.jna.Structure; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
21 |
|
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 |
* This file was originally autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
24 |
* but then modified for Carbide. |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
25 |
*/ |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
26 |
public class CONAPI_MEDIA extends Structure { |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
27 |
/// Must be sizeof(CONAPI_MEDIA) |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
28 |
public int dwSize; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
29 |
/// Media type |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
30 |
public int dwMedia; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
31 |
/** |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
32 |
* Media name<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
33 |
* C type : WCHAR* |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
34 |
*/ |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
35 |
public com.sun.jna.ptr.ShortByReference pstrDescription; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
36 |
/// Media state. CONAPI_MEDIA_ACTIVE or CONAPI_MEDIA_NOT_ACTIVE |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
37 |
public int dwState; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
38 |
/// Media options |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
39 |
public int dwOptions; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
40 |
/// Media specific data |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
41 |
public int dwMediaData; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
42 |
/** |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
43 |
* Media ID string<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
44 |
* C type : WCHAR* |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
45 |
*/ |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
46 |
public com.sun.jna.ptr.ShortByReference pstrID; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
47 |
public CONAPI_MEDIA() { |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
48 |
super(); |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
49 |
} |
942
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
50 |
public CONAPI_MEDIA(Pointer p) { |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
51 |
super(p); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
52 |
} |
868
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 |
* @param dwSize Must be sizeof(CONAPI_MEDIA)<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
55 |
* @param dwMedia Media type<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
56 |
* @param pstrDescription Media name<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
57 |
* C type : WCHAR*<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
58 |
* @param dwState Media state. CONAPI_MEDIA_ACTIVE or CONAPI_MEDIA_NOT_ACTIVE<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
59 |
* @param dwOptions Media options<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
60 |
* @param dwMediaData Media specific data<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
61 |
* @param pstrID Media ID string<br> |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
62 |
* C type : WCHAR* |
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 |
public CONAPI_MEDIA(int dwSize, int dwMedia, com.sun.jna.ptr.ShortByReference pstrDescription, int dwState, int dwOptions, int dwMediaData, com.sun.jna.ptr.ShortByReference pstrID) { |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
65 |
super(); |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
66 |
this.dwSize = dwSize; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
67 |
this.dwMedia = dwMedia; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
68 |
this.pstrDescription = pstrDescription; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
69 |
this.dwState = dwState; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
70 |
this.dwOptions = dwOptions; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
71 |
this.dwMediaData = dwMediaData; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
72 |
this.pstrID = pstrID; |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
73 |
} |
942
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
74 |
protected ByReference newByReference() { |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
75 |
ByReference s = new ByReference(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
76 |
s.useMemory(getPointer()); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
77 |
write(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
78 |
s.read(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
79 |
return s; |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
80 |
} |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
81 |
protected ByValue newByValue() { |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
82 |
ByValue s = new ByValue(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
83 |
s.useMemory(getPointer()); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
84 |
write(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
85 |
s.read(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
86 |
return s; |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
87 |
} |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
88 |
protected CONAPI_MEDIA newInstance() { |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
89 |
CONAPI_MEDIA s = new CONAPI_MEDIA(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
90 |
s.useMemory(getPointer()); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
91 |
write(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
92 |
s.read(); |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
93 |
return s; |
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
94 |
} |
868
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
95 |
public static CONAPI_MEDIA[] newArray(int arrayLength) { |
942
2ed87b202d5c
PnP for switching USB personalities. Bug 10604.
Chad Peckham <chad.peckham@nokia.com>
parents:
868
diff
changeset
|
96 |
return (CONAPI_MEDIA[]) new CONAPI_MEDIA().toArray(arrayLength); |
868
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
97 |
} |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
98 |
public static class ByReference extends CONAPI_MEDIA implements com.sun.jna.Structure.ByReference {} |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
99 |
public static class ByValue extends CONAPI_MEDIA implements com.sun.jna.Structure.ByValue {} |
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
100 |
|
089762ea5b6d
move com.nokia.carbide.remoteConnections.discovery.pccs to carbidecpp repository
cawthron
parents:
diff
changeset
|
101 |
} |