xref: /haiku/src/apps/haikudepot/server/ServerHelper.h (revision 5ac9b506412b11afb993bb52d161efe7666958a5)
1 /*
2  * Copyright 2017-2018, Andrew Lindesay <apl@lindesay.co.nz>.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef SERVER_HELPER_H
6 #define SERVER_HELPER_H
7 
8 #include <HttpHeaders.h>
9 
10 
11 class BMessage;
12 
13 
14 class ServerHelper {
15 public:
16 	static	bool						IsNetworkAvailable();
17 	static	bool						IsPlatformNetworkAvailable();
18 
19 	static	void						NotifyClientTooOld(
20 											const BHttpHeaders& responseHeaders
21 											);
22 	static	void						AlertClientTooOld(BMessage* message);
23 
24 	static	void						NotifyTransportError(status_t error);
25 	static	void						AlertTransportError(BMessage* message);
26 
27 	static	void						NotifyServerJsonRpcError(
28 											BMessage& error);
29 	static	void						AlertServerJsonRpcError(
30 											BMessage* message);
31 };
32 
33 #endif // SERVER_HELPER_H
34