"Fossies" - the Fresh Open Source Software Archive

Member "evolution-mapi-3.46.1/src/libexchangemapi/e-mapi-folder.h" (2 Dec 2022, 4547 Bytes) of package /linux/misc/evolution-mapi-3.46.1.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "e-mapi-folder.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 3.44.0_vs_3.44.1.

    1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
    2 /*
    3  * This program is free software; you can redistribute it and/or
    4  * modify it under the terms of the GNU Lesser General Public
    5  * License as published by the Free Software Foundation; either
    6  * version 2 of the License, or (at your option) version 3.
    7  *
    8  * This program is distributed in the hope that it will be useful,
    9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   11  * Lesser General Public License for more details.
   12  *
   13  * You should have received a copy of the GNU Lesser General Public
   14  * License along with the program; if not, see <http://www.gnu.org/licenses/>
   15  *
   16  *
   17  * Authors:
   18  *    Srinivasa Ragavan <sragavan@novell.com>
   19  *
   20  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
   21  *
   22  */
   23 
   24 #ifndef E_MAPI_FOLDER_H
   25 #define E_MAPI_FOLDER_H
   26 
   27 #include <glib.h>
   28 
   29 #include <libmapi/libmapi.h>
   30 #include <libedataserver/libedataserver.h>
   31 
   32 typedef enum  {
   33     E_MAPI_FOLDER_TYPE_UNKNOWN = 0,
   34     E_MAPI_FOLDER_TYPE_MAIL,
   35     E_MAPI_FOLDER_TYPE_APPOINTMENT,
   36     E_MAPI_FOLDER_TYPE_CONTACT,
   37     E_MAPI_FOLDER_TYPE_MEMO,
   38     E_MAPI_FOLDER_TYPE_JOURNAL,
   39     E_MAPI_FOLDER_TYPE_TASK,
   40     E_MAPI_FOLDER_TYPE_NOTE_HOMEPAGE
   41 } EMapiFolderType;
   42 
   43 typedef enum {
   44     E_MAPI_FOLDER_CATEGORY_UNKNOWN = 0,
   45     E_MAPI_FOLDER_CATEGORY_PERSONAL,
   46     E_MAPI_FOLDER_CATEGORY_PUBLIC,
   47     E_MAPI_FOLDER_CATEGORY_FOREIGN
   48 } EMapiFolderCategory;
   49 
   50 typedef struct _EMapiFolder {
   51     /* We'll need this separation of 'owner' and 'user' when we do delegation */
   52     gchar *owner_name;
   53     gchar *owner_email;
   54     gchar *user_name;
   55     gchar *user_email;
   56 
   57     /* Need this info - default calendars/address books/notes folders can't be deleted */
   58     gboolean is_default;
   59     guint32 default_type;
   60 
   61     gchar *folder_name;
   62     EMapiFolderType container_class;
   63     EMapiFolderCategory category;
   64     mapi_id_t folder_id;
   65     mapi_id_t parent_folder_id;
   66     guint32 child_count;
   67     guint32 unread_count;
   68     guint32 total;
   69     guint64 size;
   70 
   71     /* reserved */
   72     gpointer reserved1;
   73     gpointer reserved2;
   74     gpointer reserved3;
   75 } EMapiFolder;
   76 
   77 EMapiFolderType     e_mapi_folder_type_from_string  (const gchar *container_class);
   78 const gchar *       e_mapi_folder_type_to_string    (EMapiFolderType folder_type);
   79 
   80 EMapiFolder *       e_mapi_folder_new       (const gchar *folder_name,
   81                              const gchar *container_class,
   82                              EMapiFolderCategory catgory,
   83                              mapi_id_t folder_id,
   84                              mapi_id_t parent_folder_id,
   85                              uint32_t child_count,
   86                              uint32_t unread_count,
   87                              uint32_t total);
   88 EMapiFolder *       e_mapi_folder_copy      (EMapiFolder *src);
   89 void            e_mapi_folder_free      (EMapiFolder *folder);
   90 
   91 const gchar *       e_mapi_folder_get_name      (EMapiFolder *folder);
   92 mapi_id_t       e_mapi_folder_get_id        (EMapiFolder *folder);
   93 mapi_id_t       e_mapi_folder_get_parent_id (EMapiFolder *folder);
   94 EMapiFolderType     e_mapi_folder_get_type      (EMapiFolder *folder);
   95 EMapiFolderCategory e_mapi_folder_get_category  (EMapiFolder *folder);
   96 guint32         e_mapi_folder_get_unread_count  (EMapiFolder *folder);
   97 guint32         e_mapi_folder_get_total_count   (EMapiFolder *folder);
   98 gboolean        e_mapi_folder_is_root       (EMapiFolder *folder);
   99 
  100 GSList *        e_mapi_folder_copy_list     (GSList *folder_list);
  101 void            e_mapi_folder_free_list     (GSList *folder_list);
  102 
  103 gchar *         e_mapi_folder_pick_color_spec   (gint move_by,
  104                              gboolean around_middle);
  105 
  106 gboolean        e_mapi_folder_populate_esource  (ESource *source,
  107                              const GList *sources,
  108                              EMapiFolderType folder_type,
  109                              const gchar *profile,
  110                              gboolean offline_sync,
  111                              EMapiFolderCategory folder_category,
  112                              const gchar *foreign_username, /* NULL for public folder */
  113                              const gchar *folder_name,
  114                              mapi_id_t folder_id,
  115                              gint color_seed,
  116                              GCancellable *cancellable,
  117                              GError **perror);
  118 
  119 gboolean        e_mapi_folder_add_as_esource    (ESourceRegistry *pregistry,
  120                              EMapiFolderType folder_type,
  121                              const gchar *profile,
  122                              gboolean offline_sync,
  123                              EMapiFolderCategory folder_category,
  124                              const gchar *foreign_username, /* NULL for public folder */
  125                              const gchar *folder_name,
  126                              mapi_id_t folder_id,
  127                              gint color_seed,
  128                              GCancellable *cancellable,
  129                              GError **perror);
  130 
  131 gboolean        e_mapi_folder_remove_as_esource (ESourceRegistry *pregistry,
  132                              const gchar *profile,
  133                              mapi_id_t folder_id,
  134                              GCancellable *cancellable,
  135                              GError **perror);
  136 
  137 gboolean        e_mapi_folder_is_subscribed_as_esource
  138                             (const GList *esources,
  139                              const gchar *profile,
  140                              mapi_id_t fid);
  141 #endif