Add interface for working with BookmarkCollection

Oh my god I'm so drunk right now.
It's 0030 and I had dinner at around 1800 yesterday and then I just
drank like... two Mate and maybe 1L of water... and now I drank 0.33L
beer and I'm drunk as fuck... just wanted to share.

I hope this commit still makes sense... I'm not sure, I should
definitively review this tomorrow.

So... maybe I can do some more.

Btw., I just saw "The Martian" - the movie, you know. Oh my god, I love
Matt Damon - I think he's a really nice actor, actually.

I probably shouldn't put this into the commit message, I know... Just
wanted to have some fun here.. sorry.
This commit is contained in:
Matthias Beyer 2016-07-08 00:27:45 +02:00
parent ee51de088a
commit 9231cf5fb7

View file

@ -18,10 +18,12 @@ use libimagstore::storeid::IntoStoreId;
use libimagstore::store::FileLockEntry; use libimagstore::store::FileLockEntry;
use libimagentrylink::external::ExternalLinker; use libimagentrylink::external::ExternalLinker;
use libimagentrylink::internal::InternalLinker; use libimagentrylink::internal::InternalLinker;
use libimagentrylink::internal::Link; use libimagentrylink::internal::Link as StoreLink;
use libimagerror::into::IntoError; use libimagerror::into::IntoError;
use url::Url; use url::Url;
use link::Link;
pub struct BookmarkCollection<'a> { pub struct BookmarkCollection<'a> {
fle: FileLockEntry<'a>, fle: FileLockEntry<'a>,
store: &'a Store, store: &'a Store,
@ -82,7 +84,7 @@ impl<'a> BookmarkCollection<'a> {
self.fle.get_external_links(&self.store).map_err_into(BEK::LinkError) self.fle.get_external_links(&self.store).map_err_into(BEK::LinkError)
} }
pub fn link_entries(&self) -> Result<Vec<Link>> { pub fn link_entries(&self) -> Result<Vec<StoreLink>> {
use libimagentrylink::external::is_external_link_storeid; use libimagentrylink::external::is_external_link_storeid;
self.fle self.fle
@ -91,5 +93,21 @@ impl<'a> BookmarkCollection<'a> {
.map_err_into(BEK::StoreReadError) .map_err_into(BEK::StoreReadError)
} }
pub fn add_link(&self, l: Link) -> Result<()> {
unimplemented!()
}
pub fn get_link(&self, l: Link) -> Result<Link> {
unimplemented!()
}
pub fn get_links_matching(&self, r: Regex) -> Result<Link> {
unimplemented!()
}
pub fn remove_link(&self, l: Link) -> Result<()> {
unimplemented!()
}
} }