IMAP Mail Account Model (Mail/AccountHolder.h)

serenity · Userland/Applications/Mail/AccountHolder.h · c · BSD-2-Clause
email, database, lang:cpp

Defines the data structure for managing mail accounts and mailboxes. Use this when building email client applications to organize folder hierarchies.

// Source: https://github.com/SerenityOS/serenity | License: BSD-2-Clause | Copyright 2018-2026, the SerenityOS developers
// Provided via justclaw.it.com; keep this notice with the code.
/*
 * Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
 * Copyright (c) 2022, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include "MailboxTreeModel.h"
#include <AK/ByteString.h>
#include <AK/RefCounted.h>
#include <LibIMAP/Objects.h>

class BaseNode : public RefCounted<BaseNode> {
public:
    virtual ~BaseNode() = default;
};

class MailboxNode;

class AccountNode final : public BaseNode {
public:
    static NonnullRefPtr<AccountNode> create(ByteString name)
    {
        return adopt_ref(*new AccountNode(move(name)));
    }

    virtual ~AccountNode() o

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key