svn-gvsig-desktop / trunk / libraries / libjni-gdal / src / ogrsfdriver_interfaz.cpp @ 1010
History | View | Annotate | Download (1.73 KB)
1 | 905 | igbrotru | /**********************************************************************
|
---|---|---|---|
2 | * $Id$
|
||
3 | *
|
||
4 | * Name: ogrsfdriver_interfaz.c
|
||
5 | * Project: JGDAL. Interface java to gdal (Frank Warmerdam).
|
||
6 | * Purpose:
|
||
7 | * Author: Nacho Brodin, brodin_ign@gva.es
|
||
8 | *
|
||
9 | **********************************************************************/
|
||
10 | /*Copyright (C) 2004 Nacho Brodin <brodin_ign@gva.es>
|
||
11 | |||
12 | This program is free software; you can redistribute it and/or
|
||
13 | modify it under the terms of the GNU General Public License
|
||
14 | as published by the Free Software Foundation; either version 2
|
||
15 | of the License, or (at your option) any later version.
|
||
16 | |||
17 | This program is distributed in the hope that it will be useful,
|
||
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
20 | GNU General Public License for more details.
|
||
21 | |||
22 | You should have received a copy of the GNU General Public License
|
||
23 | along with this program; if not, write to the Free Software
|
||
24 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||
25 | */
|
||
26 | |||
27 | |||
28 | #include <jni.h> |
||
29 | 920 | igbrotru | #include "es_gva_cit_jogr_OGRSFDriver.h" |
30 | #include "es_gva_cit_jogr_JNIBase.h" |
||
31 | 905 | igbrotru | #include "ogr_api.h" |
32 | #include "ogrsf_frmts.h" |
||
33 | |||
34 | /******************************************************************************/
|
||
35 | // getName
|
||
36 | /******************************************************************************/
|
||
37 | |||
38 | 920 | igbrotru | JNIEXPORT jstring JNICALL Java_es_gva_cit_jogr_OGRSFDriver_getNameNat |
39 | 905 | igbrotru | (JNIEnv *env, jobject obj, jlong cPtr){ |
40 | |||
41 | OGRSFDriver *drv = (OGRSFDriver *) 0 ;
|
||
42 | jstring nom_drv; |
||
43 | |||
44 | drv = *(OGRSFDriver **)&cPtr; |
||
45 | const char *name = drv->GetName(); |
||
46 | |||
47 | if(name!=NULL) |
||
48 | nom_drv = env->NewStringUTF(name); |
||
49 | else return NULL; |
||
50 | |||
51 | return nom_drv;
|
||
52 | } |
||
53 |