111 function __device_landmarks_cancel(transactionId){ |
111 function __device_landmarks_cancel(transactionId){ |
112 return this.provider.cancel(transactionId); |
112 return this.provider.cancel(transactionId); |
113 } |
113 } |
114 |
114 |
115 |
115 |
116 |
|
117 |
|
118 /* |
|
119 Copyright � 2009 Nokia. All rights reserved. |
|
120 Code licensed under the BSD License: |
|
121 Software License Agreement (BSD License) Copyright � 2009 Nokia. |
|
122 All rights reserved. |
|
123 Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
|
124 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
|
125 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
|
126 Neither the name of Nokia Corporation. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of Nokia Corporation. |
|
127 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
128 version: 1.0 |
|
129 */ |
|
130 //utillity function for converting error code from PS to CJSE codes |
116 //utillity function for converting error code from PS to CJSE codes |
131 //this gets used in communicating errors via error callback |
117 //this gets used in communicating errors via error callback |
132 var err_missing_argument = 1003; |
118 var err_missing_argument = 1003; |
133 var err_bad_argument = 1002; |
119 var err_bad_argument = 1002; |
134 var err_ServiceNotSupported = 1004; |
120 var err_ServiceNotSupported = 1004; |
337 //update |
323 //update |
338 this.catItem = this.iter.getNext(); |
324 this.catItem = this.iter.getNext(); |
339 if (typeof(this.catItem) == "undefined") { |
325 if (typeof(this.catItem) == "undefined") { |
340 this.catItem = null; |
326 this.catItem = null; |
341 } |
327 } |
342 return new __sp_device_category_obj(tempitem); |
328 |
|
329 if(tempitem){ |
|
330 return new __sp_device_category_obj(tempitem); |
|
331 } |
|
332 else { |
|
333 return null; |
|
334 } |
343 } |
335 } |
344 else { |
336 else { |
345 this.catItem = this.iter.getNext(); |
337 this.catItem = this.iter.getNext(); |
346 if (typeof this.catItem == "undefined") { |
338 if (typeof this.catItem == "undefined" || this.catItem == null) { |
347 this.hasElement = true; |
339 this.hasElement = true; |
348 this.catItem = null; |
340 this.catItem = null; |
349 return null; |
341 return null; |
350 |
|
351 } |
342 } |
352 else { |
343 else { |
353 this.hasElement = true; |
344 this.hasElement = true; |
354 var tempObject = new Object(); |
345 var tempObject = new Object(); |
355 tempObject = this.lmItem; |
346 tempObject = this.lmItem; |
405 (location.latitude !== null) && |
396 (location.latitude !== null) && |
406 (location.latitude !== "")) { |
397 (location.latitude !== "")) { |
407 this.Latitude = location.latitude; |
398 this.Latitude = location.latitude; |
408 } |
399 } |
409 |
400 |
410 |
|
411 /*if(location.altitude) |
|
412 |
|
413 this.Altitude = location.altitude; |
|
414 |
|
415 if(location.hAccuracy) |
|
416 |
|
417 this.HAccuracy = location.hAccuracy; |
|
418 |
|
419 if(location.vAccuracy) |
|
420 |
|
421 this.VAccuracy = location.vAccuracy;*/ |
|
422 |
401 |
423 } |
402 } |
424 |
403 |
425 //use this to convert from positon filed of landmarkitem to convert it to position field |
404 //use this to convert from positon filed of landmarkitem to convert it to position field |
426 //in LIW of landmark item |
405 //in LIW of landmark item |
936 //update |
915 //update |
937 this.lmItem = this.iter.getNext(); |
916 this.lmItem = this.iter.getNext(); |
938 if (typeof(this.lmItem) == "undefined") { |
917 if (typeof(this.lmItem) == "undefined") { |
939 this.lmItem = null; |
918 this.lmItem = null; |
940 } |
919 } |
941 return new __sp_device_landmark_obj(tempitem); |
920 if(tempitem){ |
|
921 return new __sp_device_landmark_obj(tempitem); |
|
922 } |
|
923 else{ |
|
924 return null; |
|
925 } |
942 } |
926 } |
943 else { |
927 else { |
944 this.lmItem = this.iter.getNext(); |
928 this.lmItem = this.iter.getNext(); |
945 if (typeof this.lmItem == "undefined") { |
929 if (typeof this.lmItem == "undefined" || this.lmItem == null) { |
946 this.hasElement = true; |
930 this.hasElement = true; |
947 this.lmItem = null; |
931 this.lmItem = null; |
948 return null; |
932 return null; |
949 |
933 |
950 } |
934 } |
953 var tempObject = new Object(); |
937 var tempObject = new Object(); |
954 tempObject = this.lmItem; |
938 tempObject = this.lmItem; |
955 //update |
939 //update |
956 |
940 |
957 this.lmItem = this.iter.getNext(); |
941 this.lmItem = this.iter.getNext(); |
958 if (typeof(this.lmItem) == "undefined") { |
942 if (typeof(this.lmItem) == "undefined" || this.lmItem == null) { |
959 this.lmItem = null; |
943 this.lmItem = null; |
960 } |
944 } |
961 return new __sp_device_landmark_obj(tempObject); |
945 return new __sp_device_landmark_obj(tempObject); |
962 } |
946 } |
963 } |
947 } |