NetServices: Implement asynchronous status update messages.

The integration PostTest has a basic test that the expected messages are sent and
have the expected data fields. The gist is documented in book.dox.

To do are the messages around SSL. However, that functionality is also not
implemented yet, so there is nothing to send.

Change-Id: Ib8f36ed32f9854d643d8256338b71af7067059f0
This commit is contained in:
Niels Sascha Reedijk
2022-07-24 08:56:02 +01:00
parent b74e852fd9
commit 60355daec9
8 changed files with 661 additions and 70 deletions
@@ -48,6 +48,23 @@ private:
};
namespace UrlEvent {
enum {
HttpStatus = '_HST',
HttpFields = '_HHF',
CertificateError = '_CER',
HttpRedirect = '_HRE'
};
}
namespace UrlEventData {
extern const char* HttpStatusCode;
extern const char* SSLCertificate;
extern const char* SSLMessage;
extern const char* HttpRedirectUrl;
}
} // namespace Network
} // namespace BPrivate
@@ -78,6 +78,30 @@ private:
BString encode_to_base64(const BString& string);
namespace UrlEvent {
enum {
HostNameResolved = '_NHR',
ConnectionOpened = '_NCO',
UploadProgress = '_NUP',
ResponseStarted = '_NRS',
DownloadProgress = '_NDP',
BytesWritten = '_NBW',
RequestCompleted = '_NRC',
DebugMessage = '_NDB'
};
}
namespace UrlEventData {
extern const char* Id;
extern const char* HostName;
extern const char* NumBytes;
extern const char* TotalBytes;
extern const char* Success;
extern const char* DebugType;
extern const char* DebugMessage;
}
}
}