The Pubnub C-core library. It's home is on https://github.com/pubnub/c_core, this is a copy

Dependents:   Pubnub_c_core_mbed2_pal Pubnub_c_core_mbed2_pal Pubnub_c_core_mbed2_pal2

Committer:
sveljko
Date:
Tue Nov 22 22:21:39 2016 +0000
Revision:
2:d85e42c1125d
Added `pubnub_helper` module

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sveljko 2:d85e42c1125d 1 /* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */
sveljko 2:d85e42c1125d 2 #if !defined INC_PUBNUB_HELPER
sveljko 2:d85e42c1125d 3 #define INC_PUBNUB_HELPER
sveljko 2:d85e42c1125d 4
sveljko 2:d85e42c1125d 5
sveljko 2:d85e42c1125d 6 #include "pubnub_api_types.h"
sveljko 2:d85e42c1125d 7
sveljko 2:d85e42c1125d 8
sveljko 2:d85e42c1125d 9 /** @file pubnub_helper.h
sveljko 2:d85e42c1125d 10 This is a set of "Helper" functions of the Pubnub client library.
sveljko 2:d85e42c1125d 11 You don't need this to work with Pubnub client, but they may come
sveljko 2:d85e42c1125d 12 in handy.
sveljko 2:d85e42c1125d 13 */
sveljko 2:d85e42c1125d 14
sveljko 2:d85e42c1125d 15
sveljko 2:d85e42c1125d 16 /** Possible (known) publish results (outcomes) in the description
sveljko 2:d85e42c1125d 17 received from Pubnub.
sveljko 2:d85e42c1125d 18 */
sveljko 2:d85e42c1125d 19 enum pubnub_publish_res {
sveljko 2:d85e42c1125d 20 /** Publish succeeded, message sent on the channel */
sveljko 2:d85e42c1125d 21 PNPUB_SENT,
sveljko 2:d85e42c1125d 22 /** Publish failed, the message had invalid JSON */
sveljko 2:d85e42c1125d 23 PNPUB_INVALID_JSON,
sveljko 2:d85e42c1125d 24 /** Publish failed, the channel had an invalid character in the name */
sveljko 2:d85e42c1125d 25 PNPUB_INVALID_CHAR_IN_CHAN_NAME,
sveljko 2:d85e42c1125d 26 /** The publishing quota for this account was exceeded */
sveljko 2:d85e42c1125d 27 PNPUB_ACCOUNT_QUOTA_EXCEEDED,
sveljko 2:d85e42c1125d 28 /** Message is too large to be published */
sveljko 2:d85e42c1125d 29 PNPUB_MESSAGE_TOO_LARGE,
sveljko 2:d85e42c1125d 30 /** Publish failed, but we were not able to parse the error description */
sveljko 2:d85e42c1125d 31 PNPUB_UNKNOWN_ERROR,
sveljko 2:d85e42c1125d 32 };
sveljko 2:d85e42c1125d 33
sveljko 2:d85e42c1125d 34 /** Parses the given publish @p result. You usually obtain this with
sveljko 2:d85e42c1125d 35 pubnub_last_publish_result().
sveljko 2:d85e42c1125d 36 */
sveljko 2:d85e42c1125d 37 enum pubnub_publish_res pubnub_parse_publish_result(char const *result);
sveljko 2:d85e42c1125d 38
sveljko 2:d85e42c1125d 39 /** Returns a string (in English) describing a Pubnub result enum value
sveljko 2:d85e42c1125d 40 @p e.
sveljko 2:d85e42c1125d 41 */
sveljko 2:d85e42c1125d 42 char const* pubnub_res_2_string(enum pubnub_res e);
sveljko 2:d85e42c1125d 43
sveljko 2:d85e42c1125d 44
sveljko 2:d85e42c1125d 45 #endif /* defined INC_PUBNUB_HELPER */