Skip to content

Instantly share code, notes, and snippets.

@hansemannn
Created March 7, 2016 13:38
Show Gist options
  • Save hansemannn/92230c8e13323ad682b4 to your computer and use it in GitHub Desktop.
Save hansemannn/92230c8e13323ad682b4 to your computer and use it in GitHub Desktop.
/**
* HYPERLOOP GENERATED - DO NOT MODIFY
*
* This source code is Copyright (c) 2016 by Appcelerator, Inc.
* All Rights Reserved. This code contains patents and/or patents pending.
*/
var $dispatch = Hyperloop.dispatch,
$init,
$imports,
$class;
var NSObject = require('hyperloop/foundation/nsobject');
/**
* RobotKit/RKRobotDiscoveryAgent.h
* @class
*/
function RKRobotDiscoveryAgent (pointer) {
if (pointer) {
var oldWrapper = Hyperloop.getWrapper(pointer.$native ? pointer.$native : pointer);
if (oldWrapper) return oldWrapper;
}
if (!(this instanceof RKRobotDiscoveryAgent)) { throw new TypeError('Cannot instantiate a class by calling it as a function'); }
if (!$init) {
$initialize();
}
if (!pointer) {
pointer = Hyperloop.createProxy({
class: 'RKRobotDiscoveryAgent',
alloc: true,
init: 'init'
});
}
NSObject.call(this, pointer);
Object.defineProperty(this, '$private', {
value: {},
writable: true,
enumerable: false,
configurable: false
});
}
// superclass
RKRobotDiscoveryAgent.prototype = Object.create(NSObject.prototype, {
constructor: {
value: RKRobotDiscoveryAgent,
enumerable: false,
writable: true,
configurable: true
}
});
Object.setPrototypeOf(RKRobotDiscoveryAgent, NSObject);
Object.defineProperty(RKRobotDiscoveryAgent, '$class', {
get: function () {
if (!$init) { $initialize(); }
return $class;
},
enumerable: false
});
Object.defineProperty(RKRobotDiscoveryAgent.prototype, 'toString', {
value: function () {
return Hyperloop.stringValue(this.$native);
},
enumerable: false,
writable: true
});
Object.defineProperty(RKRobotDiscoveryAgent, 'toString', {
value: function () {
return '[class RKRobotDiscoveryAgent]';
},
enumerable: false,
writable: true
});
// class methods
Object.defineProperty(RKRobotDiscoveryAgent, 'sharedAgent', {
value: function () {
if (!$init) { $initialize(); }
var result = $dispatch(this.$class, 'sharedAgent', null, false);
if (result === undefined || result === null) return result;
result = new this(result);
return result;
},
enumerable: false,
writable: true
});
function $initialize () {
$imports = {};
$class = Hyperloop.createProxy({
class: 'RKRobotDiscoveryAgent',
alloc: false,
init: 'class'
});
Object.defineProperty(RKRobotDiscoveryAgent, '$imports', {
value: $imports,
writable: true,
enumerable: false,
configurable: false
});
Object.defineProperty(RKRobotDiscoveryAgent, '$private', {
value: {},
writable: true,
enumerable: false,
configurable: false
});
// instance methods
Object.defineProperty(RKRobotDiscoveryAgent.prototype, 'isDiscovering', {
value: function () {
var result = $dispatch(this.$native, 'isDiscovering', null, true);
return result;
},
enumerable: false,
writable: true
});
$init = true;
}
module.exports = RKRobotDiscoveryAgent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment