JSDoc: Class: Message

# Class: Message

## jsxc.Message(uid)

#### new Message(uid)

Load message object with given uid.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uid` | string | Unified identifier from message object

Source:
  - jsxc.lib.Message.js, line 1

### Members

#### (static, constant) IN :string

##### Type:

- string

Default Value:
  - in
Source:
  - jsxc.lib.Message.js, line 254

#### (static, constant) OUT :string

##### Type:

- string

Default Value:
  - out
Source:
  - jsxc.lib.Message.js, line 261

#### (static, constant) PROBABLY_OUT :string

##### Type:

- string

Default Value:
  - probably_out
Source:
  - jsxc.lib.Message.js, line 268

#### (static, constant) SYS :string

##### Type:

- string

Default Value:
  - sys
Source:
  - jsxc.lib.Message.js, line 275

#### _received :boolean

##### Type:

- boolean

Source:
  - jsxc.lib.Message.js, line 34

#### _uid :string

##### Type:

- string

Source:
  - jsxc.lib.Message.js, line 31

#### encrypted :boolean

##### Type:

- boolean

Source:
  - jsxc.lib.Message.js, line 37

#### forwarded :boolean

##### Type:

- boolean

Source:
  - jsxc.lib.Message.js, line 40

#### stamp :integer

##### Type:

- integer

Source:
  - jsxc.lib.Message.js, line 43

### Methods

#### (static) delete(uid)

Remove message with uid.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uid` | string | message uid

Source:
  - jsxc.lib.Message.js, line 213

#### (static) getDOM(uid) → {jQuery}

Returns message object as jquery object.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uid` | string | message uid

Source:
  - jsxc.lib.Message.js, line 239

##### Returns:

jQuery representation in DOM

Type
  jQuery

#### delete()

Remove object from storage.

Source:
  - jsxc.lib.Message.js, line 170

#### getDOM() → {jQuery}

Returns object as jquery object.

Source:
  - jsxc.lib.Message.js, line 180

##### Returns:

Representation in DOM

Type
  jQuery

#### isReceived() → {boolean}

Returns true if the message was already received.

Source:
  - jsxc.lib.Message.js, line 202

##### Returns:

true means received

Type
  boolean

#### load(uid)

Load message properties.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uid` | string |

Source:
  - jsxc.lib.Message.js, line 66

#### received()

Mark message as received.

Source:
  - jsxc.lib.Message.js, line 189

#### save() → {Message}

Save message properties and create thumbnail.

Source:
  - jsxc.lib.Message.js, line 82

##### Returns:

this object

Type
  Message

## jsxc.Message(args)

#### new Message(args)

Create new message object.

##### Parameters:

Name | Type | Description
--- | --- | ---
`args` | object | New message properties ###### Properties
Name | Type | Description
--- | --- | ---
`bid` | string |
`direction` | direction |
`msg` | string |
`encrypted` | boolean |
`forwarded` | boolean |
`sender` | boolean |
`stamp` | integer |
`attachment` | object | Attached data ###### Properties
Name | Type | Description
--- | --- | ---
`name` | string | File name
`size` | string | File size
`type` | string | File type
`data` | string | File data

Source:
  - jsxc.lib.Message.js, line 8

### Members

#### (static, constant) IN :string

##### Type:

- string

Default Value:
  - in
Source:
  - jsxc.lib.Message.js, line 254

#### (static, constant) OUT :string

##### Type:

- string

Default Value:
  - out
Source:
  - jsxc.lib.Message.js, line 261

#### (static, constant) PROBABLY_OUT :string

##### Type:

- string

Default Value:
  - probably_out
Source:
  - jsxc.lib.Message.js, line 268

#### (static, constant) SYS :string

##### Type:

- string

Default Value:
  - sys
Source:
  - jsxc.lib.Message.js, line 275

#### _received :boolean

##### Type:

- boolean

Source:
  - jsxc.lib.Message.js, line 34

#### _uid :string

##### Type:

- string

Source:
  - jsxc.lib.Message.js, line 31

#### encrypted :boolean

##### Type:

- boolean

Source:
  - jsxc.lib.Message.js, line 37

#### forwarded :boolean

##### Type:

- boolean

Source:
  - jsxc.lib.Message.js, line 40

#### stamp :integer

##### Type:

- integer

Source:
  - jsxc.lib.Message.js, line 43

### Methods

#### (static) delete(uid)

Remove message with uid.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uid` | string | message uid

Source:
  - jsxc.lib.Message.js, line 213

#### (static) getDOM(uid) → {jQuery}

Returns message object as jquery object.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uid` | string | message uid

Source:
  - jsxc.lib.Message.js, line 239

##### Returns:

jQuery representation in DOM

Type
  jQuery

#### delete()

Remove object from storage.

Source:
  - jsxc.lib.Message.js, line 170

#### getDOM() → {jQuery}

Returns object as jquery object.

Source:
  - jsxc.lib.Message.js, line 180

##### Returns:

Representation in DOM

Type
  jQuery

#### isReceived() → {boolean}

Returns true if the message was already received.

Source:
  - jsxc.lib.Message.js, line 202

##### Returns:

true means received

Type
  boolean

#### load(uid)

Load message properties.

##### Parameters:

Name | Type | Description
--- | --- | ---
`uid` | string |

Source:
  - jsxc.lib.Message.js, line 66

#### received()

Mark message as received.

Source:
  - jsxc.lib.Message.js, line 189

#### save() → {Message}

Save message properties and create thumbnail.

Source:
  - jsxc.lib.Message.js, line 82

##### Returns:

this object

Type
  Message