|
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: PIMItemImpl JNI wrapper. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include "com_nokia_mj_impl_pim_PIMItemImpl.h" |
|
22 #include "pimcommon.h" |
|
23 #include "pimbaseitem.h" |
|
24 #include "pimutils.h" |
|
25 #include "pimpanics.h" |
|
26 #include "logger.h" |
|
27 |
|
28 |
|
29 JNIEXPORT void |
|
30 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1dispose( |
|
31 JNIEnv* /*aJniEnv*/, |
|
32 jobject /*aPeer*/, |
|
33 jint aItemHandle) |
|
34 { |
|
35 JELOG2(EPim); |
|
36 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
37 delete item; |
|
38 } |
|
39 |
|
40 JNIEXPORT jint |
|
41 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1fieldDataType( |
|
42 JNIEnv* /*aJniEnv*/, |
|
43 jobject /*aPeer*/, |
|
44 jint aItemHandle, |
|
45 jint aField) |
|
46 { |
|
47 JELOG2(EPim); |
|
48 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
49 TPIMFieldDataType fieldDataType = item->fieldDataType(aField); |
|
50 return fieldDataType; |
|
51 } |
|
52 |
|
53 JNIEXPORT jint |
|
54 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1commit( |
|
55 JNIEnv* /*aJniEnv*/, |
|
56 jobject /*aPeer*/, |
|
57 jint aItemHandle) |
|
58 { |
|
59 JELOG2(EPim); |
|
60 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
61 int error = 0; |
|
62 try |
|
63 { |
|
64 item->commit(); |
|
65 } |
|
66 catch (int aError) |
|
67 { |
|
68 error = aError; |
|
69 } |
|
70 return error; |
|
71 } |
|
72 |
|
73 JNIEXPORT jboolean |
|
74 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1isModified( |
|
75 JNIEnv* /*aJniEnv*/, |
|
76 jobject /*aPeer*/, |
|
77 jint aItemHandle) |
|
78 { |
|
79 JELOG2(EPim); |
|
80 const pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
81 jboolean isModified = item->isModified(); |
|
82 return isModified; |
|
83 } |
|
84 |
|
85 JNIEXPORT jintArray |
|
86 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getFields( |
|
87 JNIEnv* aJniEnv, |
|
88 jobject /*aPeer*/, |
|
89 jint aItemHandle) |
|
90 { |
|
91 JELOG2(EPim); |
|
92 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
93 jintArray javaFields = item->callGetFields(aJniEnv); |
|
94 return javaFields; // NULL indicates error |
|
95 } |
|
96 |
|
97 JNIEXPORT jbyteArray |
|
98 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getBinary( |
|
99 JNIEnv* aJniEnv, |
|
100 jobject /*aPeer*/, |
|
101 jint aItemHandle, |
|
102 jint aField, |
|
103 jint aIndex, |
|
104 jintArray aError) |
|
105 { |
|
106 JELOG2(EPim); |
|
107 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
108 jbyteArray javaValue = item->callGetBinary(aField,aIndex,aJniEnv,aError); |
|
109 return javaValue; |
|
110 } |
|
111 |
|
112 JNIEXPORT jint |
|
113 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1addBinary( |
|
114 JNIEnv* aJniEnv, |
|
115 jobject /*aPeer*/, |
|
116 jint aItemHandle, |
|
117 jint aField, |
|
118 jint aAttributes, |
|
119 jbyteArray aValue, |
|
120 jint aOffset, |
|
121 jint aLength) |
|
122 { |
|
123 JELOG2(EPim); |
|
124 const int valueLength = aJniEnv->GetArrayLength(aValue); |
|
125 if (valueLength < (aOffset + aLength)) |
|
126 { |
|
127 aLength = valueLength - aOffset; |
|
128 } |
|
129 |
|
130 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
131 jbyte* elems = aJniEnv->GetByteArrayElements(aValue, NULL); |
|
132 int error = 0; |
|
133 try |
|
134 { |
|
135 item->callAddBinary(aField, |
|
136 aAttributes, |
|
137 reinterpret_cast< unsigned char*>(elems), |
|
138 aOffset, |
|
139 aLength); |
|
140 } |
|
141 catch (int aError) |
|
142 { |
|
143 error = aError; |
|
144 } |
|
145 aJniEnv->ReleaseByteArrayElements(aValue, elems, 0); |
|
146 return error; |
|
147 } |
|
148 |
|
149 JNIEXPORT jint |
|
150 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1setBinary( |
|
151 JNIEnv* aJniEnv, |
|
152 jobject /*aPeer*/, |
|
153 jint aItemHandle, |
|
154 jint aField, |
|
155 jint aIndex, |
|
156 jint aAttributes, |
|
157 jbyteArray aValue, |
|
158 jint aOffset, |
|
159 jint aLength) |
|
160 { |
|
161 JELOG2(EPim); |
|
162 // If length from offset goes beyond the array end, the length |
|
163 // argument must (as specified in PIM API) be interpreted as |
|
164 // "to the end of the array". |
|
165 const int valueLength = aJniEnv->GetArrayLength(aValue); |
|
166 if (valueLength < (aOffset + aLength)) |
|
167 { |
|
168 aLength = valueLength - aOffset; |
|
169 } |
|
170 |
|
171 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
172 jbyte* elems = aJniEnv->GetByteArrayElements(aValue, NULL); |
|
173 int error = 0; |
|
174 try |
|
175 { |
|
176 item->callSetBinary(aField, |
|
177 aIndex, |
|
178 aAttributes, |
|
179 reinterpret_cast< unsigned char*>(elems), |
|
180 aOffset, |
|
181 aLength); |
|
182 } |
|
183 catch (int aError) |
|
184 { |
|
185 error = aError; |
|
186 } |
|
187 aJniEnv->ReleaseByteArrayElements(aValue, elems, 0); |
|
188 return error; |
|
189 } |
|
190 |
|
191 JNIEXPORT jlong |
|
192 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getDate( |
|
193 JNIEnv* aJniEnv, |
|
194 jobject /*aPeer*/, |
|
195 jint aItemHandle, |
|
196 jint aField, |
|
197 jint aIndex, |
|
198 jintArray aError) |
|
199 { |
|
200 JELOG2(EPim); |
|
201 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
202 int error = 0; |
|
203 jlong retVal = 0; |
|
204 try |
|
205 { |
|
206 retVal = item->callGetDate(aField,aIndex); |
|
207 } |
|
208 catch (int aError) |
|
209 { |
|
210 error = aError; |
|
211 } |
|
212 SetJavaErrorCode(aJniEnv, aError, error); |
|
213 return retVal; |
|
214 } |
|
215 |
|
216 JNIEXPORT jint |
|
217 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1addDate( |
|
218 JNIEnv* /*aJniEnv*/, |
|
219 jobject /*aPeer*/, |
|
220 jint aItemHandle, |
|
221 jint aField, |
|
222 jint aAttributes, |
|
223 jlong aValue) |
|
224 { |
|
225 JELOG2(EPim); |
|
226 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
227 int error = 0; |
|
228 try |
|
229 { |
|
230 item->callAddDate(aField, aAttributes, aValue); |
|
231 } |
|
232 catch (int aError) |
|
233 { |
|
234 error = aError; |
|
235 } |
|
236 return error; |
|
237 } |
|
238 |
|
239 JNIEXPORT jint |
|
240 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1setDate( |
|
241 JNIEnv* /*aJniEnv*/, |
|
242 jobject /*aPeer*/, |
|
243 jint aItemHandle, |
|
244 jint aField, |
|
245 jint aIndex, |
|
246 jint aAttributes, |
|
247 jlong aValue) |
|
248 { |
|
249 JELOG2(EPim); |
|
250 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
251 int error = 0; |
|
252 try |
|
253 { |
|
254 item->callSetDate(aField, aIndex, aAttributes, aValue); |
|
255 } |
|
256 catch (int aError) |
|
257 { |
|
258 error = aError; |
|
259 } |
|
260 return error; |
|
261 } |
|
262 |
|
263 JNIEXPORT jint |
|
264 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getInt( |
|
265 JNIEnv* aJniEnv, |
|
266 jobject /*aPeer*/, |
|
267 jint aItemHandle, |
|
268 jint aField, |
|
269 jint aIndex, |
|
270 jintArray aError) |
|
271 { |
|
272 |
|
273 JELOG2(EPim); |
|
274 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
275 jint value = 0; |
|
276 jint error = 0; |
|
277 try |
|
278 { |
|
279 value = item->getInt(aField,aIndex); |
|
280 } |
|
281 catch (int aError) |
|
282 { |
|
283 error = aError; |
|
284 } |
|
285 |
|
286 SetJavaErrorCode(aJniEnv, aError, error); |
|
287 return value; |
|
288 } |
|
289 |
|
290 JNIEXPORT jint |
|
291 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1addInt( |
|
292 JNIEnv* /*aJniEnv*/, |
|
293 jobject /*aPeer*/, |
|
294 jint aItemHandle, |
|
295 jint aField, |
|
296 jint aAttributes, |
|
297 jint aValue) |
|
298 { |
|
299 JELOG2(EPim); |
|
300 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
301 int error = 0; |
|
302 try |
|
303 { |
|
304 item->addInt(aField, aAttributes, aValue); |
|
305 } |
|
306 catch (int aError) |
|
307 { |
|
308 error = aError; |
|
309 } |
|
310 return error; |
|
311 } |
|
312 |
|
313 JNIEXPORT jint |
|
314 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1setInt( |
|
315 JNIEnv* /*aJniEnv*/, |
|
316 jobject /*aPeer*/, |
|
317 jint aItemHandle, |
|
318 jint aField, |
|
319 jint aIndex, |
|
320 jint aAttributes, |
|
321 jint aValue) |
|
322 { |
|
323 JELOG2(EPim); |
|
324 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
325 int error = 0; |
|
326 try |
|
327 { |
|
328 item->setInt(aField, aIndex, aAttributes, aValue); |
|
329 } |
|
330 catch (int aError) |
|
331 { |
|
332 error = aError; |
|
333 } |
|
334 return error; |
|
335 } |
|
336 |
|
337 JNIEXPORT jstring |
|
338 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getString( |
|
339 JNIEnv* aJniEnv, |
|
340 jobject /*aPeer*/, |
|
341 jint aItemHandle, |
|
342 jint aField, |
|
343 jint aIndex, |
|
344 jintArray aError) |
|
345 { |
|
346 JELOG2(EPim); |
|
347 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
348 |
|
349 jstring javaValue = item->callGetString( |
|
350 aField, |
|
351 aIndex, |
|
352 aJniEnv, |
|
353 aError); |
|
354 |
|
355 // Ownership of the string is not transferred. |
|
356 return javaValue; |
|
357 } |
|
358 |
|
359 JNIEXPORT jint |
|
360 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1addString( |
|
361 JNIEnv* aJniEnv, |
|
362 jobject /*aPeer*/, |
|
363 jint aItemHandle, |
|
364 jint aField, |
|
365 jint aAttributes, |
|
366 jstring aValue) |
|
367 { |
|
368 JELOG2(EPim); |
|
369 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
370 int error = 0; |
|
371 try |
|
372 { |
|
373 item->callAddString(aField,aAttributes,aValue,aJniEnv); |
|
374 } |
|
375 catch (int aError) |
|
376 { |
|
377 error = aError; |
|
378 } |
|
379 return error; |
|
380 } |
|
381 |
|
382 JNIEXPORT jint |
|
383 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1setString( |
|
384 JNIEnv* aJniEnv, |
|
385 jobject /*aPeer*/, |
|
386 jint aItemHandle, |
|
387 jint aField, |
|
388 jint aIndex, |
|
389 jint aAttributes, |
|
390 jstring aValue) |
|
391 { |
|
392 JELOG2(EPim); |
|
393 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
394 int error = 0; |
|
395 try |
|
396 { |
|
397 item->callSetString(aField, aIndex, aAttributes, aValue, aJniEnv); |
|
398 } |
|
399 catch (int aError) |
|
400 { |
|
401 error = aError; |
|
402 } |
|
403 return error; |
|
404 } |
|
405 |
|
406 JNIEXPORT jboolean |
|
407 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getBoolean( |
|
408 JNIEnv* aJniEnv, |
|
409 jobject /*aPeer*/, |
|
410 jint aItemHandle, |
|
411 jint aField, |
|
412 jint aIndex, |
|
413 jintArray aError) |
|
414 { |
|
415 JELOG2(EPim); |
|
416 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
417 int error = 0; |
|
418 jboolean value = false; |
|
419 try |
|
420 { |
|
421 value = item->callGetBoolean(aField, aIndex); |
|
422 } |
|
423 catch (int aError) |
|
424 { |
|
425 error = aError; |
|
426 } |
|
427 SetJavaErrorCode(aJniEnv, aError, error); |
|
428 return value; |
|
429 } |
|
430 |
|
431 JNIEXPORT jint |
|
432 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1addBoolean( |
|
433 JNIEnv* /*aJniEnv*/, |
|
434 jobject /*aPeer*/, |
|
435 jint aItemHandle, |
|
436 jint aField, |
|
437 jint aAttributes, |
|
438 jboolean aValue) |
|
439 { |
|
440 JELOG2(EPim); |
|
441 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
442 |
|
443 int error = 0; |
|
444 try |
|
445 { |
|
446 item->callAddBoolean(aField, aAttributes, aValue); |
|
447 } |
|
448 catch (int aError) |
|
449 { |
|
450 error = aError; |
|
451 } |
|
452 return error; |
|
453 } |
|
454 |
|
455 JNIEXPORT jint |
|
456 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1setBoolean( |
|
457 JNIEnv* /*aJniEnv*/, |
|
458 jobject /*aPeer*/, |
|
459 jint aItemHandle, |
|
460 jint aField, |
|
461 jint aIndex, |
|
462 jint aAttributes, |
|
463 jboolean aValue) |
|
464 { |
|
465 JELOG2(EPim); |
|
466 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
467 |
|
468 int error = 0; |
|
469 try |
|
470 { |
|
471 item->callSetBoolean(aField, aIndex, aAttributes, aValue); |
|
472 } |
|
473 catch (int aError) |
|
474 { |
|
475 error = aError; |
|
476 } |
|
477 return error; |
|
478 } |
|
479 |
|
480 JNIEXPORT jobjectArray |
|
481 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getStringArray( |
|
482 JNIEnv* aJniEnv, |
|
483 jobject /*aPeer*/, |
|
484 jint aItemHandle, |
|
485 jint aField, |
|
486 jint aIndex, |
|
487 jintArray aError) |
|
488 { |
|
489 JELOG2(EPim); |
|
490 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
491 |
|
492 jobjectArray javaStringArray = item->callGetStringArray( |
|
493 aField, |
|
494 aIndex, |
|
495 aJniEnv, |
|
496 aError); |
|
497 // Ownership of the string array is not transferred. |
|
498 return javaStringArray; |
|
499 } |
|
500 |
|
501 JNIEXPORT jint |
|
502 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1addStringArray( |
|
503 JNIEnv* aJniEnv, |
|
504 jobject /*aPeer*/, |
|
505 jint aItemHandle, |
|
506 jint aField, |
|
507 jint aAttributes, |
|
508 jobjectArray aValue) |
|
509 { |
|
510 JELOG2(EPim); |
|
511 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
512 int error = 0; |
|
513 try |
|
514 { |
|
515 item->callAddStringArray( |
|
516 aJniEnv, |
|
517 aField, |
|
518 aAttributes, |
|
519 aValue); |
|
520 } |
|
521 catch (int aError) |
|
522 { |
|
523 error = aError; |
|
524 } |
|
525 return error; |
|
526 } |
|
527 |
|
528 JNIEXPORT jint |
|
529 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1setStringArray( |
|
530 JNIEnv* aJniEnv, |
|
531 jobject /*aPeer*/, |
|
532 jint aItemHandle, |
|
533 jint aField, |
|
534 jint aIndex, |
|
535 jint aAttributes, |
|
536 jobjectArray aValue) |
|
537 { |
|
538 JELOG2(EPim); |
|
539 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
540 |
|
541 int error = 0; |
|
542 try |
|
543 { |
|
544 item->callSetStringArray( |
|
545 aJniEnv, |
|
546 aField, |
|
547 aIndex, |
|
548 aAttributes, |
|
549 aValue); |
|
550 } |
|
551 catch (int aError) |
|
552 { |
|
553 error = aError; |
|
554 } |
|
555 |
|
556 return error; |
|
557 } |
|
558 |
|
559 JNIEXPORT jint |
|
560 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1countValues( |
|
561 JNIEnv* /*aJniEnv*/, |
|
562 jobject /*aPeer*/, |
|
563 jint aItemHandle, |
|
564 jint aField) |
|
565 { |
|
566 JELOG2(EPim); |
|
567 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
568 int retValue = 0; |
|
569 try |
|
570 { |
|
571 retValue = item->callCountValues(aField); |
|
572 } |
|
573 catch (int aError) |
|
574 { |
|
575 retValue = aError; |
|
576 } |
|
577 return retValue; |
|
578 } |
|
579 |
|
580 JNIEXPORT jint |
|
581 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1removeValue( |
|
582 JNIEnv* /*aJniEnv*/, |
|
583 jobject /*aPeer*/, |
|
584 jint aItemHandle, |
|
585 jint aField, |
|
586 jint aIndex) |
|
587 { |
|
588 JELOG2(EPim); |
|
589 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
590 int error = 0; |
|
591 try |
|
592 { |
|
593 item->removeValue(aField,aIndex); |
|
594 } |
|
595 catch (int aError) |
|
596 { |
|
597 error = aError; |
|
598 } |
|
599 return error; |
|
600 } |
|
601 |
|
602 JNIEXPORT jint |
|
603 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getAttributes( |
|
604 JNIEnv* aJniEnv, |
|
605 jobject /*aPeer*/, |
|
606 jint aItemHandle, |
|
607 jint aField, |
|
608 jint aIndex, |
|
609 jintArray aError) |
|
610 { |
|
611 JELOG2(EPim); |
|
612 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
613 TPIMAttribute attributes = KPIMAttrNone; |
|
614 |
|
615 int error = 0; |
|
616 try |
|
617 { |
|
618 attributes = item->getAttributes(aField,aIndex); |
|
619 } |
|
620 catch (int aError) |
|
621 { |
|
622 error = aError; |
|
623 } |
|
624 SetJavaErrorCode(aJniEnv, aError, error); |
|
625 return attributes; |
|
626 } |
|
627 |
|
628 JNIEXPORT jint |
|
629 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1addToCategory( |
|
630 JNIEnv* aJniEnv, |
|
631 jobject /*aPeer*/, |
|
632 jint aItemHandle, |
|
633 jstring aCategory) |
|
634 { |
|
635 JELOG2(EPim); |
|
636 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
637 int error = 0; |
|
638 try |
|
639 { |
|
640 item->callAddToCategory(aCategory,aJniEnv); |
|
641 } |
|
642 catch (int aError) |
|
643 { |
|
644 error = aError; |
|
645 } |
|
646 return error; |
|
647 } |
|
648 |
|
649 JNIEXPORT void |
|
650 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1removeFromCategory( |
|
651 JNIEnv* aJniEnv, |
|
652 jobject /*aPeer*/, |
|
653 jint aItemHandle, |
|
654 jstring aCategory) |
|
655 { |
|
656 JELOG2(EPim); |
|
657 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
658 item->callRemoveFromCategory(aCategory,aJniEnv); |
|
659 } |
|
660 |
|
661 JNIEXPORT jobjectArray |
|
662 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1getCategories( |
|
663 JNIEnv* aJniEnv, |
|
664 jobject /*aPeer*/, |
|
665 jint aItemHandle) |
|
666 { |
|
667 JELOG2(EPim); |
|
668 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
669 jobjectArray javaCategories =item->callGetCategories(aJniEnv); |
|
670 return javaCategories; |
|
671 } |
|
672 |
|
673 JNIEXPORT jint |
|
674 JNICALL Java_com_nokia_mj_impl_pim_PIMItemImpl__1maxCategories( |
|
675 JNIEnv* /*aJniEnv*/, |
|
676 jobject /*aPeer*/, |
|
677 jint aItemHandle) |
|
678 { |
|
679 JELOG2(EPim); |
|
680 pimbaseitem* item = reinterpret_cast< pimbaseitem *>(aItemHandle); |
|
681 int maxCategories = item->maxCategories(); |
|
682 return maxCategories; |
|
683 } |
|
684 |
|
685 // End of File |