rspangler@google.com | 49fdf18 | 2009-10-10 00:57:34 +0000 | [diff] [blame] | 1 | // Copyright (c) 2009 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 | #include <stdlib.h> |
| 6 | #include <stdio.h> |
| 7 | #include <iostream> |
| 8 | #include <glib.h> |
seanparent@google.com | d2e4ccc | 2009-11-05 22:56:33 +0000 | [diff] [blame^] | 9 | #include <base/logging.h> |
rspangler@google.com | 49fdf18 | 2009-10-10 00:57:34 +0000 | [diff] [blame] | 10 | |
| 11 | #include <libxml/parser.h> |
| 12 | #include <libxml/xpath.h> |
| 13 | #include <libxml/xpathInternals.h> |
| 14 | |
| 15 | // This code runs inside the main loop |
| 16 | gboolean EntryPoint(gpointer data) { |
| 17 | GMainLoop *loop = reinterpret_cast<GMainLoop*>(data); |
| 18 | LOG(INFO) << "Chrome OS Update Engine beginning"; |
| 19 | g_main_loop_quit(loop); |
| 20 | return FALSE; |
| 21 | } |
| 22 | |
| 23 | int main(int argc, char** argv) { |
| 24 | xmlDocPtr doc = xmlNewDoc((const xmlChar*)"1.0"); |
| 25 | CHECK(doc); |
| 26 | CHECK_EQ(argc, 2); |
| 27 | printf("enc: [%s]\n", xmlEncodeEntitiesReentrant(doc, (const xmlChar*)argv[1])); |
| 28 | return 0; |
| 29 | |
| 30 | |
| 31 | GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE); |
| 32 | g_timeout_add(0, &EntryPoint, loop); |
| 33 | g_main_loop_run(loop); |
| 34 | return 0; |
| 35 | } |