javacommons/utils/inc.s60/jstringutils.h
changeset 21 2a9601315dfc
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef JSTRINGUTILS_H
       
    19 #define JSTRINGUTILS_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <jni.h>
       
    23 
       
    24 #include <badesca.h>
       
    25 #include "javaosheaders.h"
       
    26 
       
    27 
       
    28 class JStringUtils : public TPtrC16
       
    29 {
       
    30 public:
       
    31     OS_IMPORT JStringUtils(JNIEnv& aJni, jstring aString);
       
    32     OS_IMPORT  ~JStringUtils();
       
    33 
       
    34 private:
       
    35     // Prevent accidental copying because of the shared underlying Java
       
    36     // string
       
    37     OS_IMPORT JStringUtils(const JStringUtils&);
       
    38     OS_IMPORT JStringUtils& operator=(const JStringUtils&);
       
    39 
       
    40 private:
       
    41     JNIEnv& iJni;
       
    42     jstring iString;
       
    43 };
       
    44 
       
    45 #endif // JSTRINGUTILS_H