Unify of the internal API of asynchronous handling


It makes sense to unify internal methods of asynchronous I/O where to each
method of start of operation corresponds the method of completion of
operation:

* startAsyncCommunication() - it is a new method which has a code relating
to the handling of the WaitCommEvent() function. It implementations is taken
directly by copy/paste with minimal modifications relating with adding of
returns a boolean values.

* _q_completeAsyncCommunication() - it is an existing method which is renamed
from the _q_canCompleteCommunication().

* startAsyncRead() - it is an existing method without modifications.

* _q_completeAsyncRead() - it is an existing method which is renamed from
the _q_canCompleteRead(). Earlier this method contained a subfunction of
the completeAsyncRead(DWORD) which is deleted now, and its code (related with
the policy processing) is moved into body of the _q_completeAsyncRead() with
the minimum modifications which do not change it behavior.

* startAsyncWrite() - it is an existing method without modifications.

* _q_completeAsyncWrite() - it is an existing method which is renamed from
the _q_canCompleteWrite(). Earlier this method contained a subfunction of
the completeAsyncWrite(DWORD) which is deleted now, and its code is moved
into body of the _q_completeAsyncWrite() without modifications.

Also in addition is added the new method emitReadyRead() and the code of
policy emulation is moved into new method emulateErrorPolicy().

Change-Id: I58345e3270d676879a16efc4b7f35f74869894d8
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
commitf404826e695c3affb684f3185d74cd3a5b31efbc
parentd5658bd0ced4a1eb0703d3cb1b566025d610fbdd
authorDenis Shienkov <denis.shienkov@gmail.com>
committerThe Qt Project <gerrit-noreply@qt-project.org>
commit timeWed, 15 Jan 2014 10:07:28 +0100