mirror of
https://github.com/ostreedev/ostree.git
synced 2025-02-03 17:47:40 +03:00
Strip the libostree docs
See previous: it's a license complication.
This commit is contained in:
parent
ee897f09c5
commit
19592ec687
@ -25,10 +25,6 @@ glib_wrapper! {
|
||||
}
|
||||
|
||||
impl AsyncProgress {
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// A new progress object
|
||||
pub fn new() -> AsyncProgress {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ostree_async_progress_new())
|
||||
@ -46,32 +42,12 @@ impl Default for AsyncProgress {
|
||||
}
|
||||
}
|
||||
|
||||
/// Trait containing all `AsyncProgress` methods.
|
||||
///
|
||||
/// # Implementors
|
||||
///
|
||||
/// [`AsyncProgress`](struct.AsyncProgress.html)
|
||||
pub trait AsyncProgressExt {
|
||||
/// Process any pending signals, ensuring the main context is cleared
|
||||
/// of sources used by this object. Also ensures that no further
|
||||
/// events will be queued.
|
||||
fn finish(&self);
|
||||
|
||||
//#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
||||
//fn get(&self, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
|
||||
|
||||
/// Get the human-readable status string from the `AsyncProgress`. This
|
||||
/// operation is thread-safe. The retuned value may be `None` if no status is
|
||||
/// set.
|
||||
///
|
||||
/// This is a convenience function to get the well-known `status` key.
|
||||
///
|
||||
/// Feature: `v2017_6`
|
||||
///
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// the current status, or `None` if none is set
|
||||
#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
||||
fn get_status(&self) -> Option<String>;
|
||||
|
||||
@ -79,33 +55,12 @@ pub trait AsyncProgressExt {
|
||||
|
||||
fn get_uint64(&self, key: &str) -> u64;
|
||||
|
||||
/// Look up a key in the `AsyncProgress` and return the `glib::Variant` associated
|
||||
/// with it. The lookup is thread-safe.
|
||||
///
|
||||
/// Feature: `v2017_6`
|
||||
///
|
||||
/// ## `key`
|
||||
/// a key to look up
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// value for the given `key`, or `None` if
|
||||
/// it was not set
|
||||
#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
||||
fn get_variant(&self, key: &str) -> Option<glib::Variant>;
|
||||
|
||||
//#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
||||
//fn set(&self, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
|
||||
|
||||
/// Set the human-readable status string for the `AsyncProgress`. This
|
||||
/// operation is thread-safe. `None` may be passed to clear the status.
|
||||
///
|
||||
/// This is a convenience function to set the well-known `status` key.
|
||||
///
|
||||
/// Feature: `v2017_6`
|
||||
///
|
||||
/// ## `status`
|
||||
/// new status string, or `None` to clear the status
|
||||
#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
||||
fn set_status<'a, P: Into<Option<&'a str>>>(&self, status: P);
|
||||
|
||||
@ -113,23 +68,9 @@ pub trait AsyncProgressExt {
|
||||
|
||||
fn set_uint64(&self, key: &str, value: u64);
|
||||
|
||||
/// Assign a new `value` to the given `key`, replacing any existing value. The
|
||||
/// operation is thread-safe. `value` may be a floating reference;
|
||||
/// `glib::Variant::ref_sink` will be called on it.
|
||||
///
|
||||
/// Any watchers of the `AsyncProgress` will be notified of the change if
|
||||
/// `value` differs from the existing value for `key`.
|
||||
///
|
||||
/// Feature: `v2017_6`
|
||||
///
|
||||
/// ## `key`
|
||||
/// a key to set
|
||||
/// ## `value`
|
||||
/// the value to assign to `key`
|
||||
#[cfg(any(feature = "v2017_6", feature = "dox"))]
|
||||
fn set_variant(&self, key: &str, value: &glib::Variant);
|
||||
|
||||
/// Emitted when `self_` has been changed.
|
||||
fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
}
|
||||
|
||||
|
@ -22,21 +22,6 @@ glib_wrapper! {
|
||||
}
|
||||
|
||||
impl CollectionRef {
|
||||
/// Create a new `CollectionRef` containing (`collection_id`, `ref_name`). If
|
||||
/// `collection_id` is `None`, this is equivalent to a plain ref name string (not a
|
||||
/// refspec; no remote name is included), which can be used for non-P2P
|
||||
/// operations.
|
||||
///
|
||||
/// Feature: `v2018_6`
|
||||
///
|
||||
/// ## `collection_id`
|
||||
/// a collection ID, or `None` for a plain ref
|
||||
/// ## `ref_name`
|
||||
/// a ref name
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// a new `CollectionRef`
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
pub fn new<'a, P: Into<Option<&'a str>>>(collection_id: P, ref_name: &str) -> CollectionRef {
|
||||
let collection_id = collection_id.into();
|
||||
@ -46,14 +31,6 @@ impl CollectionRef {
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a copy of the given `self`.
|
||||
///
|
||||
/// Feature: `v2018_6`
|
||||
///
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// a newly allocated copy of `self`
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
pub fn dup(&self) -> Option<CollectionRef> {
|
||||
unsafe {
|
||||
@ -61,18 +38,6 @@ impl CollectionRef {
|
||||
}
|
||||
}
|
||||
|
||||
/// Copy an array of `OstreeCollectionRefs`, including deep copies of all its
|
||||
/// elements. `refs` must be `None`-terminated; it may be empty, but must not be
|
||||
/// `None`.
|
||||
///
|
||||
/// Feature: `v2018_6`
|
||||
///
|
||||
/// ## `refs`
|
||||
/// `None`-terminated array of `OstreeCollectionRefs`
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// a newly allocated copy of `refs`
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
pub fn dupv(refs: &[&CollectionRef]) -> Vec<CollectionRef> {
|
||||
unsafe {
|
||||
@ -80,19 +45,6 @@ impl CollectionRef {
|
||||
}
|
||||
}
|
||||
|
||||
/// Compare `ref1` and `ref2` and return `true` if they have the same collection ID and
|
||||
/// ref name, and `false` otherwise. Both `ref1` and `ref2` must be non-`None`.
|
||||
///
|
||||
/// Feature: `v2018_6`
|
||||
///
|
||||
/// ## `ref1`
|
||||
/// an `CollectionRef`
|
||||
/// ## `ref2`
|
||||
/// another `CollectionRef`
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// `true` if `ref1` and `ref2` are equal, `false` otherwise
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
fn equal<'a, P: Into<Option<&'a CollectionRef>>>(&self, ref2: P) -> bool {
|
||||
unsafe {
|
||||
@ -100,13 +52,6 @@ impl CollectionRef {
|
||||
}
|
||||
}
|
||||
|
||||
/// Free the given array of `refs`, including freeing all its elements. `refs`
|
||||
/// must be `None`-terminated; it may be empty, but must not be `None`.
|
||||
///
|
||||
/// Feature: `v2018_6`
|
||||
///
|
||||
/// ## `refs`
|
||||
/// an array of `OstreeCollectionRefs`
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
pub fn freev(refs: &[&CollectionRef]) {
|
||||
unsafe {
|
||||
@ -114,17 +59,6 @@ impl CollectionRef {
|
||||
}
|
||||
}
|
||||
|
||||
/// Hash the given `ref_`. This function is suitable for use with `glib::HashTable`.
|
||||
/// `ref_` must be non-`None`.
|
||||
///
|
||||
/// Feature: `v2018_6`
|
||||
///
|
||||
/// ## `ref_`
|
||||
/// an `CollectionRef`
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// hash value for `ref_`
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
fn hash(&self) -> u32 {
|
||||
unsafe {
|
||||
|
@ -5,9 +5,6 @@
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
|
||||
/// Formatting flags for `GpgVerifyResultExt::describe`. Currently
|
||||
/// there's only one possible output format, but this enumeration allows
|
||||
/// for future variations.
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum GpgSignatureFormatFlags {
|
||||
@ -38,8 +35,6 @@ impl FromGlib<ffi::OstreeGpgSignatureFormatFlags> for GpgSignatureFormatFlags {
|
||||
}
|
||||
}
|
||||
|
||||
/// Enumeration for core object types; `ObjectType::File` is for
|
||||
/// content, the other types are metadata.
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum ObjectType {
|
||||
@ -160,8 +155,6 @@ impl FromGlib<ffi::OstreeRepoCheckoutOverwriteMode> for RepoCheckoutOverwriteMod
|
||||
}
|
||||
}
|
||||
|
||||
/// See the documentation of `Repo` for more information about the
|
||||
/// possible modes.
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum RepoMode {
|
||||
@ -237,7 +230,6 @@ impl FromGlib<ffi::OstreeRepoPruneFlags> for RepoPruneFlags {
|
||||
}
|
||||
}
|
||||
|
||||
/// The remote change operation.
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum RepoRemoteChange {
|
||||
@ -307,7 +299,6 @@ impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
|
||||
}
|
||||
}
|
||||
|
||||
/// Parameters controlling optimization of static deltas.
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum StaticDeltaGenerateOpt {
|
||||
|
@ -22,20 +22,6 @@ glib_wrapper! {
|
||||
}
|
||||
|
||||
impl GpgVerifyResult {
|
||||
/// Similar to `GpgVerifyResultExt::describe` but takes a `glib::Variant` of
|
||||
/// all attributes for a GPG signature instead of an `GpgVerifyResult`
|
||||
/// and signature index.
|
||||
///
|
||||
/// The `variant` `<emphasis>`MUST`</emphasis>` have been created by
|
||||
/// `GpgVerifyResultExt::get_all`.
|
||||
/// ## `variant`
|
||||
/// a `glib::Variant` from `GpgVerifyResultExt::get_all`
|
||||
/// ## `output_buffer`
|
||||
/// a `glib::String` to hold the description
|
||||
/// ## `line_prefix`
|
||||
/// optional line prefix string
|
||||
/// ## `flags`
|
||||
/// flags to adjust the description format
|
||||
pub fn describe_variant<'a, P: Into<Option<&'a str>>>(variant: &glib::Variant, output_buffer: &mut glib::String, line_prefix: P, flags: GpgSignatureFormatFlags) {
|
||||
let line_prefix = line_prefix.into();
|
||||
let line_prefix = line_prefix.to_glib_none();
|
||||
@ -45,105 +31,19 @@ impl GpgVerifyResult {
|
||||
}
|
||||
}
|
||||
|
||||
/// Trait containing all `GpgVerifyResult` methods.
|
||||
///
|
||||
/// # Implementors
|
||||
///
|
||||
/// [`GpgVerifyResult`](struct.GpgVerifyResult.html)
|
||||
pub trait GpgVerifyResultExt {
|
||||
/// Counts all the signatures in `self`.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// signature count
|
||||
fn count_all(&self) -> u32;
|
||||
|
||||
/// Counts only the valid signatures in `self`.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// valid signature count
|
||||
fn count_valid(&self) -> u32;
|
||||
|
||||
/// Appends a brief, human-readable description of the GPG signature at
|
||||
/// `signature_index` in `self` to the `output_buffer`. The description
|
||||
/// spans multiple lines. A `line_prefix` string, if given, will precede
|
||||
/// each line of the description.
|
||||
///
|
||||
/// The `flags` argument is reserved for future variations to the description
|
||||
/// format. Currently must be 0.
|
||||
///
|
||||
/// It is a programmer error to request an invalid `signature_index`. Use
|
||||
/// `GpgVerifyResultExt::count_all` to find the number of signatures in
|
||||
/// `self`.
|
||||
/// ## `signature_index`
|
||||
/// which signature to describe
|
||||
/// ## `output_buffer`
|
||||
/// a `glib::String` to hold the description
|
||||
/// ## `line_prefix`
|
||||
/// optional line prefix string
|
||||
/// ## `flags`
|
||||
/// flags to adjust the description format
|
||||
fn describe<'a, P: Into<Option<&'a str>>>(&self, signature_index: u32, output_buffer: &mut glib::String, line_prefix: P, flags: GpgSignatureFormatFlags);
|
||||
|
||||
//fn get(&self, signature_index: u32, attrs: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 26 }) -> Option<glib::Variant>;
|
||||
|
||||
/// Builds a `glib::Variant` tuple of all available attributes for the GPG signature
|
||||
/// at `signature_index` in `self`.
|
||||
///
|
||||
/// The child values in the returned `glib::Variant` tuple are ordered to match the
|
||||
/// `GpgSignatureAttr` enumeration, which means the enum values can be
|
||||
/// used as index values in functions like `glib::Variant::get_child`. See the
|
||||
/// `GpgSignatureAttr` description for the `glib::VariantType` of each
|
||||
/// available attribute.
|
||||
///
|
||||
/// `<note>`
|
||||
/// `<para>`
|
||||
/// The `GpgSignatureAttr` enumeration may be extended in the future
|
||||
/// with new attributes, which would affect the `glib::Variant` tuple returned by
|
||||
/// this function. While the position and type of current child values in
|
||||
/// the `glib::Variant` tuple will not change, to avoid backward-compatibility
|
||||
/// issues `<emphasis>`please do not depend on the tuple's overall size or
|
||||
/// type signature`</emphasis>`.
|
||||
/// `</para>`
|
||||
/// `</note>`
|
||||
///
|
||||
/// It is a programmer error to request an invalid `signature_index`. Use
|
||||
/// `GpgVerifyResultExt::count_all` to find the number of signatures in
|
||||
/// `self`.
|
||||
/// ## `signature_index`
|
||||
/// which signature to get attributes from
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// a new, floating, `glib::Variant` tuple
|
||||
fn get_all(&self, signature_index: u32) -> Option<glib::Variant>;
|
||||
|
||||
/// Searches `self` for a signature signed by `key_id`. If a match is found,
|
||||
/// the function returns `true` and sets `out_signature_index` so that further
|
||||
/// signature details can be obtained through `GpgVerifyResultExt::get`.
|
||||
/// If no match is found, the function returns `false` and leaves
|
||||
/// `out_signature_index` unchanged.
|
||||
/// ## `key_id`
|
||||
/// a GPG key ID or fingerprint
|
||||
/// ## `out_signature_index`
|
||||
/// return location for the index of the signature
|
||||
/// signed by `key_id`, or `None`
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// `true` on success, `false` on failure
|
||||
fn lookup(&self, key_id: &str) -> Option<u32>;
|
||||
|
||||
/// Checks if the result contains at least one signature from the
|
||||
/// trusted keyring. You can call this function immediately after
|
||||
/// `RepoExt::verify_summary` or `RepoExt::verify_commit_ext` -
|
||||
/// it will handle the `None` `self` and filled `error` too.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// `true` if `self` was not `None` and had at least one
|
||||
/// signature from trusted keyring, otherwise `false`
|
||||
fn require_valid_signature(&self) -> Result<(), Error>;
|
||||
}
|
||||
|
||||
|
@ -21,28 +21,12 @@ glib_wrapper! {
|
||||
}
|
||||
|
||||
impl MutableTree {
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// A new tree
|
||||
pub fn new() -> MutableTree {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ostree_mutable_tree_new())
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new OstreeMutableTree with the contents taken from the given repo
|
||||
/// and checksums. The data will be loaded from the repo lazily as needed.
|
||||
/// ## `repo`
|
||||
/// The repo which contains the objects refered by the checksums.
|
||||
/// ## `contents_checksum`
|
||||
/// dirtree checksum
|
||||
/// ## `metadata_checksum`
|
||||
/// dirmeta checksum
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// A new tree
|
||||
pub fn new_from_checksum(repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> MutableTree {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ostree_mutable_tree_new_from_checksum(repo.to_glib_none().0, contents_checksum.to_glib_none().0, metadata_checksum.to_glib_none().0))
|
||||
@ -56,49 +40,14 @@ impl Default for MutableTree {
|
||||
}
|
||||
}
|
||||
|
||||
/// Trait containing all `MutableTree` methods.
|
||||
///
|
||||
/// # Implementors
|
||||
///
|
||||
/// [`MutableTree`](struct.MutableTree.html)
|
||||
pub trait MutableTreeExt {
|
||||
/// In some cases, a tree may be in a "lazy" state that loads
|
||||
/// data in the background; if an error occurred during a non-throwing
|
||||
/// API call, it will have been cached. This function checks for a
|
||||
/// cached error. The tree remains in error state.
|
||||
///
|
||||
/// Feature: `v2018_7`
|
||||
///
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// `TRUE` on success
|
||||
#[cfg(any(feature = "v2018_7", feature = "dox"))]
|
||||
fn check_error(&self) -> Result<(), Error>;
|
||||
|
||||
/// Returns the subdirectory of self with filename `name`, creating an empty one
|
||||
/// it if it doesn't exist.
|
||||
/// ## `name`
|
||||
/// Name of subdirectory of self to retrieve/creates
|
||||
/// ## `out_subdir`
|
||||
/// the subdirectory
|
||||
fn ensure_dir(&self, name: &str) -> Result<MutableTree, Error>;
|
||||
|
||||
//fn ensure_parent_dirs(&self, split_path: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 0, id: 28 }, metadata_checksum: &str) -> Result<MutableTree, Error>;
|
||||
|
||||
/// Merges `self` with the tree given by `contents_checksum` and
|
||||
/// `metadata_checksum`, but only if it's possible without writing new objects to
|
||||
/// the `repo`. We can do this if either `self` is empty, the tree given by
|
||||
/// `contents_checksum` is empty or if both trees already have the same
|
||||
/// `contents_checksum`.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// `true` if merge was successful, `false` if it was not possible.
|
||||
///
|
||||
/// This function enables optimisations when composing trees. The provided
|
||||
/// checksums are not loaded or checked when this function is called. Instead
|
||||
/// the contents will be loaded only when needed.
|
||||
fn fill_empty_from_dirtree(&self, repo: &Repo, contents_checksum: &str, metadata_checksum: &str) -> bool;
|
||||
|
||||
fn get_contents_checksum(&self) -> Option<String>;
|
||||
|
@ -21,16 +21,6 @@ glib_wrapper! {
|
||||
}
|
||||
|
||||
impl Remote {
|
||||
/// Get the human-readable name of the remote. This is what the user configured,
|
||||
/// if the remote was explicitly configured; and will otherwise be a stable,
|
||||
/// arbitrary, string.
|
||||
///
|
||||
/// Feature: `v2018_6`
|
||||
///
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// remote’s name
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
pub fn get_name(&self) -> Option<String> {
|
||||
unsafe {
|
||||
@ -38,14 +28,6 @@ impl Remote {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the URL from the remote.
|
||||
///
|
||||
/// Feature: `v2018_6`
|
||||
///
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// the remote's URL
|
||||
#[cfg(any(feature = "v2018_6", feature = "dox"))]
|
||||
pub fn get_url(&self) -> Option<String> {
|
||||
unsafe {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,21 +28,6 @@ impl RepoCommitModifier {
|
||||
// unsafe { TODO: call ffi::ostree_repo_commit_modifier_new() }
|
||||
//}
|
||||
|
||||
/// See the documentation for
|
||||
/// `ostree_repo_devino_cache_new()`. This function can
|
||||
/// then be used for later calls to
|
||||
/// `ostree_repo_write_directory_to_mtree()` to optimize commits.
|
||||
///
|
||||
/// Note if your process has multiple writers, you should use separate
|
||||
/// `OSTreeRepo` instances if you want to also use this API.
|
||||
///
|
||||
/// This function will add a reference to `cache` without copying - you
|
||||
/// should avoid further mutation of the cache.
|
||||
///
|
||||
/// Feature: `v2017_13`
|
||||
///
|
||||
/// ## `cache`
|
||||
/// A hash table caching device,inode to checksums
|
||||
#[cfg(any(feature = "v2017_13", feature = "dox"))]
|
||||
pub fn set_devino_cache(&self, cache: &RepoDevInoCache) {
|
||||
unsafe {
|
||||
@ -50,16 +35,6 @@ impl RepoCommitModifier {
|
||||
}
|
||||
}
|
||||
|
||||
/// If `policy` is non-`None`, use it to look up labels to use for
|
||||
/// "security.selinux" extended attributes.
|
||||
///
|
||||
/// Note that any policy specified this way operates in addition to any
|
||||
/// extended attributes provided via
|
||||
/// `RepoCommitModifier::set_xattr_callback`. However if both
|
||||
/// specify a value for "security.selinux", then the one from the
|
||||
/// policy wins.
|
||||
/// ## `sepolicy`
|
||||
/// Policy to use for labeling
|
||||
pub fn set_sepolicy<'a, P: Into<Option<&'a SePolicy>>>(&self, sepolicy: P) {
|
||||
let sepolicy = sepolicy.into();
|
||||
let sepolicy = sepolicy.to_glib_none();
|
||||
|
@ -21,17 +21,6 @@ glib_wrapper! {
|
||||
}
|
||||
|
||||
impl RepoDevInoCache {
|
||||
/// OSTree has support for pairing `RepoExt::checkout_tree_at` using
|
||||
/// hardlinks in combination with a later
|
||||
/// `RepoExt::write_directory_to_mtree` using a (normally modified)
|
||||
/// directory. In order for OSTree to optimally detect just the new
|
||||
/// files, use this function and fill in the `devino_to_csum_cache`
|
||||
/// member of `OstreeRepoCheckoutAtOptions`, then call
|
||||
/// `ostree_repo_commit_set_devino_cache`.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Newly allocated cache
|
||||
pub fn new() -> RepoDevInoCache {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ostree_repo_devino_cache_new())
|
||||
|
@ -25,26 +25,13 @@ glib_wrapper! {
|
||||
}
|
||||
}
|
||||
|
||||
/// Trait containing all `RepoFile` methods.
|
||||
///
|
||||
/// # Implementors
|
||||
///
|
||||
/// [`RepoFile`](struct.RepoFile.html)
|
||||
pub trait RepoFileExt {
|
||||
fn ensure_resolved(&self) -> Result<(), Error>;
|
||||
|
||||
fn get_checksum(&self) -> Option<String>;
|
||||
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Repository
|
||||
fn get_repo(&self) -> Option<Repo>;
|
||||
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// The root directory for the commit referenced by this file
|
||||
fn get_root(&self) -> Option<RepoFile>;
|
||||
|
||||
fn tree_get_contents(&self) -> Option<glib::Variant>;
|
||||
|
@ -25,14 +25,6 @@ glib_wrapper! {
|
||||
}
|
||||
|
||||
impl SePolicy {
|
||||
/// ## `path`
|
||||
/// Path to a root directory
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// An accessor object for SELinux policy in root located at `path`
|
||||
pub fn new<'a, P: IsA<gio::File>, Q: Into<Option<&'a gio::Cancellable>>>(path: &P, cancellable: Q) -> Result<SePolicy, Error> {
|
||||
let cancellable = cancellable.into();
|
||||
let cancellable = cancellable.to_glib_none();
|
||||
@ -43,14 +35,6 @@ impl SePolicy {
|
||||
}
|
||||
}
|
||||
|
||||
/// ## `rootfs_dfd`
|
||||
/// Directory fd for rootfs (will not be cloned)
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// An accessor object for SELinux policy in root located at `rootfs_dfd`
|
||||
pub fn new_at<'a, P: Into<Option<&'a gio::Cancellable>>>(rootfs_dfd: i32, cancellable: P) -> Result<SePolicy, Error> {
|
||||
let cancellable = cancellable.into();
|
||||
let cancellable = cancellable.to_glib_none();
|
||||
@ -66,62 +50,17 @@ impl SePolicy {
|
||||
//}
|
||||
}
|
||||
|
||||
/// Trait containing all `SePolicy` methods.
|
||||
///
|
||||
/// # Implementors
|
||||
///
|
||||
/// [`SePolicy`](struct.SePolicy.html)
|
||||
pub trait SePolicyExt {
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Checksum of current policy
|
||||
fn get_csum(&self) -> Option<String>;
|
||||
|
||||
/// Store in `out_label` the security context for the given `relpath` and
|
||||
/// mode `unix_mode`. If the policy does not specify a label, `None`
|
||||
/// will be returned.
|
||||
/// ## `relpath`
|
||||
/// Path
|
||||
/// ## `unix_mode`
|
||||
/// Unix mode
|
||||
/// ## `out_label`
|
||||
/// Return location for security context
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
fn get_label<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, relpath: &str, unix_mode: u32, cancellable: P) -> Result<String, Error>;
|
||||
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Type of current policy
|
||||
fn get_name(&self) -> Option<String>;
|
||||
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Path to rootfs
|
||||
fn get_path(&self) -> Option<gio::File>;
|
||||
|
||||
/// Reset the security context of `target` based on the SELinux policy.
|
||||
/// ## `path`
|
||||
/// Path string to use for policy lookup
|
||||
/// ## `info`
|
||||
/// File attributes
|
||||
/// ## `target`
|
||||
/// Physical path to target file
|
||||
/// ## `flags`
|
||||
/// Flags controlling behavior
|
||||
/// ## `out_new_label`
|
||||
/// New label, or `None` if unchanged
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
fn restorecon<'a, 'b, P: Into<Option<&'a gio::FileInfo>>, Q: IsA<gio::File>, R: Into<Option<&'b gio::Cancellable>>>(&self, path: &str, info: P, target: &Q, flags: SePolicyRestoreconFlags, cancellable: R) -> Result<String, Error>;
|
||||
|
||||
/// ## `path`
|
||||
/// Use this path to determine a label
|
||||
/// ## `mode`
|
||||
/// Used along with `path`
|
||||
fn setfscreatecon(&self, path: &str, mode: u32) -> Result<(), Error>;
|
||||
|
||||
fn get_property_rootfs_dfd(&self) -> i32;
|
||||
|
@ -35,26 +35,6 @@ unsafe fn from_glib_container_variant_set(ptr: *mut glib_ffi::GHashTable) -> Has
|
||||
pub trait RepoExtManual {
|
||||
fn new_for_path<P: AsRef<Path>>(path: P) -> Repo;
|
||||
|
||||
/// Create a new set `out_reachable` containing all objects reachable
|
||||
/// from `commit_checksum`, traversing `maxdepth` parent commits.
|
||||
/// ## `commit_checksum`
|
||||
/// ASCII SHA256 checksum
|
||||
/// ## `maxdepth`
|
||||
/// Traverse this many parent commits, -1 for unlimited
|
||||
/// ## `out_reachable`
|
||||
/// Set of reachable objects
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
/// Create a new set `out_reachable` containing all objects reachable
|
||||
/// from `commit_checksum`, traversing `maxdepth` parent commits.
|
||||
/// ## `commit_checksum`
|
||||
/// ASCII SHA256 checksum
|
||||
/// ## `maxdepth`
|
||||
/// Traverse this many parent commits, -1 for unlimited
|
||||
/// ## `out_reachable`
|
||||
/// Set of reachable objects
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
fn traverse_commit<'a, P: Into<Option<&'a gio::Cancellable>>>(
|
||||
&self,
|
||||
commit_checksum: &str,
|
||||
@ -62,72 +42,12 @@ pub trait RepoExtManual {
|
||||
cancellable: P,
|
||||
) -> Result<HashSet<ObjectName>, Error>;
|
||||
|
||||
/// If `refspec_prefix` is `None`, list all local and remote refspecs,
|
||||
/// with their current values in `out_all_refs`. Otherwise, only list
|
||||
/// refspecs which have `refspec_prefix` as a prefix.
|
||||
///
|
||||
/// `out_all_refs` will be returned as a mapping from refspecs (including the
|
||||
/// remote name) to checksums. If `refspec_prefix` is non-`None`, it will be
|
||||
/// removed as a prefix from the hash table keys.
|
||||
/// ## `refspec_prefix`
|
||||
/// Only list refs which match this prefix
|
||||
/// ## `out_all_refs`
|
||||
///
|
||||
/// Mapping from refspec to checksum
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
/// If `refspec_prefix` is `None`, list all local and remote refspecs,
|
||||
/// with their current values in `out_all_refs`. Otherwise, only list
|
||||
/// refspecs which have `refspec_prefix` as a prefix.
|
||||
///
|
||||
/// `out_all_refs` will be returned as a mapping from refspecs (including the
|
||||
/// remote name) to checksums. If `refspec_prefix` is non-`None`, it will be
|
||||
/// removed as a prefix from the hash table keys.
|
||||
/// ## `refspec_prefix`
|
||||
/// Only list refs which match this prefix
|
||||
/// ## `out_all_refs`
|
||||
///
|
||||
/// Mapping from refspec to checksum
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
fn list_refs<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(
|
||||
&self,
|
||||
refspec_prefix: P,
|
||||
cancellable: Q,
|
||||
) -> Result<HashMap<String, String>, Error>;
|
||||
|
||||
/// If `refspec_prefix` is `None`, list all local and remote refspecs,
|
||||
/// with their current values in `out_all_refs`. Otherwise, only list
|
||||
/// refspecs which have `refspec_prefix` as a prefix.
|
||||
///
|
||||
/// `out_all_refs` will be returned as a mapping from refspecs (including the
|
||||
/// remote name) to checksums. Differently from `RepoExt::list_refs`, the
|
||||
/// `refspec_prefix` will not be removed from the refspecs in the hash table.
|
||||
/// ## `refspec_prefix`
|
||||
/// Only list refs which match this prefix
|
||||
/// ## `out_all_refs`
|
||||
///
|
||||
/// Mapping from refspec to checksum
|
||||
/// ## `flags`
|
||||
/// Options controlling listing behavior
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
/// If `refspec_prefix` is `None`, list all local and remote refspecs,
|
||||
/// with their current values in `out_all_refs`. Otherwise, only list
|
||||
/// refspecs which have `refspec_prefix` as a prefix.
|
||||
///
|
||||
/// `out_all_refs` will be returned as a mapping from refspecs (including the
|
||||
/// remote name) to checksums. Differently from `RepoExt::list_refs`, the
|
||||
/// `refspec_prefix` will not be removed from the refspecs in the hash table.
|
||||
/// ## `refspec_prefix`
|
||||
/// Only list refs which match this prefix
|
||||
/// ## `out_all_refs`
|
||||
///
|
||||
/// Mapping from refspec to checksum
|
||||
/// ## `flags`
|
||||
/// Options controlling listing behavior
|
||||
/// ## `cancellable`
|
||||
/// Cancellable
|
||||
fn list_refs_ext<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(
|
||||
&self,
|
||||
refspec_prefix: P,
|
||||
|
Loading…
x
Reference in New Issue
Block a user