{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.RTCIceCandidate (js_newRTCIceCandidate, newRTCIceCandidate, js_getCandidate, getCandidate, js_getSdpMid, getSdpMid, js_getSdpMLineIndex, getSdpMLineIndex, RTCIceCandidate, castToRTCIceCandidate, gTypeRTCIceCandidate) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord) import Data.Typeable (Typeable) import GHCJS.Types (JSRef(..), JSString) import GHCJS.Foreign (jsNull) import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..)) import GHCJS.Marshal (ToJSRef(..), FromJSRef(..)) import GHCJS.Marshal.Pure (PToJSRef(..), PFromJSRef(..)) import Control.Monad.IO.Class (MonadIO(..)) import Data.Int (Int64) import Data.Word (Word, Word64) import GHCJS.DOM.Types import Control.Applicative ((<$>)) import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName) import GHCJS.DOM.Enums foreign import javascript unsafe "new window[\"RTCIceCandidate\"]($1)" js_newRTCIceCandidate :: Nullable Dictionary -> IO RTCIceCandidate -- | newRTCIceCandidate :: (MonadIO m, IsDictionary dictionary) => Maybe dictionary -> m RTCIceCandidate newRTCIceCandidate dictionary = liftIO (js_newRTCIceCandidate (maybeToNullable (fmap toDictionary dictionary))) foreign import javascript unsafe "$1[\"candidate\"]" js_getCandidate :: RTCIceCandidate -> IO JSString -- | getCandidate :: (MonadIO m, FromJSString result) => RTCIceCandidate -> m result getCandidate self = liftIO (fromJSString <$> (js_getCandidate (self))) foreign import javascript unsafe "$1[\"sdpMid\"]" js_getSdpMid :: RTCIceCandidate -> IO JSString -- | getSdpMid :: (MonadIO m, FromJSString result) => RTCIceCandidate -> m result getSdpMid self = liftIO (fromJSString <$> (js_getSdpMid (self))) foreign import javascript unsafe "$1[\"sdpMLineIndex\"]" js_getSdpMLineIndex :: RTCIceCandidate -> IO Word -- | getSdpMLineIndex :: (MonadIO m) => RTCIceCandidate -> m Word getSdpMLineIndex self = liftIO (js_getSdpMLineIndex (self))