Liking cljdoc? Tell your friends :D

chromex.ext.gcm

clj

Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service.

Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service.

* available since Chrome 35
* https://developer.chrome.com/extensions/gcm
raw docstring

api-tableclj

source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-max-message-sizeclj/smacro

(get-max-message-size)

The maximum size (in bytes) of all key/value pairs in a message.

https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE.

The maximum size (in bytes) of all key/value pairs in a message.

https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE.
sourceraw docstring

max-message-size*cljs

(max-message-size* config)
source

on-message*cljs

(on-message* config channel & args)
source

on-messages-deleted*cljs

(on-messages-deleted* config channel & args)
source

on-send-error*cljs

(on-send-error* config channel & args)
source

registerclj/smacro

(register sender-ids)

Registers the application with GCM. The registration ID will be returned by the callback. If register is called again with the same list of senderIds, the same registration ID will be returned.

|sender-ids| - A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [registration-id] where:

|registration-id| - A registration ID assigned to the application by the GCM.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/extensions/gcm#method-register.

Registers the application with GCM. The registration ID will be returned by the callback. If register is called again with
the same list of senderIds, the same registration ID will be returned.

  |sender-ids| - A list of server IDs that are allowed to send messages to the application. It should contain at least
                 one and no more than 100 sender IDs.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [registration-id] where:

  |registration-id| - A registration ID assigned to the application by the GCM.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/extensions/gcm#method-register.
sourceraw docstring

register*cljs

(register* config sender-ids)
source

sendclj/smacro

(send message)

Sends a message according to its contents.

|message| - A message to send to the other party via GCM.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [message-id] where:

|message-id| - The ID of the message that the callback was issued for.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/extensions/gcm#method-send.

Sends a message according to its contents.

  |message| - A message to send to the other party via GCM.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [message-id] where:

  |message-id| - The ID of the message that the callback was issued for.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/extensions/gcm#method-send.
sourceraw docstring

send*cljs

(send* config message)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.ext.gcm namespace.

Taps all valid non-deprecated events in chromex.ext.gcm namespace.
sourceraw docstring

tap-on-message-eventsclj/smacro

(tap-on-message-events channel & args)

Fired when a message is received through GCM.

Events will be put on the |channel| with signature [::on-message [message]] where:

|message| - A message received from another party via GCM.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/gcm#event-onMessage.

Fired when a message is received through GCM.

Events will be put on the |channel| with signature [::on-message [message]] where:

  |message| - A message received from another party via GCM.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/gcm#event-onMessage.
sourceraw docstring

tap-on-messages-deleted-eventsclj/smacro

(tap-on-messages-deleted-events channel & args)

Fired when a GCM server had to delete messages sent by an app server to the application. See Messages deleted event section of Cloud Messaging documentation for details on handling this event.

Events will be put on the |channel| with signature [::on-messages-deleted []].

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted.

Fired when a GCM server had to delete messages sent by an app server to the application. See Messages deleted event section
of Cloud Messaging documentation for details on handling this event.

Events will be put on the |channel| with signature [::on-messages-deleted []].

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted.
sourceraw docstring

tap-on-send-error-eventsclj/smacro

(tap-on-send-error-events channel & args)

Fired when it was not possible to send a message to the GCM server.

Events will be put on the |channel| with signature [::on-send-error [error]] where:

|error| - An error that occured while trying to send the message either in Chrome or on the GCM server. Application can retry sending the message with a reasonable backoff and possibly longer time-to-live.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/gcm#event-onSendError.

Fired when it was not possible to send a message to the GCM server.

Events will be put on the |channel| with signature [::on-send-error [error]] where:

  |error| - An error that occured while trying to send the message either in Chrome or on the GCM server. Application can
            retry sending the message with a reasonable backoff and possibly longer time-to-live.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/gcm#event-onSendError.
sourceraw docstring

unregisterclj/smacro

(unregister)

Unregisters the application from GCM.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/extensions/gcm#method-unregister.

Unregisters the application from GCM.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/extensions/gcm#method-unregister.
sourceraw docstring

unregister*cljs

(unregister* config)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close