+ scope.logged=false;
+ };
+
+ scope.onerror = function() {
+ if (scope.logged !== false) {
+ Notification.warning ({message: "AppFramework Binder Lost", delay: 5000});
+ scope.offline();
+ }
+ scope.status = 0;
+ };
+
+ scope.onsuccess = function(jresp, errcode) {
+
+ if (errcode !== 200 || jresp.request.status !== "success") {
+ Notification.warning ({message: "auto-connect :" + jresp.request.info, delay: 10000});
+ scope.offline();
+ return false;
+ }
+
+ if (scope.logged !== true) {
+ Notification.success ({message: "AppFramework Binder Connected", delay: 3000});
+ scope.online();
+ if (scope.callback) scope.callback(jresp);
+ }
+
+ scope.status = 1;
+ return true;