1 : // Copyright 2015 Google Inc. All Rights Reserved.
2 : //
3 : // Licensed under the Apache License, Version 2.0 (the "License");
4 : // you may not use this file except in compliance with the License.
5 : // You may obtain a copy of the License at
6 : //
7 : // http://www.apache.org/licenses/LICENSE-2.0
8 : //
9 : // Unless required by applicable law or agreed to in writing, software
10 : // distributed under the License is distributed on an "AS IS" BASIS,
11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 : // See the License for the specific language governing permissions and
13 : // limitations under the License.
14 :
15 : #ifndef SYZYGY_KASKO_CLIENT_H_
16 : #define SYZYGY_KASKO_CLIENT_H_
17 :
18 : #include "base/macros.h"
19 : #include "base/strings/string16.h"
20 :
21 m : namespace kasko {
22 :
23 m : struct MinidumpRequest;
24 :
25 : // Implements the client process lifetime. Holds configuration and provides an
26 : // API for triggering a diagnostic report of the current process..
27 m : class Client {
28 m : public:
29 : // Instantiates a diagnostic reporting client.
30 : // @param endpoint_name The RPC endpoint name shared with the reporter
31 : // process.
32 m : explicit Client(const base::string16& endpoint);
33 :
34 m : ~Client();
35 :
36 : // Sends a diagnostic report for the current process.
37 : // @param request The report parameters.
38 m : void SendReport(const MinidumpRequest& request) const;
39 :
40 m : private:
41 : // The RPC endpoint name shared with the reporter process.
42 m : const base::string16 endpoint_;
43 :
44 m : DISALLOW_COPY_AND_ASSIGN(Client);
45 m : };
46 :
47 m : } // namespace kasko
48 :
49 : #endif // SYZYGY_KASKO_CLIENT_H_
|