libostree: Rename ostree-traverse.h into OstreeRepo namespace

This operates on the repo, it might as well be methods on it.
This commit is contained in:
Colin Walters committed 2013-07-09 19:59:39 -04:00
1 parent cb6b69616c
commit 2aa0251b1b
8 files changed
+43 -73

No files matched your search

@@ -28,7 +28,7 @@
#include "otutil.h"
GHashTable *
ostree_traverse_new_reachable (void)
ostree_repo_traverse_new_reachable (void)
{
return g_hash_table_new_full (ostree_hash_object_name, g_variant_equal,
(GDestroyNotify)g_variant_unref, NULL);
@@ -119,11 +119,11 @@ traverse_dirtree_internal (OstreeRepo *repo,
}
gboolean
ostree_traverse_dirtree (OstreeRepo *repo,
const char *dirtree_checksum,
GHashTable *inout_reachable,
GCancellable *cancellable,
GError **error)
ostree_repo_traverse_dirtree (OstreeRepo *repo,
const char *dirtree_checksum,
GHashTable *inout_reachable,
GCancellable *cancellable,
GError **error)
{
return traverse_dirtree_internal (repo, dirtree_checksum, 0,
inout_reachable, cancellable, error);
@@ -136,12 +136,12 @@ ostree_traverse_dirtree (OstreeRepo *repo,
* @commit_checksum, traversing @maxdepth parent commits.
*/
gboolean
ostree_traverse_commit (OstreeRepo *repo,
const char *commit_checksum,
int maxdepth,
GHashTable *inout_reachable,
GCancellable *cancellable,
GError **error)
ostree_repo_traverse_commit (OstreeRepo *repo,
const char *commit_checksum,
int maxdepth,
GHashTable *inout_reachable,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
gs_free char*tmp_checksum = NULL;
@@ -199,7 +199,7 @@ ostree_traverse_commit (OstreeRepo *repo,
}
tmp_checksum = ostree_checksum_from_bytes_v (content_csum_bytes);
if (!ostree_traverse_dirtree (repo, tmp_checksum, inout_reachable, cancellable, error))
if (!ostree_repo_traverse_dirtree (repo, tmp_checksum, inout_reachable, cancellable, error))
goto out;
if (maxdepth == -1 || maxdepth > 0)
+16
View File
@@ -317,5 +317,21 @@ gboolean ostree_repo_list_objects (OstreeRepo *self,
GCancellable *cancellable,
GError **error);
GHashTable *ostree_repo_traverse_new_reachable (void);
gboolean ostree_repo_traverse_dirtree (OstreeRepo *repo,
const char *commit_checksum,
GHashTable *inout_reachable,
GCancellable *cancellable,
GError **error);
gboolean ostree_repo_traverse_commit (OstreeRepo *repo,
const char *commit_checksum,
int maxdepth,
GHashTable *inout_reachable,
GCancellable *cancellable,
GError **error);
G_END_DECLS
-46
View File
@@ -1,46 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2011 Colin Walters <walters@verbum.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Author: Colin Walters <walters@verbum.org>
*/
#pragma once
#include "ostree-core.h"
#include "ostree-types.h"
G_BEGIN_DECLS
GHashTable *ostree_traverse_new_reachable (void);
gboolean ostree_traverse_dirtree (OstreeRepo *repo,
const char *commit_checksum,
GHashTable *inout_reachable,
GCancellable *cancellable,
GError **error);
gboolean ostree_traverse_commit (OstreeRepo *repo,
const char *commit_checksum,
int maxdepth,
GHashTable *inout_reachable,
GCancellable *cancellable,
GError **error);
G_END_DECLS
-1
View File
@@ -28,5 +28,4 @@
#include <ostree-repo.h>
#include <ostree-mutable-tree.h>
#include <ostree-repo-file.h>
#include <ostree-traverse.h>
#include <ostree-diff.h>