Add DRAFT stubs for Vehicle plugin
[profile/ivi/wrt-plugins-tizen.git] / src / standards / Tizen / Contact / JSContactAddressTypeArray.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * @file        JSContactAddressTypeArray.cpp
19  * @author      Kisub Song (kisubs.song@samsung.com)
20  * @version     0.1
21  * @brief
22  */
23
24 #include <algorithm>
25 #include <dpl/log/log.h>
26 #include <CommonsJavaScript/Converter.h>
27 #include <CommonsJavaScript/ScopedJSStringRef.h>
28 #include <Tizen/Common/JSTizenExceptionFactory.h>
29 #include <Tizen/Common/JSTizenException.h>
30 #include "ContactConverter.h"
31 #include "JSContactAddressTypeArray.h"
32
33 #define FUNCTION_CONCAT "concat"
34 #define FUNCTION_JOIN "join"
35 #define FUNCTION_POP "pop"
36 #define FUNCTION_PUSH "push"
37 #define FUNCTION_REVERSE "reverse"
38 #define FUNCTION_SHIFT "shift"
39 #define FUNCTION_SLICE "slice"
40 #define FUNCTION_SORT "sort"
41 #define FUNCTION_SPLICE "splice"
42 #define FUNCTION_TOSTRING "toString"
43 #define FUNCTION_UNSHIFT "unshift"
44 #define FUNCTION_VALUEOF "valueOf"
45 #define ARRAY "Array"
46 #define ATTRIBUTE_LENGTH "length"
47
48 namespace TizenApis {
49 namespace Tizen1_0 {
50 namespace Contact {
51
52 using namespace TizenApis::Commons;
53 using namespace TizenApis::Api::Contact;
54 using namespace WrtDeviceApis::CommonsJavaScript;
55
56 JSClassDefinition JSContactAddressTypeArray::m_classInfo = {
57         0,
58         kJSClassAttributeNone,
59         ARRAY,
60         0,
61         m_property,
62         m_function,
63         initialize,
64         finalize,
65         hasProperty,
66         getProperty,
67         setProperty,
68         NULL, //deleteProperty,
69         getPropertyNames,
70         NULL, //callAsFunction,
71         NULL, //callAsConstructor,
72         NULL, //hasInstance,
73         NULL, //convertToType,
74 };
75
76 JSStaticValue JSContactAddressTypeArray::m_property[] = {
77         { ATTRIBUTE_LENGTH, getLength, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
78         { 0, 0, 0, 0 }
79 };
80
81 JSStaticFunction JSContactAddressTypeArray::m_function[] = {
82         { FUNCTION_CONCAT, concat, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
83         { FUNCTION_JOIN, join, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
84         { FUNCTION_POP, pop, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
85         { FUNCTION_PUSH, push, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
86         { FUNCTION_REVERSE, reverse, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
87         { FUNCTION_SHIFT, shift, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
88         { FUNCTION_SLICE, slice, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
89         { FUNCTION_SORT, sort, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
90         { FUNCTION_SPLICE, splice, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
91         { FUNCTION_TOSTRING, toString, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
92         { FUNCTION_UNSHIFT, unshift, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
93         { FUNCTION_VALUEOF, valueOf, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete },
94         { 0, 0, 0 }
95 };
96
97 JSClassRef JSContactAddressTypeArray::m_jsClassRef = JSClassCreate(
98                 JSContactAddressTypeArray::getClassInfo());
99
100 JSValueRef JSContactAddressTypeArray::getLength(JSContextRef context,
101                 JSObjectRef object,
102                 JSStringRef propertyName,
103                 JSValueRef* exception)
104 {
105         Try
106         {
107                 JSContactAddressTypeArrayPriv* priv =
108                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(object));
109                 if (!priv) {
110                         Throw(WrtDeviceApis::Commons::NullPointerException);
111                 }
112                 ContactAddressTypeArrayPtr typeArray = priv->getObject();
113                 if (typeArray) {
114                         WrtDeviceApis::CommonsJavaScript::BasicConverter converter =
115                                         WrtDeviceApis::CommonsJavaScript::BasicConverterFactory::getConverter(context);
116                         return converter->toJSValueRef(typeArray->size());
117                 }
118         }
119         Catch(WrtDeviceApis::Commons::Exception)
120         {
121                 LogError("invalid conversion");
122         }
123         return JSValueMakeUndefined(context);
124 }
125
126 JSObjectRef JSContactAddressTypeArray::createArray(JSContextRef context,
127                 const ContactAddressTypeArrayPtr &typeArray)
128 {
129         JSContactAddressTypeArrayPriv *priv = new JSContactAddressTypeArrayPriv(context, typeArray);
130         return JSObjectMake(context, getClassRef(), priv);
131 }
132
133 const JSClassDefinition* JSContactAddressTypeArray::getClassInfo()
134 {
135         return &(m_classInfo);
136 }
137
138 JSClassRef JSContactAddressTypeArray::getClassRef()
139 {
140         if (!m_jsClassRef) {
141                 m_jsClassRef = JSClassCreate(&m_classInfo);
142         }
143         return m_jsClassRef;
144 }
145
146 bool JSContactAddressTypeArray::isObjectOfClass(JSContextRef context, JSValueRef value)
147 {
148         return JSValueIsObjectOfClass(context, value, getClassRef());
149 }
150
151 ContactAddressTypeArrayPtr JSContactAddressTypeArray::getContactAddressTypeArray(JSContextRef context, JSValueRef value)
152 {
153         if (!isObjectOfClass(context, value)) {
154                 Throw(WrtDeviceApis::Commons::InvalidArgumentException);
155         }
156         JSObjectRef object = JSValueToObject(context, value, NULL);
157         if (!object) {
158                 Throw(WrtDeviceApis::Commons::InvalidArgumentException);
159         }
160         JSContactAddressTypeArrayPriv *priv = static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(object));
161         if (!priv) {
162                 Throw(WrtDeviceApis::Commons::NullPointerException);
163         }
164         return priv->getObject();
165 }
166
167 void JSContactAddressTypeArray::initialize(JSContextRef context,
168                 JSObjectRef object)
169 {
170 }
171
172 void JSContactAddressTypeArray::finalize(JSObjectRef object)
173 {
174         JSContactAddressTypeArrayPriv* priv =
175                 static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(object));
176         delete priv;
177         JSObjectSetPrivate(object, NULL);
178 }
179
180 bool JSContactAddressTypeArray::hasProperty(JSContextRef context,
181                 JSObjectRef object,
182                 JSStringRef propertyName)
183 {
184         WrtDeviceApis::CommonsJavaScript::BasicConverter converter =
185                         WrtDeviceApis::CommonsJavaScript::BasicConverterFactory::getConverter(context);
186         Try
187         {
188                 size_t index = converter->toSizeT(propertyName);
189                 JSContactAddressTypeArrayPriv* priv =
190                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(object));
191                 if (!priv) {
192                         Throw(WrtDeviceApis::Commons::NullPointerException);
193                 }
194                 ContactAddressTypeArrayPtr typeArray = priv->getObject();
195                 if (index < typeArray->size()) {
196                         return true;
197                 }
198         }
199         Catch(WrtDeviceApis::Commons::Exception)
200         {
201                 //not reporting error is intended
202         }
203         return false;
204 }
205
206 JSValueRef JSContactAddressTypeArray::getProperty(JSContextRef context,
207                 JSObjectRef object,
208                 JSStringRef propertyName,
209                 JSValueRef* exception)
210 {
211         ContactConverterFactory::ConverterType converter =
212                                         ContactConverterFactory::getConverter(context);
213         Try
214         {
215                 size_t index = converter->toSizeT(propertyName);
216                 JSContactAddressTypeArrayPriv* priv =
217                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(object));
218                 if (!priv) {
219                         Throw(WrtDeviceApis::Commons::NullPointerException);
220                 }
221                 ContactAddressTypeArrayPtr typeArray = priv->getObject();
222                 if (index < typeArray->size()) {
223                         std::string result = converter->toContactAddressTypeStr(typeArray->at(index));
224                         if (!result.empty()) {
225                                 return converter->toJSValueRef(result);
226                         }
227                 }
228         }
229         Catch(WrtDeviceApis::Commons::Exception)
230         {
231                 LogError("invalid property");
232         }
233         return JSValueMakeUndefined(context);
234 }
235
236 bool JSContactAddressTypeArray::setProperty(JSContextRef context,
237                 JSObjectRef object,
238                 JSStringRef propertyName,
239                 JSValueRef value,
240                 JSValueRef* exception)
241 {
242         ContactConverterFactory::ConverterType converter =
243                                         ContactConverterFactory::getConverter(context);
244    Try
245         {
246                 size_t index = converter->toSizeT(propertyName);
247                 std::string str;
248                 if (!JSValueIsUndefined(context, value)) {
249                         str = converter->toString(value);
250                 }
251                 JSContactAddressTypeArrayPriv* priv =
252                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(object));
253                 if (!priv) {
254                         Throw(WrtDeviceApis::Commons::NullPointerException);
255                 }
256                 ContactAddressTypeArrayPtr typeArray = priv->getObject();
257                 if (!typeArray) {
258                         Throw(WrtDeviceApis::Commons::NullPointerException);
259                 }
260                 if (typeArray->size() <= index) {
261                         typeArray->resize(index + 1);
262                 }
263                 (*typeArray)[index] = converter->toContactAddressType(str);
264                 return true;
265         }
266         Catch(WrtDeviceApis::Commons::Exception)
267         {
268                 LogError("error occured");
269                 JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
270         }
271         return false;
272 }
273
274 void JSContactAddressTypeArray::getPropertyNames(JSContextRef context,
275                 JSObjectRef object,
276                 JSPropertyNameAccumulatorRef propertyNames)
277 {
278         ContactConverterFactory::ConverterType converter =
279                         ContactConverterFactory::getConverter(context);
280         Try
281         {
282                 JSContactAddressTypeArrayPriv* priv =
283                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(object));
284                 if (!priv) {
285                         Throw(WrtDeviceApis::Commons::NullPointerException);
286                 }
287                 ContactAddressTypeArrayPtr addressTypes = priv->getObject();
288
289                 int count = addressTypes->size();
290
291                 for(int i=0; i < count; i++)
292                 {
293                         ScopedJSStringRef name(converter->toJSStringRef(converter->toString(i)));
294                         JSPropertyNameAccumulatorAddName(propertyNames, name.get());
295                 }
296         }
297         Catch(WrtDeviceApis::Commons::Exception)
298         {
299                 LogError("invalid property");
300         }
301 }
302
303 JSValueRef JSContactAddressTypeArray::concat(JSContextRef context,
304                 JSObjectRef function,
305                 JSObjectRef thisObject,
306                 size_t argumentCount,
307                 const JSValueRef arguments[],
308                 JSValueRef* exception)
309 {
310         Try
311         {
312                 ContactAddressTypeArrayPtr typeArray = ContactAddressTypeArrayPtr(new ContactAddressTypeArray());
313                 JSContactAddressTypeArrayPriv *newPrivateObject = new JSContactAddressTypeArrayPriv(
314                                 context,
315                                 typeArray);
316                 JSValueRef result = JSObjectMake(context,
317                                                                                  getClassRef(), newPrivateObject);
318
319                 //copy current typeArray
320                 JSContactAddressTypeArrayPriv* priv =
321                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(thisObject));
322                 ContactAddressTypeArrayPtr currentTypes = priv->getObject();
323                 for (size_t i = 0; i < currentTypes->size(); ++i) {
324                         typeArray->push_back(currentTypes->at(i));
325                 }
326
327                 //copy submitted arrays
328                 ContactConverterFactory::ConverterType converter =
329                                                 ContactConverterFactory::getConverter(context);
330                 for (size_t i = 0; i < argumentCount; ++i) {
331                         if (!JSIsArrayValue(context, arguments[i])) {
332                                 Throw(WrtDeviceApis::Commons::ConversionException);
333                         }
334                         // process array of types
335                         JSObjectRef arrayObj = converter->toJSObjectRef(arguments[i]);
336                         unsigned int len = JSGetArrayLength(context, arrayObj);
337                         for (unsigned int e = 0; e < len; ++e) {
338                                 JSValueRef att = JSGetArrayElement(context, arrayObj, e);
339                                 typeArray->push_back(converter->toContactAddressType(att));
340                         }
341                 }
342                 return result;
343         }
344         Catch(WrtDeviceApis::Commons::Exception)
345         {
346                 LogError("error occured");
347         }
348         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
349 }
350
351 JSValueRef JSContactAddressTypeArray::join(JSContextRef context,
352                 JSObjectRef function,
353                 JSObjectRef thisObject,
354                 size_t argumentCount,
355                 const JSValueRef arguments[],
356                 JSValueRef* exception)
357 {
358         Try
359         {
360                 std::string result;
361                 std::string separator(",");
362                 WrtDeviceApis::CommonsJavaScript::BasicConverter converter =
363                                 WrtDeviceApis::CommonsJavaScript::BasicConverterFactory::getConverter(context);
364                 JSContactAddressTypeArrayPriv* priv =
365                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(thisObject));
366                 ContactAddressTypeArrayPtr currentTypes = priv->getObject();
367                 if (argumentCount > 0 && JSValueIsString(context, arguments[0])) {
368                         separator = converter->toString(arguments[0]);
369                 }
370                 for (size_t i = 0; i < currentTypes->size(); ++i) {
371                         if (i != 0) {
372                                 result += separator;
373                         }
374                         result += currentTypes->at(i);
375                 }
376                 return converter->toJSValueRef(result);
377         }
378         Catch(WrtDeviceApis::Commons::Exception)
379         {
380                 LogError("error occured");
381         }
382         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
383 }
384
385 JSValueRef JSContactAddressTypeArray::pop(JSContextRef context,
386                 JSObjectRef function,
387                 JSObjectRef thisObject,
388                 size_t argumentCount,
389                 const JSValueRef arguments[],
390                 JSValueRef* exception)
391 {
392         Try
393         {
394                 ContactConverterFactory::ConverterType converter =
395                                                 ContactConverterFactory::getConverter(context);
396                 JSContactAddressTypeArrayPriv* priv =
397                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(thisObject));
398                 ContactAddressTypeArrayPtr currentTypes = priv->getObject();
399                 if (currentTypes->size() > 0) {
400                         std::string result = converter->toContactAddressTypeStr(currentTypes->at(currentTypes->size()-1));
401                         currentTypes->pop_back();
402                         return converter->toJSValueRef(result);
403                 }
404         }
405         Catch(WrtDeviceApis::Commons::Exception)
406         {
407                 LogError("error occured");
408         }
409         return JSValueMakeUndefined(context);
410 }
411
412 JSValueRef JSContactAddressTypeArray::push(JSContextRef context,
413                 JSObjectRef function,
414                 JSObjectRef thisObject,
415                 size_t argumentCount,
416                 const JSValueRef arguments[],
417                 JSValueRef* exception)
418 {
419         Try
420         {
421                 ContactConverterFactory::ConverterType converter =
422                                                 ContactConverterFactory::getConverter(context);
423                 JSContactAddressTypeArrayPriv* priv =
424                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(thisObject));
425                 ContactAddressTypeArrayPtr currentTypes = priv->getObject();
426                 for (size_t i = 0; i < argumentCount; ++i) {
427                         currentTypes->push_back(converter->toContactAddressType(arguments[i]));
428                 }
429                 return converter->toJSValueRef(currentTypes->size());
430         }
431         Catch(WrtDeviceApis::Commons::Exception)
432         {
433                 LogError("error occured");
434         }
435         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
436 }
437
438 JSValueRef JSContactAddressTypeArray::reverse(JSContextRef context,
439                 JSObjectRef function,
440                 JSObjectRef thisObject,
441                 size_t argumentCount,
442                 const JSValueRef arguments[],
443                 JSValueRef* exception)
444 {
445         Try
446         {
447                 WrtDeviceApis::CommonsJavaScript::BasicConverter converter =
448                                 WrtDeviceApis::CommonsJavaScript::BasicConverterFactory::getConverter(context);
449                 JSContactAddressTypeArrayPriv* priv =
450                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(thisObject));
451                 ContactAddressTypeArrayPtr currentTypes = priv->getObject();
452                 std::reverse(currentTypes->begin(), currentTypes->end());
453                 return thisObject;
454         }
455         Catch(WrtDeviceApis::Commons::Exception)
456         {
457                 LogError("error occured");
458         }
459         return JSValueMakeUndefined(context);
460 }
461
462 JSValueRef JSContactAddressTypeArray::shift(JSContextRef context,
463                 JSObjectRef function,
464                 JSObjectRef thisObject,
465                 size_t argumentCount,
466                 const JSValueRef arguments[],
467                 JSValueRef* exception)
468 {
469         Try
470         {
471                 ContactConverterFactory::ConverterType converter =
472                                                 ContactConverterFactory::getConverter(context);
473                 JSContactAddressTypeArrayPriv* priv =
474                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(thisObject));
475                 ContactAddressTypeArrayPtr currentTypes = priv->getObject();
476                 if (currentTypes->size() > 0) {
477                         std::string result = converter->toContactAddressTypeStr(currentTypes->at(0));
478                         currentTypes->erase(currentTypes->begin());
479                         return converter->toJSValueRef(result);
480                 }
481         }
482         Catch(WrtDeviceApis::Commons::Exception)
483         {
484                 LogError("error occured");
485         }
486         return JSValueMakeUndefined(context);
487 }
488
489 JSValueRef JSContactAddressTypeArray::slice(JSContextRef context,
490                 JSObjectRef function,
491                 JSObjectRef thisObject,
492                 size_t argumentCount,
493                 const JSValueRef arguments[],
494                 JSValueRef* exception)
495 {
496         Try
497         {
498                 if (argumentCount < 1) {
499                         return JSValueMakeUndefined(context);
500                 }
501                 WrtDeviceApis::CommonsJavaScript::BasicConverter converter =
502                                 WrtDeviceApis::CommonsJavaScript::BasicConverterFactory::getConverter(context);
503                 ContactAddressTypeArrayPtr typeArray = ContactAddressTypeArrayPtr(new ContactAddressTypeArray());
504                 JSContactAddressTypeArrayPriv *newPrivateObject = new JSContactAddressTypeArrayPriv(
505                                 context,
506                                 typeArray);
507                 JSValueRef result = JSObjectMake(context,
508                                                                                  getClassRef(), newPrivateObject);
509
510                 //copy current typeArray
511                 JSContactAddressTypeArrayPriv* priv =
512                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(thisObject));
513                 ContactAddressTypeArrayPtr currentTypes = priv->getObject();
514                 std::size_t first = converter->toSizeT(arguments[0]);
515                 std::size_t last = currentTypes->size() - 1;
516                 if (argumentCount > 1) {
517                         last = converter->toSizeT(arguments[1]);
518                         if (last >= currentTypes->size()) {
519                                 last = currentTypes->size() - 1;
520                         }
521                 }
522                 if (first < 0) {
523                         first = 0;
524                 }
525                 for (size_t i = first; i <= last; ++i) {
526                         typeArray->push_back(currentTypes->at(i));
527                 }
528
529                 return result;
530         }
531         Catch(WrtDeviceApis::Commons::Exception)
532         {
533                 LogError("error occured");
534         }
535         return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type mismatch");
536 }
537
538 JSValueRef JSContactAddressTypeArray::sort(JSContextRef context,
539                 JSObjectRef function,
540                 JSObjectRef thisObject,
541                 size_t argumentCount,
542                 const JSValueRef arguments[],
543                 JSValueRef* exception)
544 {
545         Try
546         {
547                 WrtDeviceApis::CommonsJavaScript::BasicConverter converter =
548                                 WrtDeviceApis::CommonsJavaScript::BasicConverterFactory::getConverter(context);
549                 JSContactAddressTypeArrayPriv* priv =
550                         static_cast<JSContactAddressTypeArrayPriv*>(JSObjectGetPrivate(thisObject));
551                 ContactAddressTypeArrayPtr currentTypes = priv->getObject();
552                 std::sort(currentTypes->begin(), currentTypes->end());
553                 return thisObject;
554         }
555         Catch(WrtDeviceApis::Commons::Exception)
556         {
557                 LogError("error occured");
558         }
559         return JSValueMakeUndefined(context);
560 }
561
562 JSValueRef JSContactAddressTypeArray::splice(JSContextRef context,
563                 JSObjectRef function,
564                 JSObjectRef thisObject,
565                 size_t argumentCount,
566                 const JSValueRef arguments[],
567                 JSValueRef* exception)
568 {
569         return JSValueMakeUndefined(context);
570 }
571
572 JSValueRef JSContactAddressTypeArray::toString(JSContextRef context,
573                 JSObjectRef function,
574                 JSObjectRef thisObject,
575                 size_t argumentCount,
576                 const JSValueRef arguments[],
577                 JSValueRef* exception)
578 {
579         return join(context, function, thisObject, 0, arguments, exception);
580 }
581
582 JSValueRef JSContactAddressTypeArray::unshift(JSContextRef context,
583                 JSObjectRef function,
584                 JSObjectRef thisObject,
585                 size_t argumentCount,
586                 const JSValueRef arguments[],
587                 JSValueRef* exception)
588 {
589         return JSValueMakeUndefined(context);
590 }
591
592 JSValueRef JSContactAddressTypeArray::valueOf(JSContextRef context,
593                 JSObjectRef function,
594                 JSObjectRef thisObject,
595                 size_t argumentCount,
596                 const JSValueRef arguments[],
597                 JSValueRef* exception)
598 {
599         return JSValueMakeUndefined(context);
600 }
601
602 } // Contact
603 } // Tizen1_0
604 } // TizenApis