Class: Mobizen

MobizenRoom

global new Mobizen()

Extends

Requires

Members

inherited apps object

inherited booted boolean

inherited devel string

inherited env string

inherited hostname string

multiple boolean

inherited options object

Mobizen Options

Properties:
Name Type Description
sio string

signal socket server address

apidoc string

api document server address

nolocal boolean

not use local connection

noclose boolean

not closing when connection closed

noscreen boolean

not closing when connection closed

ssl boolean

using ssl protocol of connection

usbip boolean

using custom usb ip address

localip boolean

using custom local ip address

gwip boolean

using custom gateway address

mode boolean

connection mode www, nat and usb

transports object

address of transports

Properties
Name Type Description
usb object

usb p2p connection

Properties
Name Type Description
ws string

base url

http string

base url

ports array

ports of try connect

www object

www internet connecton

Properties
Name Type Description
ws string

base url

http string

base url

local object

local(NAT) p2p connection

Properties
Name Type Description
ws string

base url

http string

base url

ports array

ports of try connect

inherited provider string

inherited reconnectDelay number

inherited reconnected boolean

Type Definitions

Shared elements

Properties:
Name Type Argument Description
win jQueryObject

$(window)

doc jQueryObject

$(document)

body jQueryObject

$(document.body)

header jQueryObject

$('#header')

contents jQueryObject

$('#contents')

modules jQueryObject

$('#modules')

focused jQueryObject <nullable>

null of focused element

device object Mobizen.Device

A Provider of Mobizen/Device API

Properties:
Name Type Description
pattern Mobizen.I18n.pattern

A regular expression pattern of template

search Mobizen.I18n.search

find resource

engine Mobizen.I18n.engine

replaced string

locale string

locale string

const object

constant resources

socket object Mobizen.Socket

A Provider of Mobizen/Socket API or Fake Socket

Generic User Interfaces

Properties:
Name Type Description
dialog Mobizen.UI~Dialog

Dialog Interfaces

overlay Mobizen.UI~Overlay

Overlay controller

panel Mobizen.UI~Panel

A deep(forward/backward) controller of panel

shortcut Mobizen.UI~Shortcut

Keyboard shortcut API

Methods

static Mobizen(Room).package(config)

Name Type Description
config object

connect(options)

Name Type Description
options object

connect options

inherited emit(type){boolean}

Execute each of the listeners in order with the supplied arguments.

Name Type Description
type string

type of event

Returns:
Type Description
boolean true if event had listeners, false otherwise.

home()

inherited listeners(type){array}

Name Type Description
type string

type of event

Returns:
Type Description
array array of listeners for the specified event.

load()

inherited logout(message, type)

Name Type Description
message string optional
type string optional

inherited off(type, listener){Mobizen.Event}

Remove a listener from the listener array for the specified event. Caution: changes array indices in the listener array behind the listener.

Calling .off() with no arguments removes all handlers attached to the elements. if use one argument those of the specified event. It's not a good idea to remove listeners that were added elsewhere in the code, especially when it's on an emitter that you didn't create (e.g. sockets or file streams).

Name Type Description
type string optional

type of event

listener function optional

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.

inherited on(type, listener){Mobizen.Event}

Adds a listener to the end of the listeners array for the specified event. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of event and listener will result in the listener being added multiple times.

Name Type Description
type string

type of event

listener function

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.

inherited once(type, listener){Mobizen.Event}

Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.

Name Type Description
type string

type of event

listener function

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.

inherited pipe(dest, always){Mobizen.Event}

This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.

Name Type Description
dest Mobizen.Event

destination

always boolean optional
Returns:
Type Description
Mobizen.Event dest emitter, so calls can be chained.
Example
A.pipe(B).pipe(C);

inherited post(url, params, failure){XMLHttpRequest}

Send data transfer to api server

Name Type Description
url string
params object
failure function optional

failure callback

Returns:
Type Description
XMLHttpRequest XHR of jQuery

inherited requires(sources, success, failure)

Async static files loading:

  • Support file formats is css, js and html.
  • The path name must be in all lowercase letters.
  • Available paths of html files are located:

    win, body, header, contents, modules, menu, toolbar, apps, device, notify

Name Type Description
sources array.<filePath>

path of files

success function optional

success callback

failure function optional

failure callback

Example
mobizen.requires([
    '/css/modules/photos.css'
  , '/modules/photos.html'
  , '/toolbar/photos.html'
  , '/toolbar/photos.detail.html'
  , '/js/libs/masonry.js'
  , '/js/apps/cursor.js'
  , '/js/apps/photo-viewer.js'
], function() {
  // On load success
}, function() {
  // On load failure
});

room()

start(params)

Name Type Description
params object
Fires:

inherited storage(name, key, val){*}

Name Type Description
name string
key string optional
val * optional
Returns:
Type Description
* excuted result

terminate(callback)

Name Type Description
callback function

inherited virtual unpipe(dest){Mobizen.Event}

This method will remove the hooks set up for a previous pipe() call. If the destination is not specified, then all pipes are removed. If the destination is specified, but no pipe is set up for it, then this is a no-op.

Name Type Description
dest Mobizen.Event

destination

Returns:
Type Description
Mobizen.Event dest emitter, so calls can be chained.

inherited version(){string}

Returns:
Type Description
string current version

inner onauthenticating()

Listens to Events:

inner onconnected()

Listens to Events:

inner onconnecterror(message)

Name Type Description
message string
Fires:
Listens to Events:

inner onconnecting()

Listens to Events:

inner ondisconnected()

Listens to Events:

inner onreconnecting(data)

Name Type Description
data object
Listens to Events:
  • Mobizen#event:reconnecting

Events

Type:
Type:
Type:
Type:
Name Type Description
message string

inherited disconnected

Type:
comments powered by Disqus