File indexing completed on 2025-01-26 04:45:35

0001 /*
0002     SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "messagefolderattribute.h"
0008 
0009 #include "dispatchmodeattribute.h"
0010 #include "errorattribute.h"
0011 #include "sentactionattribute.h"
0012 #include "sentbehaviourattribute.h"
0013 #include "transportattribute.h"
0014 
0015 #include <Akonadi/AttributeFactory>
0016 
0017 #ifndef KDELIBS_STATIC_LIBS
0018 namespace
0019 {
0020 // Anonymous namespace; function is invisible outside this file.
0021 bool messagefolder_dummy()
0022 {
0023     Akonadi::AttributeFactory::registerAttribute<Akonadi::MessageFolderAttribute>();
0024     Akonadi::AttributeFactory::registerAttribute<Akonadi::DispatchModeAttribute>();
0025     Akonadi::AttributeFactory::registerAttribute<Akonadi::ErrorAttribute>();
0026     Akonadi::AttributeFactory::registerAttribute<Akonadi::SentActionAttribute>();
0027     Akonadi::AttributeFactory::registerAttribute<Akonadi::SentBehaviourAttribute>();
0028     Akonadi::AttributeFactory::registerAttribute<Akonadi::TransportAttribute>();
0029     return true;
0030 }
0031 
0032 // Called when this library is loaded.
0033 const bool registered = messagefolder_dummy();
0034 } // namespace
0035 
0036 #else
0037 
0038 extern bool ___AkonadiKMime____INIT()
0039 {
0040     Akonadi::AttributeFactory::registerAttribute<Akonadi::MessageFolderAttribute>();
0041     Akonadi::AttributeFactory::registerAttribute<Akonadi::DispatchModeAttribute>();
0042     Akonadi::AttributeFactory::registerAttribute<Akonadi::ErrorAttribute>();
0043     Akonadi::AttributeFactory::registerAttribute<Akonadi::SentActionAttribute>();
0044     Akonadi::AttributeFactory::registerAttribute<Akonadi::SentBehaviourAttribute>();
0045     Akonadi::AttributeFactory::registerAttribute<Akonadi::TransportAttribute>();
0046     return true;
0047 }
0048 
0049 #endif