xref: /haiku/src/apps/haikudepot/server/ServerHelper.h (revision 2897df967633aab846ff4917b53e2af7d1e54eeb)
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 
6 #ifndef SERVER_HELPER_H
7 #define SERVER_HELPER_H
8 
9 #include <HttpHeaders.h>
10 
11 
12 class BMessage;
13 
14 
15 class ServerHelper {
16 public:
17 		static bool						IsNetworkAvailable();
18 		static bool						IsPlatformNetworkAvailable();
19 
20 		static void						NotifyClientTooOld(
21 											const BHttpHeaders& responseHeaders
22 											);
23 		static void						AlertClientTooOld(BMessage* message);
24 
25 		static void						NotifyTransportError(status_t error);
26 		static void						AlertTransportError(BMessage* message);
27 
28 		static void						NotifyServerJsonRpcError(
29 											BMessage& error);
30 		static void						AlertServerJsonRpcError(
31 											BMessage* message);
32 };
33 
34 #endif // SERVER_HELPER_H
35