/////////////////////////////////////////////////////////////////////////////// /// @fn PyHelloWorldAPI::PyHelloWorldAPI(const PyHelloWorldPtr& plugin, const FB::BrowserHostPtr host) /// /// @brief Constructor for your JSAPI object. You should register your methods, properties, and events /// that should be accessible to Javascript from here. /// /// @see FB::JSAPIAuto::registerMethod /// @see FB::JSAPIAuto::registerProperty /// @see FB::JSAPIAuto::registerEvent /////////////////////////////////////////////////////////////////////////////// PyHelloWorldAPI::PyHelloWorldAPI(const PyHelloWorldPtr& plugin, const FB::BrowserHostPtr& host) : m_plugin(plugin), m_host(host) { Py_Initialize(); globals = PyDict_New (); PyDict_SetItemString (globals, "__builtins__", PyEval_GetBuiltins ()); registerMethod("echo", make_method(this, &PyHelloWorldAPI::echo)); registerMethod("testEvent", make_method(this, &PyHelloWorldAPI::testEvent)); // Read-write property registerProperty("testString", make_property(this, &PyHelloWorldAPI::get_testString, &PyHelloWorldAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &PyHelloWorldAPI::get_version)); registerEvent("onfired"); registerMethod("hello_py", make_method(this, &PyHelloWorldAPI::hello_py)); registerMethod("getHelloPyExtension", make_method(this, &PyHelloWorldAPI::hello_py_extension)); // registerMethod("eval", make_method(this, &PyHelloWorldAPI::eval)); }
BlabbleCall::BlabbleCall(const BlabbleAccountPtr& parent_account) : call_id_(-1), ringing_(false) { if (parent_account) { acct_id_ = parent_account->id(); audio_manager_ = parent_account->GetManager()->audio_manager(); parent_ = BlabbleAccountWeakPtr(parent_account); } else { acct_id_ = -1; } id_ = BlabbleCall::GetNextId(); BLABBLE_LOG_DEBUG("New call created. Global id: " << id_); registerMethod("answer", make_method(this, &BlabbleCall::Answer)); registerMethod("hangup", make_method(this, &BlabbleCall::LocalEnd)); registerMethod("hold", make_method(this, &BlabbleCall::Hold)); registerMethod("unhold", make_method(this, &BlabbleCall::Unhold)); registerMethod("sendDTMF", make_method(this, &BlabbleCall::SendDTMF)); registerMethod("transferReplace", make_method(this, &BlabbleCall::TransferReplace)); registerMethod("transfer", make_method(this, &BlabbleCall::Transfer)); registerProperty("callerId", make_property(this, &BlabbleCall::caller_id)); registerProperty("isActive", make_property(this, &BlabbleCall::is_active)); registerProperty("status", make_property(this, &BlabbleCall::status)); registerProperty("onCallConnected", make_write_only_property(this, &BlabbleCall::set_on_call_connected)); registerProperty("onCallEnd", make_write_only_property(this, &BlabbleCall::set_on_call_end)); }
LocalMediaStream::LocalMediaStream(const talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface>& pStream) : FB::JSAPIAuto("MediaStream") , m_label(pStream->label()) , m_videoTracks(FB::variant_list_of()) , m_audioTracks(FB::variant_list_of()) { registerProperty("label", make_property(this, &LocalMediaStream::get_label)); registerProperty("videoTracks", make_property(this,&LocalMediaStream::get_videoTracks)); registerProperty("audioTracks", make_property(this, &LocalMediaStream::get_audioTracks)); for(int i=0; i<pStream->video_tracks()->count(); i++) { talk_base::scoped_refptr<webrtc::VideoTrackInterface> pTrack(pStream->video_tracks()->at(i)); talk_base::scoped_refptr<webrtc::LocalVideoTrackInterface> pTrack_( static_cast<webrtc::LocalVideoTrackInterface*>(pTrack.get()) ); AddTrack(LocalVideoTrack::Create(pTrack_)); } for(int i=0; i<pStream->audio_tracks()->count(); i++) { talk_base::scoped_refptr<webrtc::AudioTrackInterface> pTrack(pStream->audio_tracks()->at(i)); talk_base::scoped_refptr<webrtc::LocalAudioTrackInterface> pTrack_( static_cast<webrtc::LocalAudioTrackInterface*>(pTrack.get()) ); AddTrack(LocalAudioTrack::Create(pTrack_)); } }
/////////////////////////////////////////////////////////////////////////////// /// @fn ambientAPI::ambientAPI(const ambientPtr& plugin, const FB::BrowserHostPtr host) /// /// @brief Constructor for your JSAPI object. You should register your methods, properties, and events /// that should be accessible to Javascript from here. /// /// @see FB::JSAPIAuto::registerMethod /// @see FB::JSAPIAuto::registerProperty /// @see FB::JSAPIAuto::registerEvent /////////////////////////////////////////////////////////////////////////////// ambientAPI::ambientAPI(const ambientPtr& plugin, const FB::BrowserHostPtr& host) : m_plugin(plugin), m_host(host) { registerMethod("echo", make_method(this, &ambientAPI::echo)); registerMethod("testEvent", make_method(this, &ambientAPI::testEvent)); // Read-write property registerProperty("testString", make_property(this, &ambientAPI::get_testString, &ambientAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &ambientAPI::get_version)); registerMethod("setCalculationRate", make_method(this, &ambientAPI::setCalculationRate)); registerMethod("threadedCalculation", make_method(this, &ambientAPI::threadedCalculation)); registerMethod("threadedCalculationFullscreen", make_method(this, &ambientAPI::threadedCalculationFullscreen)); registerMethod("initialize", make_method(this, &ambientAPI::initialize)); registerMethod("calcFrame", make_method(this, &ambientAPI::calcFrame)); registerMethod("getErrorMessage",make_method(this, &ambientAPI::getErrorMessage)); registerMethod("loadSEM",make_method(this, &ambientAPI::loadSEM)); registerMethod("playEffectAtTimeAbs", make_method(this, &ambientAPI::playEffectAtTimeAbs)); registerMethod("playEffectAtTimeRel", make_method(this, &ambientAPI::playEffectAtTimeRel)); registerMethod("grabFrame",make_method(this,&ambientAPI::grabFrame)); // EPOC JS method #ifdef USE_EPOC registerMethod("queryEPOC", make_method(this,&ambientAPI::queryEPOC)); #endif }
//////////////////////////////////////////////////////////////////////////// /// @fn jUARTAPI::jUARTAPI(const jUARTPtr& plugin, const FB::BrowserHostPtr host) /// /// @brief Constructor for your JSAPI object. /// You should register your methods, properties, and events /// that should be accessible to Javascript from here. /// /// @see FB::JSAPIAuto::registerMethod /// @see FB::JSAPIAuto::registerProperty /// @see FB::JSAPIAuto::registerEvent //////////////////////////////////////////////////////////////////////////// jUARTAPI::jUARTAPI(const jUARTPtr& plugin, const FB::BrowserHostPtr& host) : m_plugin(plugin), m_host(host) { registerMethod("echo", make_method(this, &jUARTAPI::echo)); registerMethod("testEvent", make_method(this, &jUARTAPI::testEvent)); registerProperty("Serial", make_property(this, &jUARTAPI::get_Serial)); // Read-write property registerProperty("testString", make_property(this, &jUARTAPI::get_testString, &jUARTAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &jUARTAPI::get_version)); std::string domain = m_host->getDOMWindow()->getNode("location")->getProperty<std::string>("host"); size_t colon = domain.find(':'); if (colon != std::string::npos) domain = domain.substr(0, colon); int secZone = domain.compare("localhost") == 0 ? FB::SecurityScope_Local : FB::SecurityScope_Public; m_Serial = boost::make_shared<SerialAPI>(m_host, secZone); }
encrev2_pluginAPI::encrev2_pluginAPI(FB::BrowserHostPtr host, encrev2_plugin &plugin) : m_host(host), m_plugin(plugin) { // Callable registerMethod("testEvent", make_method(this, &encrev2_pluginAPI::testEvent)); registerMethod("stream", make_method(this, &encrev2_pluginAPI::stream)); registerMethod("play", make_method(this, &encrev2_pluginAPI::play)); registerMethod("stop", make_method(this, &encrev2_pluginAPI::stop)); registerMethod("setOptions",make_method(this, &encrev2_pluginAPI::setOptions)); // Read-only property registerProperty("version", make_property(this, &encrev2_pluginAPI::get_version)); // Read-Write property registerProperty("hostname", make_property(this, &encrev2_pluginAPI::get_hostname, &encrev2_pluginAPI::set_hostname)); registerProperty("port", make_property(this, &encrev2_pluginAPI::get_port, &encrev2_pluginAPI::set_port)); // Event registerEvent("onfired"); }
/////////////////////////////////////////////////////////////////////////////// /// @fn WebrtcPluginAPI::WebrtcPluginAPI(const WebrtcPluginPtr& plugin, const FB::BrowserHostPtr host) /// /// @brief Constructor for your JSAPI object. You should register your methods, properties, and events /// that should be accessible to Javascript from here. /// /// @see FB::JSAPIAuto::registerMethod /// @see FB::JSAPIAuto::registerProperty /// @see FB::JSAPIAuto::registerEvent /////////////////////////////////////////////////////////////////////////////// WebrtcPluginAPI::WebrtcPluginAPI(const WebrtcPluginPtr& plugin, const FB::BrowserHostPtr& host) : m_plugin(plugin), m_host(host) { registerMethod("echo", make_method(this, &WebrtcPluginAPI::echo)); registerMethod("testEvent", make_method(this, &WebrtcPluginAPI::testEvent)); registerMethod("Signin", make_method(this, &WebrtcPluginAPI::Signin)); registerMethod("Signout", make_method(this, &WebrtcPluginAPI::Signout)); registerMethod("Call", make_method(this, &WebrtcPluginAPI::Call)); registerMethod("Hangup", make_method(this, &WebrtcPluginAPI::Hangup)); // Read-write property registerProperty("testString", make_property(this, &WebrtcPluginAPI::get_testString, &WebrtcPluginAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &WebrtcPluginAPI::get_version)); m_testString = "Hello World"; m_pMsgQ = new (GoCast::ThreadSafeMessageQueue)(); m_pEvtQ = new (GoCast::ThreadSafeMessageQueue)(); m_pMainThread = new PluginMainThread(m_pMsgQ, m_pEvtQ); m_pNotificationsThread = new PluginNotificationsThread(this, m_pEvtQ); m_pMainThread->startThread(); m_pNotificationsThread->startThread(); }
void VideoAPI::initProxy() { mId = getFactory()->getWhiteBoard()->addValue(VideoAPIWeakPtr(boost::static_pointer_cast<VideoAPI>(this->shared_from_this()))); // Methods registerProperty("magic", make_property(this, &VideoAPI::getMagic, &VideoAPI::setMagic)); registerProperty("window", make_property(this, &VideoAPI::getWindow)); registerMethod("setBackgroundColor", make_method(this, &VideoAPI::setBackgroundColor)); }
ObjectStore::ObjectStore(const std::string& name, const Implementation::ObjectStore::Mode mode) : name(name), mode(mode) { registerProperty("name", make_property(this, &ObjectStore::getName)); registerProperty("keyPath", make_property(this, &ObjectStore::getKeyPath)); registerProperty("mode", make_property(this, &ObjectStore::getModeInteger)); registerProperty("indexNames", make_property(this, &ObjectStore::getIndexNameVariants)); }
void Cursor::initializeMethods() { registerProperty("direction", make_property(this, &Cursor::getDirection)); registerProperty("NEXT", make_property(this, &Cursor::getNext)); registerProperty("NEXT_NO_DUPLICATE", make_property(this, &Cursor::getNextNoDuplicate)); registerProperty("PREV", make_property(this, &Cursor::getPrevious)); registerProperty("PREV_NO_DUPLICATE", make_property(this, &Cursor::getPreviousNoDuplicate)); }
MediaStreamTrack::MediaStreamTrack(const std::string& kind, const std::string& label) : FB::JSAPIAuto("MediaStreamTrack") , m_kind(kind) , m_label(label) { registerProperty("kind", make_property(this, &MediaStreamTrack::get_kind)); registerProperty("label", make_property(this, &MediaStreamTrack::get_label)); }
FBTestPluginAPI::FBTestPluginAPI(boost::shared_ptr<FBTestPlugin> plugin, FB::BrowserHostPtr host) : m_host(host), m_pluginWeak(plugin) { registerMethod("add", make_method(this, &FBTestPluginAPI::add)); registerMethod(L"echo", make_method(this, &FBTestPluginAPI::echo)); registerMethod(L"eval", make_method(this, &FBTestPluginAPI::eval)); registerMethod(L"asString", make_method(this, &FBTestPluginAPI::asString)); registerMethod(L"asBool", make_method(this, &FBTestPluginAPI::asBool)); registerMethod(L"asInt", make_method(this, &FBTestPluginAPI::asInt)); registerMethod("asDouble", make_method(this, &FBTestPluginAPI::asDouble)); registerMethod("listArray", make_method(this, &FBTestPluginAPI::listArray)); registerMethod("reverseArray", make_method(this, &FBTestPluginAPI::reverseArray)); registerMethod("getUserData", make_method(this, &FBTestPluginAPI::getUserData)); registerMethod("getUserArray", make_method(this, &FBTestPluginAPI::getUserArray)); registerMethod("getObjectKeys", make_method(this, &FBTestPluginAPI::getObjectKeys)); registerMethod("getObjectValues", make_method(this, &FBTestPluginAPI::getObjectValues)); registerMethod("testEvent", make_method(this, &FBTestPluginAPI::testEvent)); registerMethod("testStreams", make_method(this, &FBTestPluginAPI::testStreams)); registerMethod("getTagAttribute", make_method(this, &FBTestPluginAPI::getTagAttribute)); registerMethod("getPageLocation", make_method(this, &FBTestPluginAPI::getPageLocation)); registerMethod("createThreadRunner", make_method(this, &FBTestPluginAPI::createThreadRunner)); registerMethod("optionalTest", make_method(this, &FBTestPluginAPI::optionalTest)); registerMethod("getURL", make_method(this, &FBTestPluginAPI::getURL)); registerMethod("postURL", make_method(this, &FBTestPluginAPI::postURL)); registerMethod(L"скажи", make_method(this, &FBTestPluginAPI::say)); registerMethod("addWithSimpleMath", make_method(this, &FBTestPluginAPI::addWithSimpleMath)); registerMethod("createSimpleMath", make_method(this, &FBTestPluginAPI::createSimpleMath)); registerMethod("countArrayLength", make_method(this, &FBTestPluginAPI::countArrayLength)); // Read-write property registerProperty("testString", make_property(this, &FBTestPluginAPI::get_testString, &FBTestPluginAPI::set_testString)); registerProperty("simpleMath", make_property(this, &FBTestPluginAPI::get_simpleMath)); // Read-only property registerProperty("someInt", make_property(this, &FBTestPluginAPI::get_someInt)); registerProperty("pluginPath", make_property(this, &FBTestPluginAPI::get_pluginPath)); registerEvent("onfired"); m_simpleMath = boost::make_shared<SimpleMathAPI>(m_host); }
/////////////////////////////////////////////////////////////////////////////// /// @fn osgWebAPI::osgWebAPI(const osgWebPtr& plugin, const FB::BrowserHostPtr host) /// /// @brief Constructor for your JSAPI object. You should register your methods, properties, and events /// that should be accessible to Javascript from here. /// /// @see FB::JSAPIAuto::registerMethod /// @see FB::JSAPIAuto::registerProperty /// @see FB::JSAPIAuto::registerEvent /////////////////////////////////////////////////////////////////////////////// osgWebAPI::osgWebAPI(const osgWebPtr& plugin, const FB::BrowserHostPtr& host) : m_plugin(plugin), m_host(host) { registerMethod("echo", make_method(this, &osgWebAPI::echo)); registerMethod("testEvent", make_method(this, &osgWebAPI::testEvent)); // Read-write property registerProperty("testString", make_property(this, &osgWebAPI::get_testString, &osgWebAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &osgWebAPI::get_version)); }
LocalMediaStreamTrack::LocalMediaStreamTrack(const std::string& kind, const std::string& label, const bool enabled) : MediaStreamTrack(kind, label) , m_enabled(enabled) { registerProperty("enabled", make_property(this, &LocalMediaStreamTrack::get_enabled, &LocalMediaStreamTrack::set_enabled)); }
InlineInstallerAPI::InlineInstallerAPI(FB::BrowserHostWrapper *host) : m_host(host) { registerMethod("echo", make_method(this, &InlineInstallerAPI::echo)); registerMethod("testEvent", make_method(this, &InlineInstallerAPI::testEvent)); // Read-write property registerProperty("testString", make_property(this, &InlineInstallerAPI::get_testString, &InlineInstallerAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &InlineInstallerAPI::get_version)); registerEvent("onfired"); }
void ParamsDialog::build_grid() { std::map<const wxString, wxPGProperty*> properties; pg_->Clear(); for (Param& param : params_) { wxPGProperty* parent = param.get_parent().empty() ? pg_->GetRoot() : properties[param.get_parent()]; wxPGProperty* property = make_property(param); const wxString name = param.get_name(); properties[name] = pg_->AppendIn(parent, property); } }
//////////////////////////////////////////////////////////////////////////// /// @fn jUARTAPI::jUARTAPI(const jUARTPtr& plugin, const FB::BrowserHostPtr host) /// /// @brief Constructor for your JSAPI object. /// You should register your methods, properties, and events /// that should be accessible to Javascript from here. /// /// @see FB::JSAPIAuto::registerMethod /// @see FB::JSAPIAuto::registerProperty /// @see FB::JSAPIAuto::registerEvent //////////////////////////////////////////////////////////////////////////// jUARTAPI::jUARTAPI(const jUARTPtr& plugin, const FB::BrowserHostPtr& host) : m_plugin(plugin), m_host(host) { registerMethod("echo", make_method(this, &jUARTAPI::echo)); registerMethod("testEvent", make_method(this, &jUARTAPI::testEvent)); registerProperty("Serial", make_property(this, &jUARTAPI::get_Serial)); // Read-write property registerProperty("testString", make_property(this, &jUARTAPI::get_testString, &jUARTAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &jUARTAPI::get_version)); m_Serial = boost::make_shared<SerialAPI>(m_host); }
/////////////////////////////////////////////////////////////////////////////// /// @fn hapticAPI::hapticAPI(const hapticPtr& plugin, const FB::BrowserHostPtr host) /// /// @brief Constructor for your JSAPI object. You should register your methods, properties, and events /// that should be accessible to Javascript from here. /// /// @see FB::JSAPIAuto::registerMethod /// @see FB::JSAPIAuto::registerProperty /// @see FB::JSAPIAuto::registerEvent /////////////////////////////////////////////////////////////////////////////// hapticAPI::hapticAPI(const hapticPtr& plugin, const FB::BrowserHostPtr& host) : m_plugin(plugin), m_host(host) { registerMethod("echo", make_method(this, &hapticAPI::echo)); registerMethod("testEvent", make_method(this, &hapticAPI::testEvent)); //Register JHaptic library properties registerProperty("numDevice", make_property(this, &hapticAPI::getNumDevice)); registerProperty("initialized", make_property(this, &hapticAPI::getStatus)); registerProperty("deviceType", make_property(this, &hapticAPI::getDeviceType)); registerProperty("maxForce", make_property(this, &hapticAPI::getMaxForce)); registerProperty("workspaceSize", make_property(this, &hapticAPI::getWorkspaceSize)); registerProperty("position", make_property(this, &hapticAPI::getPosition)); registerProperty("pixel", make_property(this, &hapticAPI::getPixelWidth)); //Register JHaptic library methods registerMethod("startDevice", make_method(this, &hapticAPI::startDevice)); registerMethod("stopDevice", make_method(this, &hapticAPI::stopDevice)); registerMethod("sendForce", make_method(this, &hapticAPI::sendForce)); registerMethod("setContext", make_method(this, &hapticAPI::setContext)); // Read-write property registerProperty("testString", make_property(this, &hapticAPI::get_testString, &hapticAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &hapticAPI::get_version)); //State variables initialization initialized = false; deviceID = getNumDevice()-1; InitializedString = "Initialized"; NotInitializedString = "Not initialized"; ConnectionString = "Connection opened"; DisconnectionString = "Connection closed"; setPixelWidth(); }
btlauncherAPI::btlauncherAPI(const btlauncherPtr& plugin, const FB::BrowserHostPtr& host) : m_plugin(plugin), m_host(host) { registerMethod("echo", make_method(this, &btlauncherAPI::echo)); registerMethod("testEvent", make_method(this, &btlauncherAPI::testEvent)); registerMethod("getInstallPath", make_method(this, &btlauncherAPI::getInstallPath)); registerMethod("getInstallVersion", make_method(this, &btlauncherAPI::getInstallVersion)); registerMethod("isRunning", make_method(this, &btlauncherAPI::isRunning)); registerMethod("stopRunning", make_method(this, &btlauncherAPI::stopRunning)); registerMethod("runProgram", make_method(this, &btlauncherAPI::runProgram)); registerMethod("downloadProgram", make_method(this, &btlauncherAPI::downloadProgram)); registerMethod("checkForUpdate", make_method(this, &btlauncherAPI::checkForUpdate)); // Read-write property registerProperty("testString", make_property(this, &btlauncherAPI::get_testString, &btlauncherAPI::set_testString)); // Read-only property registerProperty("version", make_property(this, &btlauncherAPI::get_version)); }
void AuthInfoAPI::initProxy() { registerProperty("ha1", make_property(this, &AuthInfoAPI::getHa1, &AuthInfoAPI::setHa1)); registerProperty("realm", make_property(this, &AuthInfoAPI::getRealm, &AuthInfoAPI::setRealm)); registerProperty("userid", make_property(this, &AuthInfoAPI::getUserid, &AuthInfoAPI::setUserid)); registerProperty("username", make_property(this, &AuthInfoAPI::getUsername, &AuthInfoAPI::setUsername)); registerProperty("passwd", make_property(this, &AuthInfoAPI::getPasswd, &AuthInfoAPI::setPasswd)); registerProperty("domain", make_property(this, &AuthInfoAPI::getDomain, &AuthInfoAPI::setDomain)); }
void KeyRange::initializeMethods() { registerProperty("left", make_property(this, &KeyRange::getLeft)); registerProperty("right", make_property(this, &KeyRange::getRight)); registerProperty("flags", make_property(this, &KeyRange::getFlags)); registerProperty("SINGLE", make_property(this, &KeyRange::getSingle)); registerProperty("LEFT_OPEN", make_property(this, &KeyRange::GetLeftOpen)); registerProperty("RIGHT_OPEN", make_property(this, &KeyRange::GetRightOpen)); registerProperty("LEFT_BOUND", make_property(this, &KeyRange::GetLeftBound)); registerProperty("RIGHT_BOUND", make_property(this, &KeyRange::GetRightBound)); registerMethod("only", make_method(this, &KeyRange::only)); registerMethod("leftBound", make_method(this, static_cast<FB::JSOutObject (KeyRange::*)(FB::variant, const FB::CatchAll &)>(&KeyRange::leftBound))); registerMethod("rightBound", make_method(this, static_cast<FB::JSOutObject (KeyRange::*)(FB::variant, const FB::CatchAll &)>(&KeyRange::rightBound))); registerMethod("bound", make_method(this, static_cast<FB::JSOutObject (KeyRange::*)(FB::variant, FB::variant, const FB::CatchAll &)>(&KeyRange::bound))); }
void FriendAPI::initProxy() { registerProperty("address", make_property(this, &FriendAPI::getAddress, &FriendAPI::setAddress)); registerProperty("incSubscribePolicy", make_property(this, &FriendAPI::getIncSubscribePolicy, &FriendAPI::setIncSubscribePolicy)); registerProperty("name", make_property(this, &FriendAPI::getName, &FriendAPI::setName)); registerProperty("presenceModel", make_property(this, &FriendAPI::getPresenceModel)); registerProperty("refKey", make_property(this, &FriendAPI::getRefKey, &FriendAPI::setRefKey)); registerProperty("subscribesEnabled", make_property(this, &FriendAPI::subscribesEnabled, &FriendAPI::enableSubscribes)); registerMethod("done", make_method(this, &FriendAPI::done)); registerMethod("edit", make_method(this, &FriendAPI::edit)); registerMethod("inList", make_method(this, &FriendAPI::inList)); }
void X509Certificate::initializeProperties() { registerProperty("issuerX500Principal", make_property(this, &X509Certificate::get_issuerX500Principal)); // TODO register notAfter and notBefore (type is commented out) //registerProperty("notAfter", make_property(this, &X509Certificate::get_notAfter)); //registerProperty("notBefore", make_property(this, &X509Certificate::get_notBefore)); // registerProperty("publicKey", make_property(this, &X509Certificate::get_publicKey)); registerProperty("privateKey", make_property(this, &X509Certificate::get_privateKey)); registerProperty("serialNumber", make_property(this, &X509Certificate::get_serialNumber)); registerProperty("subjectX500Principal", make_property(this, &X509Certificate::get_subjectX500Principal)); registerProperty("version", make_property(this, &X509Certificate::get_version)); registerProperty("keyUsage", make_property(this, &X509Certificate::get_keyUsage)); // See rfc5280 for more information // registerProperty("extendedKeyUsage", make_property(this, &X509Certificate::get_extendedKeyUsage)); // See rfc5280 for more information }
void addProperty( JSContext* cx, JSOBJECT* jsobj, const char* prop, bool value ) { make_property(pr,cx); pr.set(JS::BooleanValue(value)); //pr = BOOLEAN_TO_JSVAL(value); JS_SET_PROPERTY(cx, jsobj, prop, pr); }
void addProperty( JSContext* cx, JSOBJECT* jsobj, const char* prop, int value ) { make_property(pr,cx); pr.set(JS::Int32Value(value)); //pr = INT_TO_JSVAL(value); JS_SET_PROPERTY(cx, jsobj, prop, pr); }
void addProperty( JSContext* cx, JSOBJECT* jsobj, const char* prop, JSOBJECT* value ) { make_property(pr,cx); pr.set(JS::ObjectOrNullValue(value)); //pr = OBJECT_TO_JSVAL(value); JS_SET_PROPERTY(cx, jsobj, prop, pr ); }
LocalVideoTrack::LocalVideoTrack(const talk_base::scoped_refptr<webrtc::LocalVideoTrackInterface>& pTrack) : LocalMediaStreamTrack(pTrack->kind(), pTrack->label(), pTrack->enabled()) { registerProperty("effect", make_property(this, &LocalVideoTrack::get_effect, &LocalVideoTrack::set_effect)); }
void AddressAPI::initProxy() { registerMethod("asString", make_method(this, &AddressAPI::asString)); registerMethod("asStringUriOnly", make_method(this, &AddressAPI::asStringUriOnly)); registerMethod("clean", make_method(this, &AddressAPI::clean)); registerMethod("clone", make_method(this, &AddressAPI::clone)); if (isConst()) { registerProperty("displayName", make_property(this, &AddressAPI::getDisplayName)); registerProperty("domain", make_property(this, &AddressAPI::getDomain)); registerProperty("port", make_property(this, &AddressAPI::getPort)); registerProperty("transport", make_property(this, &AddressAPI::getTransport)); registerProperty("username", make_property(this, &AddressAPI::getUsername)); } else { registerProperty("displayName", make_property(this, &AddressAPI::getDisplayName, &AddressAPI::setDisplayName)); registerProperty("domain", make_property(this, &AddressAPI::getDomain, &AddressAPI::setDomain)); registerProperty("port", make_property(this, &AddressAPI::getPort, &AddressAPI::setPort)); registerProperty("transport", make_property(this, &AddressAPI::getTransport, &AddressAPI::setTransport)); registerProperty("username", make_property(this, &AddressAPI::getUsername, &AddressAPI::setUsername)); } registerProperty("scheme", make_property(this, &AddressAPI::getScheme)); }
void addProperty( JSContext* cx, JSOBJECT* jsobj, const char* prop, const std::string& value ) { make_property(pr,cx); pr.set(JS::StringValue(JS_NewStringCopyZ(cx, value.c_str()))); //pr = std_string_to_jsval(cx, value.c_str()); JS_SET_PROPERTY(cx, jsobj, prop, pr); }