1 : // Copyright 2014 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_SERVICE_H_
16 : #define SYZYGY_KASKO_SERVICE_H_
17 :
18 : #include <stdint.h>
19 :
20 : #include <map>
21 :
22 : #include "base/process/process_handle.h"
23 : #include "base/strings/string16.h"
24 : #include "base/threading/platform_thread.h"
25 : #include "syzygy/kasko/minidump_type.h"
26 :
27 : namespace kasko {
28 :
29 : // Defines an RPC-agnostic implementation of the methods exposed by the Kasko
30 : // RPC service.
31 : class Service {
32 : public:
33 E : virtual ~Service() {}
34 :
35 : // Responds to a request to send a diagnostic report.
36 : // @param client_process_id The process to be reported on.
37 : // @param exception_info_address An optional address (in the target process
38 : // memory space) of an EXCEPTION_POINTERS structure.
39 : // @param thread_id The (optional) faulting thread in the target process.
40 : // @param protobuf An optional protobuf to be included in the report.
41 : // @param protobuf_length The length of the protobuf.
42 : // @param crash_keys Crash keys to be included in the report.
43 : virtual void SendDiagnosticReport(
44 : base::ProcessId client_process_id,
45 : uint64_t exception_info_address,
46 : base::PlatformThreadId thread_id,
47 : MinidumpType minidump_type,
48 : const char* protobuf,
49 : size_t protobuf_length,
50 : const std::map<base::string16, base::string16>& crash_keys) = 0;
51 : };
52 :
53 : } // namespace kasko
54 :
55 : #endif // SYZYGY_KASKO_SERVICE_H_
|