connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/DMHANDLE.java
branchRCL_2_4
changeset 1125 07b11b189a25
parent 1124 f68b7751b408
child 1126 9b97d8b6f3e0
--- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/pccsnative/DMHANDLE.java	Mon Mar 22 17:42:44 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-package com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.Pointer;
-import com.sun.jna.PointerType;
-
-public class DMHANDLE extends PointerType {
-	// Constant value representing an invalid HANDLE.
-    public static DMHANDLE INVALID_HANDLE_VALUE = new DMHANDLE(Pointer.createConstant(-1));
-	
-	private boolean immutable;
-    public DMHANDLE() { }
-    public DMHANDLE(Pointer p) { setPointer(p); immutable = true; }
-    /** Override to the appropriate object for INVALID_HANDLE_VALUE. */
-    public Object fromNative(Object nativeValue, FromNativeContext context) {
-        Object o = super.fromNative(nativeValue, context);
-        if (INVALID_HANDLE_VALUE.equals(o))
-            return INVALID_HANDLE_VALUE;
-        return o;
-    }
-    public void setPointer(Pointer p) {
-        if (immutable)
-            throw new UnsupportedOperationException("immutable reference"); //$NON-NLS-1$
-        super.setPointer(p);
-    }
-}