Class: Mobizen

MobizenService

global new Mobizen()

Extends

Requires

Members

inherited booted boolean

inherited devel string

downloads object

inherited env string

inherited hostname string

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

A Provider of Mobizen/Apps API

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

A provider of Mobizen/Socket API.

A Provider of Mobizen/Tools API

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(Service).connect(){Service#connect}

Returns:
Type Description
Service#connect

static Mobizen(Service).failure(service)

Name Type Description
service string

name of service

static Mobizen(Service).login(){Service#login}

Returns:
Type Description
Service#login

static Mobizen(Service).package(config)

Name Type Description
config object

static Mobizen(Service).reconnect(){Service#reconnect}

Returns:
Type Description
Service#reconnect

static Mobizen(Service).toggle()

apidoc()

build(beforeSignIn)

Name Type Description
beforeSignIn boolean

true if signin screen

connect(params, locale)

Name Type Description
params object
locale string optional

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.
Fires:

inherited listeners(type){array}

Name Type Description
type string

type of event

Returns:
Type Description
array array of listeners for the specified event.
TODO
  • dynamic skin loading
Fires:

login(res)

Name Type Description
res object

responsed data

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.

pincode(key){number}

Name Type Description
key string
Returns:
Type Description
number generated or stored pincode

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

reconnect(params, locale)

Name Type Description
params object
locale string optional

report(params, callback)

Name Type Description
params object
callback function

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
});

select(desc, list){jQueryObject}

Name Type Description
desc string

title text

list array.<Device>

device list

Returns:
Type Description
jQueryObject $dialog

session(params, callback)

Name Type Description
params object
callback function

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

success(user)

Name Type Description
user object

user data

terminate(callback)

Name Type Description
callback function optional

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.

uuid(key){string}

Name Type Description
key string
Returns:
Type Description
string generated or stored uuid

inherited version(){string}

Returns:
Type Description
string current version

inner onauthenticating()

Listens to Events:

inner onconnectauthconnecting()

Listens to Events:

inner onconnectautherror(message)

Name Type Description
message string
Listens to Events:

inner onconnectauthintegration(device)

Name Type Description
device object
Listens to Events:

inner onconnectauthpincode(device)

Name Type Description
device object
Listens to Events:

inner onconnectauthremembertoken(token)

Name Type Description
token object
Listens to Events:

inner onconnectauthreset2ndaccesscode(device)

Name Type Description
device object
Listens to Events:

inner onconnectauthset2ndaccesscode(device)

Name Type Description
device object
Listens to Events:

inner onconnectauthverification(device)

Name Type Description
device object
Listens to Events:

inner onconnectdriveravailable()

Listens to Events:

inner onconnectdriverinstalling()

Listens to Events:

inner onconnectdriversystem()

Listens to Events:

inner onconnectdriveruac()

Listens to Events:

inner onconnected()

Listens to Events:

inner onconnecterror(message)

Name Type Description
message string
Fires:
Listens to Events:

inner onconnectforward(data)

Name Type Description
data object
Listens to Events:

inner onconnectgateway()

Listens to Events:

inner onconnectgatewayping()

Listens to Events:

inner onconnectgatewaywaiting()

Listens to Events:

inner onconnecting()

Listens to Events:

inner onconnectlocal(data)

Name Type Description
data object
Listens to Events:

inner onconnectlocalerror()

Listens to Events:

inner onconnectnat()

Listens to Events:

inner onconnectscreen()

Listens to Events:

inner onconnectscreenerror()

Listens to Events:

inner ondisconnected()

Listens to Events:

inner onendloginbrowser(data)

Name Type Description
data object
Listens to Events:

inner onreconnecting(data)

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

inner uuid_(){string}

RFC4122 v4 UUID Generator

Returns:
Type Description
string generated uuid

Events

Type:
Type:
Type:

connect․auth․connecting

Type:
Listeners of This Event:

connect․auth․error

Type:
Listeners of This Event:

connect․auth․integration

Type:
Listeners of This Event:

connect․auth․pincode

Type:
Listeners of This Event:

connect․auth․rememberToken

Type:
Listeners of This Event:

connect․auth․reset2ndAccessCode

Type:
Listeners of This Event:

connect․auth․set2ndAccessCode

Type:
Listeners of This Event:

connect․auth․verification

Type:
Listeners of This Event:

connect․driver․available

Display dialog of find available driver

Type:
Listeners of This Event:

connect․driver․installing

Type:
Listeners of This Event:

connect․driver․system

Display dialog of install warning

Type:
Listeners of This Event:

connect․driver․uac

Display dialog of UAC warning

Type:
Listeners of This Event:
Type:
Name Type Description
message string

connect․forward

Type:
Listeners of This Event:

connect․gateway

Type:
Listeners of This Event:

connect․gateway․ping

Send push notification

Type:
Listeners of This Event:

connect․gateway․waiting

Processed in ping-pong of gateway server

Type:
Listeners of This Event:

connect․local

Type:
Name Type Description
data objet
Listeners of This Event:

connect․local․error

Type:
Listeners of This Event:

connect․nat

Type:
Listeners of This Event:

connect․screen

Type:
Name Type Description
device object
Listeners of This Event:

connect․screen․error

Type:
Name Type Description
data object
Listeners of This Event:

inherited disconnected

Type:
comments powered by Disqus