blob: 9fea076feebda68afc47a9d3ee72692ffc6533f6 [file] [log] [blame]
Alex Deymo44666f92014-07-22 20:29:24 -07001// Copyright 2014 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UPDATE_ENGINE_GLIB_UTILS_H_
6#define UPDATE_ENGINE_GLIB_UTILS_H_
7
8#include <string>
9
10#include <glib.h>
11
12namespace chromeos_update_engine {
13namespace utils {
14
15// Returns the error message, if any, from a GError pointer. Frees the GError
16// object and resets error to NULL.
17std::string GetAndFreeGError(GError** error);
18
19} // namespace utils
20} // namespace chromeos_update_engine
21
22#endif // UPDATE_ENGINE_GLIB_UTILS_H_