blob: 0c941ca985695cc362c9a415b643bbc832f279cb [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
Alex Vakulenko88b591f2014-08-28 16:48:57 -070016// object and resets error to null.
Alex Deymo44666f92014-07-22 20:29:24 -070017std::string GetAndFreeGError(GError** error);
18
19} // namespace utils
20} // namespace chromeos_update_engine
21
22#endif // UPDATE_ENGINE_GLIB_UTILS_H_