libmongo-client 0.1.4
|
00001 /* mongo-utils.h - libmongo-client utility functions 00002 * Copyright 2011 Gergely Nagy <algernon@balabit.hu> 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00021 #ifndef LIBMONGO_CLIENT_UTILS_H 00022 #define LIBMONGO_CLIENT_UTILS_H 1 00023 00024 #include <glib.h> 00025 00026 G_BEGIN_DECLS 00027 00045 void mongo_util_oid_init (gint32 machine_id); 00046 00064 guint8 *mongo_util_oid_new (gint32 seq); 00065 00085 guint8 *mongo_util_oid_new_with_time (gint32 time, gint32 seq); 00086 00097 gchar *mongo_util_oid_as_string (const guint8 *oid); 00098 00114 gboolean mongo_util_parse_addr (const gchar *addr, gchar **host, 00115 gint *port); 00116 00119 G_END_DECLS 00120 00121 #endif