Class: Mobizen

Mobizen

Document a namespace object of Mobizen.

global new Mobizen()

A Base Class of Mobizen

Version:
  • 2.15.0.1
Author:

Extends

Requires

Classes

Apps
Device
Event
Socket
Tools
UI

Members

static,constant Mobizen.CHANGES array.<{type: string, ver: string, msg: string}>

Change log of Mobizen Web Client

Example
CHANGES: [
  {type: 'ADDED',   ver: '2.16.0.2', msg: 'the new modules for Documents and Meeting'},
  {type: 'ADDED',   ver: '2.15.0.1', msg: 'a way of screen display using openGL'},
  {type: 'ADDED',   ver: '2.15.0.1', msg: 'the simple login mode'},
  ...
]

static,constant Mobizen.DEBUG boolean

Debugging flag

static,constant Mobizen.PROGRESS string

Working progress of Milestone

static,constant Mobizen.REVISION string

Revision of Mobizen Web Client

apps object

booted boolean

devel string

env string

hostname string

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

provider string

reconnectDelay number

reconnected boolean

Type Definitions

static Mobizen.Compare(version, depth){number}

Version Compare

Name Type Description
version string

version text

depth string optional

depth of comparing

Returns:
Type Description
number offset

static Mobizen.I18n(source, data, pre){string}

Internationalization Translater

Name Type Description
source string

resource key or template

data object optional

resource object

pre boolean optional

stopping deep search

Returns:
Type Description
string translateed string
Example
i18n('&lt;a href="{link}">{text}&lt;/a>', {
  link: "https://mobizen.com",
  text: "mobizen.com"
});
//=> &lt;a href="https://mobizen.com">mobizen.com&lt;/a>

static Mobizen.I18n.engine(source, data, keep){string}

Name Type Description
source string

source text

data object

dictionary data

keep boolean optional

keep resource key of not founded

Returns:
Type Description
string replaced string

static Mobizen.I18n.pattern RegExp

A regular expression pattern of template

static Mobizen.I18n.search(key, data){string}

Name Type Description
key string

resource key

data object

dictionary data

Returns:
Type Description
string finded resource

static Mobizen.Inherits(ctor, superCtor, proto)

Class Inherits

Name Type Description
ctor Constructor

constructor

superCtor Constructor

super constructor

proto Prototype optional

constructor.prototype

static Mobizen.Log(message)

Debug Logger

Name Type Description
message string

static Mobizen.Platform AgentInfo

Instance of AgentInfo

Properties:
Name Type Description
majorVersion number
isMac boolean
isWin boolean
isIOS boolean
isIPhone boolean
isAndroid boolean
isHPTablet boolean
isPlaybook boolean
isChromeOS boolean
isSurface boolean
isMobile boolean
isFirefox boolean
isOpera boolean
isChrome boolean
isSafari boolean
isMSIE boolean
isEDGE boolean
isRetina; boolean

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

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

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

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.

inherited listeners(type){array}

Name Type Description
type string

type of event

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

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

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

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

storage(name, key, val){*}

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

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.

version(){string}

Returns:
Type Description
string current version

inner accept(val){object}

Name Type Description
val *
Returns:
Type Description
object cloned object

inner parseParams(query){object}

Name Type Description
query string

query string

Returns:
Type Description
object params object

inner term(item){boolean}

Name Type Description
item *
Returns:
Type Description
boolean passed

Events

authenticating

Type:
Listeners of This Event:
Type:
Listeners of This Event:

connecting

Type:
Listeners of This Event:

connect․error

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

disconnected

Type:
Listeners of This Event:
comments powered by Disqus