handler_main.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2015 The Crashpad Authors. 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. #ifndef CRASHPAD_HANDLER_HANDLER_MAIN_H_
  15. #define CRASHPAD_HANDLER_HANDLER_MAIN_H_
  16. #include "handler/user_stream_data_source.h"
  17. namespace crashpad {
  18. //! \brief The `main()` of the `crashpad_handler` binary.
  19. //!
  20. //! This is exposed so that `crashpad_handler` can be embedded into another
  21. //! binary, but called and used as if it were a standalone executable.
  22. //!
  23. //! \param[in] argc \a argc as passed to `main()`.
  24. //! \param[in] argv \a argv as passed to `main()`.
  25. //! \param[in] user_stream_sources An optional vector containing the
  26. //! extensibility data sources to call on crash. Each time a minidump is
  27. //! created, the sources are called in turn. Any streams returned are added
  28. //! to the minidump.
  29. int HandlerMain(int argc,
  30. char* argv[],
  31. const UserStreamDataSources* user_stream_sources);
  32. } // namespace crashpad
  33. #endif // CRASHPAD_HANDLER_HANDLER_MAIN_H_