-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- basic integration of rmb plugin - lsppols as first command.
- Loading branch information
Showing
8 changed files
with
131 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | ||
// vim: ts=8 sw=2 smarttab | ||
/* | ||
* Copyright (c) 2017-2018 Tallence AG and the authors | ||
* Copyright (c) 2007-2017 Dovecot authors | ||
* | ||
* This is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License version 2.1, as published by the Free Software | ||
* Foundation. See file COPYING. | ||
*/ | ||
extern "C" { | ||
#include "lib.h" | ||
#include "module-dir.h" | ||
#include "str.h" | ||
#include "hash.h" | ||
#include "dict.h" | ||
#include "imap-match.h" | ||
#include "doveadm-settings.h" | ||
#include "doveadm-mail.h" | ||
#include "doveadm-rbox-plugin.h" | ||
} | ||
#include "tools/rmb/rmb-commands.h" | ||
|
||
static int cmd_rmb_optimize_run(struct doveadm_mail_cmd_context *ctx, struct mail_user *user) { | ||
// const char *ns_prefix = ctx->args[0]; | ||
librmb::RmbCommands::RmbCommands::lspools(); | ||
return 0; | ||
} | ||
|
||
static void cmd_rmb_optimize_init(struct doveadm_mail_cmd_context *ctx ATTR_UNUSED, const char *const args[]) { | ||
if (str_array_length(args) > 0) { | ||
doveadm_mail_help_name("rmb lspools"); | ||
} | ||
} | ||
|
||
struct doveadm_mail_cmd_context *cmd_rmb_lspools_alloc(void) { | ||
struct doveadm_mail_cmd_context *ctx; | ||
ctx = doveadm_mail_cmd_alloc(struct doveadm_mail_cmd_context); | ||
ctx->v.run = cmd_rmb_optimize_run; | ||
ctx->v.init = cmd_rmb_optimize_init; | ||
return ctx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | ||
// vim: ts=8 sw=2 smarttab | ||
/* | ||
* Copyright (c) 2017-2018 Tallence AG and the authors | ||
* Copyright (c) 2007-2017 Dovecot authors | ||
* | ||
* This is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License version 2.1, as published by the Free Software | ||
* Foundation. See file COPYING. | ||
*/ | ||
#ifndef SRC_DOVEADM_RBOX_PLUGIN_H | ||
#define SRC_DOVEADM_RBOX_PLUGIN_H | ||
|
||
extern struct doveadm_mail_cmd_context *cmd_rmb_lspools_alloc(void); | ||
|
||
#endif // SRC_DOVEADM_RBOX_PLUGIN_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | ||
// vim: ts=8 sw=2 smarttab | ||
/* | ||
* Copyright (c) 2017-2018 Tallence AG and the authors | ||
* Copyright (c) 2007-2017 Dovecot authors | ||
* | ||
* This is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License version 2.1, as published by the Free Software | ||
* Foundation. See file COPYING. | ||
*/ | ||
#include "lib.h" | ||
#include "module-dir.h" | ||
#include "str.h" | ||
#include "hash.h" | ||
#include "dict.h" | ||
#include "imap-match.h" | ||
#include "doveadm-settings.h" | ||
#include "doveadm-mail.h" | ||
|
||
#include "doveadm-rbox-plugin.h" | ||
|
||
#define DOVEADM_EXPIRE_MAIL_CMD_CONTEXT(obj) MODULE_CONTEXT(obj, doveadm_expire_mail_cmd_module) | ||
const char *doveadm_rbox_plugin_version = DOVECOT_ABI_VERSION; | ||
|
||
static struct doveadm_mail_cmd rmb_commands[] = {{cmd_rmb_lspools_alloc, "rmb lspools", NULL}}; | ||
|
||
void doveadm_rbox_plugin_init(struct module *module ATTR_UNUSED) { | ||
|
||
unsigned int i; | ||
for (i = 0; i < N_ELEMENTS(rmb_commands); i++) { | ||
doveadm_mail_register_cmd(&rmb_commands[i]); | ||
} | ||
} | ||
|
||
void doveadm_rbox_plugin_deinit(void) {} |