publish final code
Dependencies: Pubnub_c_core_mbed2_pal2
Fork of Pubnub_mbed2_sync by
pubnub_sync.h@2:4d49720c7200, 2016-11-11 (annotated)
- Committer:
- sveljko
- Date:
- Fri Nov 11 22:46:57 2016 +0000
- Revision:
- 2:4d49720c7200
- Parent:
- 0:243e0d70a1d5
Added the module/function to srand() using the time returned from Pubnub's `time` operation (which can be started with pubnub_time())
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sveljko | 0:243e0d70a1d5 | 1 | /* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */ |
sveljko | 0:243e0d70a1d5 | 2 | #if !defined INC_PUBNUB_MBED_SYNC |
sveljko | 0:243e0d70a1d5 | 3 | #define INC_PUBNUB_MBED_SYNC |
sveljko | 0:243e0d70a1d5 | 4 | |
sveljko | 0:243e0d70a1d5 | 5 | /** @mainpage The MBed Pubnub client library - sync interface |
sveljko | 0:243e0d70a1d5 | 6 | |
sveljko | 0:243e0d70a1d5 | 7 | This is the "sync" interface of the Pubnub client library for |
sveljko | 0:243e0d70a1d5 | 8 | MBed. |
sveljko | 0:243e0d70a1d5 | 9 | |
sveljko | 0:243e0d70a1d5 | 10 | The "sync" interface has these characteristics: |
sveljko | 0:243e0d70a1d5 | 11 | - There is no "callback" on the end of a transaction. Instead, |
sveljko | 0:243e0d70a1d5 | 12 | you should check (via pubnub_last_result()) to see if the |
sveljko | 0:243e0d70a1d5 | 13 | transaction completed, or if you don't need to do anything |
sveljko | 0:243e0d70a1d5 | 14 | else on the thread until the transaction is completed (including |
sveljko | 0:243e0d70a1d5 | 15 | possible thread shutdown), you can call pubnub_await() which |
sveljko | 0:243e0d70a1d5 | 16 | will do it for you (and return the final result). |
sveljko | 0:243e0d70a1d5 | 17 | |
sveljko | 0:243e0d70a1d5 | 18 | You can have multiple pubnub contexts established; in each |
sveljko | 0:243e0d70a1d5 | 19 | context, at most one Pubnub API call/transaction may be ongoing |
sveljko | 0:243e0d70a1d5 | 20 | (typically a "publish" or a "subscribe"). |
sveljko | 0:243e0d70a1d5 | 21 | |
sveljko | 0:243e0d70a1d5 | 22 | */ |
sveljko | 0:243e0d70a1d5 | 23 | |
sveljko | 0:243e0d70a1d5 | 24 | /** @file pubnub_sync.h */ |
sveljko | 0:243e0d70a1d5 | 25 | |
sveljko | 0:243e0d70a1d5 | 26 | #include "pubnub_config.h" |
sveljko | 0:243e0d70a1d5 | 27 | |
sveljko | 0:243e0d70a1d5 | 28 | /* -- You should not change anything below this line -- */ |
sveljko | 0:243e0d70a1d5 | 29 | |
sveljko | 0:243e0d70a1d5 | 30 | #include "pubnub_alloc.h" |
sveljko | 0:243e0d70a1d5 | 31 | #include "pubnub_assert.h" |
sveljko | 0:243e0d70a1d5 | 32 | #include "pubnub_coreapi.h" |
sveljko | 0:243e0d70a1d5 | 33 | #include "pubnub_ntf_sync.h" |
sveljko | 2:4d49720c7200 | 34 | #include "pubnub_generate_uuid.h" |
sveljko | 0:243e0d70a1d5 | 35 | #include "pubnub_blocking_io.h" |
sveljko | 0:243e0d70a1d5 | 36 | |
sveljko | 0:243e0d70a1d5 | 37 | |
sveljko | 0:243e0d70a1d5 | 38 | #endif /* !defined INC_PUBNUB_MBED_SYNC */ |