Add connection check 62/27262/28
authorMarcin Niesluchowski <m.niesluchow@samsung.com>
Mon, 15 Sep 2014 09:54:48 +0000 (11:54 +0200)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Mon, 13 Oct 2014 17:13:39 +0000 (19:13 +0200)
commitd4c58c6b56ef4e93f4f052025716b7f80f0306dd
tree4b3772557e0433ab323cda2e7e02f4592ba58967
parentedf3b9e805df58c39137ac1e50dfe17a47f6c844
Add connection check

cynara_async_check_cache should return CYNARA_API_CACHE_MISS if
disconnected.
cynara_async_create_request and cynara_async_cancel_request should try
reconnecting if disconnected and return CYNARA_API_SERVICE_NOT_AVAILABLE
on failure.
As cynara_async is connecting asynchronously, it could take connection
in progress state which is resolved in cynara_async_process and treated
as connected in other functions. As this state exists after reconnecting,
there should be no cache entries. cynara_async_process should complete
connecting if needed by waiting for write event. If connection fails in
cynara_async_process, then CYNARA_API_SERVICE_NOT_AVAILABLE should be
returned.

Change-Id: I2920f4dbd0bde3e7be74096db33f4ff465bc5028
src/client-async/CMakeLists.txt
src/client-async/callback/StatusCallback.cpp [new file with mode: 0644]
src/client-async/callback/StatusCallback.h [new file with mode: 0644]
src/client-async/logic/Logic.cpp
src/client-async/logic/Logic.h