javacommons/gcfprotocols/file/src.linux/filesystemutilsjni.cpp
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 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:  JNI Layer corresponding to FileSystemUtils
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #include <string>
       
    20 #include <stdlib.h>
       
    21 
       
    22 #include "javajniutils.h"
       
    23 #include "javacommonutils.h"
       
    24 
       
    25 #include "com_nokia_mj_impl_file_FileSystemUtils.h"
       
    26 
       
    27 /*
       
    28  * Class:     com_nokia_mj_impl_file_FileSystemUtils
       
    29  * Method:    _listRoots
       
    30  * Signature: ()Ljava/lang/String;
       
    31  */
       
    32 JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_file_FileSystemUtils__1listRoots
       
    33 (JNIEnv *aJni, jclass)
       
    34 {
       
    35     std::wstring propVal = java::util::JavaCommonUtils::utf8ToWstring(getenv("HOME"));
       
    36     return java::util::JniUtils::wstringToJstring(aJni, propVal);
       
    37 }