mirror of https://git.meli.delivery/meli/meli
Index scrolling, dummy backends, and some pager settings
parent
b11eb1e494
commit
8c7a0ae540
@ -0,0 +1,15 @@
|
||||
fn false_val () -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn zero_val () -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Default)]
|
||||
pub struct PagerSettings {
|
||||
#[serde(default = "zero_val")]
|
||||
pager_context: usize,
|
||||
#[serde(default = "false_val")]
|
||||
pager_stop: bool,
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* meli - mailbox module.
|
||||
*
|
||||
* Copyright 2017 Manos Pitsidianakis
|
||||
*
|
||||
* This file is part of meli.
|
||||
*
|
||||
* meli is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* meli 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with meli. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use mailbox::email::{Envelope, Flag};
|
||||
use error::{Result};
|
||||
use mailbox::backends::{BackendOp, MailBackend, RefreshEventConsumer};
|
||||
use conf::Folder;
|
||||
|
||||
|
||||
/// `BackendOp` implementor for Imap
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub struct ImapOp {
|
||||
}
|
||||
|
||||
impl ImapOp {
|
||||
pub fn new(path: String) -> Self {
|
||||
ImapOp {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl BackendOp for ImapOp {
|
||||
fn description(&self) -> String {
|
||||
unimplemented!();
|
||||
}
|
||||
fn as_bytes(&mut self) -> Result<&[u8]> {
|
||||
unimplemented!();
|
||||
}
|
||||
fn fetch_headers(&mut self) -> Result<&[u8]> {
|
||||
unimplemented!();
|
||||
}
|
||||
fn fetch_body(&mut self) -> Result<&[u8]> {
|
||||
unimplemented!();
|
||||
}
|
||||
fn fetch_flags(&self) -> Flag {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Imap backend
|
||||
#[derive(Debug)]
|
||||
pub struct ImapType {
|
||||
}
|
||||
|
||||
|
||||
impl MailBackend for ImapType {
|
||||
fn get(&self, folder: &Folder) -> Result<Vec<Envelope>> {
|
||||
unimplemented!();
|
||||
}
|
||||
fn watch(&self, sender: RefreshEventConsumer, folders: &[Folder]) -> () {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
impl ImapType {
|
||||
pub fn new(path: &str) -> Self {
|
||||
ImapType {
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* meli - mailbox module.
|
||||
*
|
||||
* Copyright 2017 Manos Pitsidianakis
|
||||
*
|
||||
* This file is part of meli.
|
||||
*
|
||||
* meli is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* meli 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with meli. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use mailbox::email::{Envelope, Flag};
|
||||
use error::{Result};
|
||||
use mailbox::backends::{BackendOp, MailBackend, RefreshEventConsumer};
|
||||
use conf::Folder;
|
||||
|
||||
|
||||
|
||||
|
||||
/// `BackendOp` implementor for Mbox
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub struct MboxOp {
|
||||
}
|
||||
|
||||
impl MboxOp {
|
||||
pub fn new(path: String) -> Self {
|
||||
MboxOp {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl BackendOp for MboxOp {
|
||||
fn description(&self) -> String {
|
||||
unimplemented!();
|
||||
}
|
||||
fn as_bytes(&mut self) -> Result<&[u8]> {
|
||||
unimplemented!();
|
||||
}
|
||||
fn fetch_headers(&mut self) -> Result<&[u8]> {
|
||||
unimplemented!();
|
||||
}
|
||||
fn fetch_body(&mut self) -> Result<&[u8]> {
|
||||
unimplemented!();
|
||||
}
|
||||
fn fetch_flags(&self) -> Flag {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Mbox backend
|
||||
#[derive(Debug)]
|
||||
pub struct MboxType {
|
||||
}
|
||||
|
||||
|
||||
impl MailBackend for MboxType {
|
||||
fn get(&self, folder: &Folder) -> Result<Vec<Envelope>> {
|
||||
unimplemented!();
|
||||
}
|
||||
fn watch(&self, sender: RefreshEventConsumer, folders: &[Folder]) -> () {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
impl MboxType {
|
||||
pub fn new(path: &str) -> Self {
|
||||
MboxType {
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue