Alex Deymo | 44666f9 | 2014-07-22 20:29:24 -0700 | [diff] [blame^] | 1 | // 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 | |
| 12 | namespace chromeos_update_engine { |
| 13 | namespace utils { |
| 14 | |
| 15 | // Returns the error message, if any, from a GError pointer. Frees the GError |
| 16 | // object and resets error to NULL. |
| 17 | std::string GetAndFreeGError(GError** error); |
| 18 | |
| 19 | } // namespace utils |
| 20 | } // namespace chromeos_update_engine |
| 21 | |
| 22 | #endif // UPDATE_ENGINE_GLIB_UTILS_H_ |