Commit c8bbcc53 authored by David Jarvie's avatar David Jarvie
Browse files

Rename kalarm_cal_export.h

parent a03cd2e3
......@@ -11,9 +11,11 @@ add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5955)
# KALARM_USE_KRESOURCES - builds to use KResources instead of Akonadi
option(KALARM_USE_KRESOURCES "Build to use KResources" OFF)
if (KDEPIM_NO_KRESOURCES)
set(KALARM_USE_KRESOURCES OFF CACHE BOOL "Build to use KResources")
endif (KDEPIM_NO_KRESOURCES)
set(USE_KRESOURCES false)
if(KALARM_USE_KRESOURCES AND NOT KDEPIM_NO_KRESOURCES)
set(USE_KRESOURCES true)
endif(KALARM_USE_KRESOURCES AND NOT KDEPIM_NO_KRESOURCES)
########### next target ###############
set(kalarmcal_LIB_SRCS
......@@ -26,17 +28,17 @@ set(kalarmcal_LIB_SRCS
repetition.cpp
version.cpp
)
if(NOT KALARM_USE_KRESOURCES)
if(NOT USE_KRESOURCES)
set(kalarmcal_LIB_SRCS ${kalarmcal_LIB_SRCS}
collectionattribute.cpp
compatibilityattribute.cpp
eventattribute.cpp
)
endif(NOT KALARM_USE_KRESOURCES)
endif(NOT USE_KRESOURCES)
kde4_add_library(kalarmcal ${LIBRARY_TYPE} ${kalarmcal_LIB_SRCS})
if(KALARM_USE_KRESOURCES)
if(USE_KRESOURCES)
target_link_libraries(kalarmcal
kcal
kholidays
......@@ -44,7 +46,7 @@ if(KALARM_USE_KRESOURCES)
${KDE4_KDECORE_LIBS}
${QT_QTCORE_LIBRARY}
)
else(KALARM_USE_KRESOURCES)
else(USE_KRESOURCES)
target_link_libraries(kalarmcal
akonadi-kde
kcalcore
......@@ -53,7 +55,7 @@ else(KALARM_USE_KRESOURCES)
${KDE4_KDECORE_LIBS}
${QT_QTCORE_LIBRARY}
)
endif(KALARM_USE_KRESOURCES)
endif(USE_KRESOURCES)
set_target_properties(kalarmcal PROPERTIES
VERSION ${LIB_VERSION}
......@@ -67,7 +69,7 @@ install(FILES
identities.h
kacalendar.h
kaevent.h
kalarm_cal_export.h
kalarmcal_export.h
karecurrence.h
kcalcore_constptr.h
repetition.h
......@@ -75,7 +77,7 @@ install(FILES
DESTINATION ${INCLUDE_INSTALL_DIR}/kalarmcal
COMPONENT Devel
)
if(NOT KALARM_USE_KRESOURCES)
if(NOT USE_KRESOURCES)
install(FILES
collectionattribute.h
compatibilityattribute.h
......@@ -83,4 +85,4 @@ if(NOT KALARM_USE_KRESOURCES)
DESTINATION ${INCLUDE_INSTALL_DIR}/kalarmcal
COMPONENT Devel
)
endif(NOT KALARM_USE_KRESOURCES)
endif(NOT USE_KRESOURCES)
/*
* alarmtext.cpp - text/email alarm text conversion
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2004,2005,2007-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......
/*
* alarmtext.h - text/email alarm text conversion
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2004,2005,2008-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......@@ -22,7 +23,7 @@
#ifndef ALARMTEXT_H
#define ALARMTEXT_H
#include "kalarm_cal_export.h"
#include "kalarmcal_export.h"
#ifndef USE_KRESOURCES
#include <kcalcore/todo.h>
......@@ -52,7 +53,7 @@ class KAEvent;
* @author David Jarvie <djarvie@kde.org>
*/
class KALARM_CAL_EXPORT AlarmText
class KALARMCAL_EXPORT AlarmText
{
public:
/** Constructor which sets the alarm text.
......
/*
* collectionattribute.cpp - Akonadi attribute holding Collection characteristics
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2010-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......
/*
* collectionattribute.h - Akonadi attribute holding Collection characteristics
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2010-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......@@ -22,7 +23,7 @@
#ifndef KALARM_COLLECTION_ATTRIBUTE_H
#define KALARM_COLLECTION_ATTRIBUTE_H
#include "kalarm_cal_export.h"
#include "kalarmcal_export.h"
#include "kacalendar.h"
......@@ -47,7 +48,7 @@ namespace KAlarmCal
* @author David Jarvie <djarvie@kde.org>
*/
class KALARM_CAL_EXPORT CollectionAttribute : public Akonadi::Attribute
class KALARMCAL_EXPORT CollectionAttribute : public Akonadi::Attribute
{
public:
CollectionAttribute();
......
/*
* compatibilityattribute.cpp - Akonadi attribute holding Collection compatibility
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......
/*
* compatibilityattribute.h - Akonadi attribute holding Collection compatibility
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......@@ -21,7 +22,7 @@
#ifndef KALARM_COMPATIBILITY_ATTRIBUTE_H
#define KALARM_COMPATIBILITY_ATTRIBUTE_H
#include "kalarm_cal_export.h"
#include "kalarmcal_export.h"
#include "kacalendar.h"
......@@ -43,7 +44,7 @@ namespace KAlarmCal
* @author David Jarvie <djarvie@kde.org>
*/
class KALARM_CAL_EXPORT CompatibilityAttribute : public Akonadi::Attribute
class KALARMCAL_EXPORT CompatibilityAttribute : public Akonadi::Attribute
{
public:
/** Default constructor. Creates an incompatible attribute. */
......
/*
* datetime.cpp - date/time with start-of-day time for date-only values
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2003,2005-2007,2009-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......
/*
* datetime.h - date/time with start-of-day time for date-only values
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2003,2005-2007,2009,2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......@@ -21,7 +22,7 @@
#ifndef KALARM_DATETIME_H
#define KALARM_DATETIME_H
#include "kalarm_cal_export.h"
#include "kalarmcal_export.h"
#include <kdatetime.h>
......@@ -38,7 +39,7 @@ namespace KAlarmCal
*
* @author David Jarvie <djarvie@kde.org>
*/
class KALARM_CAL_EXPORT DateTime
class KALARMCAL_EXPORT DateTime
{
public:
/** Default constructor.
......@@ -211,9 +212,9 @@ class KALARM_CAL_EXPORT DateTime
/** Compare this value with another. */
KDateTime::Comparison compare(const DateTime &other) const;
KALARM_CAL_EXPORT friend bool operator==(const KAlarmCal::DateTime& dt1, const KAlarmCal::DateTime& dt2);
KALARM_CAL_EXPORT friend bool operator==(const KDateTime& dt1, const KAlarmCal::DateTime& dt2);
KALARM_CAL_EXPORT friend bool operator<(const KAlarmCal::DateTime& dt1, const KAlarmCal::DateTime& dt2);
KALARMCAL_EXPORT friend bool operator==(const KAlarmCal::DateTime& dt1, const KAlarmCal::DateTime& dt2);
KALARMCAL_EXPORT friend bool operator==(const KDateTime& dt1, const KAlarmCal::DateTime& dt2);
KALARMCAL_EXPORT friend bool operator<(const KAlarmCal::DateTime& dt1, const KAlarmCal::DateTime& dt2);
friend bool operator<(const KDateTime& dt1, const KAlarmCal::DateTime& dt2);
private:
......@@ -224,8 +225,8 @@ class KALARM_CAL_EXPORT DateTime
};
/** Returns true if the two values are equal. */
KALARM_CAL_EXPORT bool operator==(const DateTime& dt1, const DateTime& dt2);
KALARM_CAL_EXPORT bool operator==(const KDateTime& dt1, const DateTime& dt2);
KALARMCAL_EXPORT bool operator==(const DateTime& dt1, const DateTime& dt2);
KALARMCAL_EXPORT bool operator==(const KDateTime& dt1, const DateTime& dt2);
/** Returns true if the two values are not equal. */
inline bool operator!=(const DateTime& dt1, const DateTime& dt2) { return !operator==(dt1, dt2); }
......@@ -235,7 +236,7 @@ inline bool operator!=(const KDateTime& dt1, const DateTime& dt2) { return !ope
* If the two values have the same date, and one value is date-only while the other is a date-time, the
* time used for the date-only value is the start-of-day time set in the KAlarm Preferences dialog.
*/
KALARM_CAL_EXPORT bool operator<(const DateTime& dt1, const DateTime& dt2);
KALARMCAL_EXPORT bool operator<(const DateTime& dt1, const DateTime& dt2);
inline bool operator<(const KDateTime& dt1, const DateTime& dt2) { return operator<(DateTime(dt1), dt2); }
/** Returns true if the @p dt1 is later than @p dt2.
......
/*
* eventattribute.cpp - per-user attributes for individual events
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2010-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......
/*
* eventattribute.h - per-user attributes for individual events
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2010-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......@@ -22,7 +23,7 @@
#ifndef KALARM_EVENT_ATTRIBUTE_H
#define KALARM_EVENT_ATTRIBUTE_H
#include "kalarm_cal_export.h"
#include "kalarmcal_export.h"
#include "kaevent.h"
......@@ -43,7 +44,7 @@ namespace KAlarmCal
* @author David Jarvie <djarvie@kde.org>
*/
class KALARM_CAL_EXPORT EventAttribute : public Akonadi::Attribute
class KALARMCAL_EXPORT EventAttribute : public Akonadi::Attribute
{
public:
EventAttribute();
......
/*
* identities.cpp - email identity functions
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2004-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......
/*
* identities.h - email identity functions
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2004-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......@@ -22,7 +23,7 @@
#ifndef KALARM_IDENTITIES_H
#define KALARM_IDENTITIES_H
#include "kalarm_cal_export.h"
#include "kalarmcal_export.h"
class QString;
......@@ -39,13 +40,13 @@ namespace KAlarmCal
namespace Identities
{
/** Return the unique identity manager instance. It is created if it does not already exist. */
KALARM_CAL_EXPORT KPIMIdentities::IdentityManager* identityManager();
KALARMCAL_EXPORT KPIMIdentities::IdentityManager* identityManager();
/** Return whether any identities exist. */
KALARM_CAL_EXPORT bool identitiesExist();
KALARMCAL_EXPORT bool identitiesExist();
/** Fetch the uoid of an identity name or uoid string. */
KALARM_CAL_EXPORT uint identityUoid(const QString& identityUoidOrName);
KALARMCAL_EXPORT uint identityUoid(const QString& identityUoidOrName);
}
}
......
/*
* kacalendar.cpp - KAlarm kcal library calendar and event functions
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2001-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......
/*
* kacalendar.h - KAlarm kcal library calendar and event categorisation
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2005-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......@@ -22,7 +23,7 @@
#ifndef KALARM_KACALENDAR_H
#define KALARM_KACALENDAR_H
#include "kalarm_cal_export.h"
#include "kalarmcal_export.h"
#ifndef USE_KRESOURCES
#include "kcalcore_constptr.h"
#include <kcalcore/filestorage.h>
......@@ -49,10 +50,10 @@ namespace KAlarmCal
{
#ifndef USE_KRESOURCES
extern const QLatin1String KALARM_CAL_EXPORT MIME_BASE; //!< The base mime type for KAlarm alarms
extern const QLatin1String KALARM_CAL_EXPORT MIME_ACTIVE; //!< The mime type for KAlarm active alarms
extern const QLatin1String KALARM_CAL_EXPORT MIME_ARCHIVED; //!< The mime type for KAlarm archived alarms
extern const QLatin1String KALARM_CAL_EXPORT MIME_TEMPLATE; //!< The mime type for KAlarm alarm templates
extern const QLatin1String KALARMCAL_EXPORT MIME_BASE; //!< The base mime type for KAlarm alarms
extern const QLatin1String KALARMCAL_EXPORT MIME_ACTIVE; //!< The mime type for KAlarm active alarms
extern const QLatin1String KALARMCAL_EXPORT MIME_ARCHIVED; //!< The mime type for KAlarm archived alarms
extern const QLatin1String KALARMCAL_EXPORT MIME_TEMPLATE; //!< The mime type for KAlarm alarm templates
#endif
/**
......@@ -115,9 +116,9 @@ namespace KACalendar
* >0 the older KAlarm version which wrote the calendar
*/
#ifndef USE_KRESOURCES
KALARM_CAL_EXPORT int updateVersion(const KCalCore::FileStorage::Ptr&, QString& versionString);
KALARMCAL_EXPORT int updateVersion(const KCalCore::FileStorage::Ptr&, QString& versionString);
#else
KALARM_CAL_EXPORT int updateVersion(KCal::CalendarLocal& calendar, const QString& localFile, QString& versionString);
KALARMCAL_EXPORT int updateVersion(KCal::CalendarLocal& calendar, const QString& localFile, QString& versionString);
#endif
/** Return a prompt string to ask the user whether to convert the calendar to the
......@@ -125,22 +126,22 @@ namespace KACalendar
* @param whole if true, the whole calendar needs to be converted; else only some
* alarms may need to be converted.
*/
KALARM_CAL_EXPORT QString conversionPrompt(const QString& calendarName, const QString& calendarVersion, bool whole);
KALARMCAL_EXPORT QString conversionPrompt(const QString& calendarName, const QString& calendarVersion, bool whole);
#ifndef USE_KRESOURCES
/** Set the KAlarm version custom property for a calendar. */
KALARM_CAL_EXPORT void setKAlarmVersion(const KCalCore::Calendar::Ptr&);
KALARMCAL_EXPORT void setKAlarmVersion(const KCalCore::Calendar::Ptr&);
#else
KALARM_CAL_EXPORT void setKAlarmVersion(KCal::CalendarLocal&);
KALARMCAL_EXPORT void setKAlarmVersion(KCal::CalendarLocal&);
#endif
/** Set the program name and version for use in calendars. */
KALARM_CAL_EXPORT void setProductId(const QByteArray& progName, const QByteArray& progVersion);
KALARMCAL_EXPORT void setProductId(const QByteArray& progName, const QByteArray& progVersion);
/** Return the product ID string for use in calendars.
* setProductId() must have been called previously.
*/
KALARM_CAL_EXPORT QByteArray icalProductId();
KALARMCAL_EXPORT QByteArray icalProductId();
extern const QByteArray APPNAME; //!< The application name ("KALARM") used in calendar properties
} // namespace KACalendar
......@@ -168,22 +169,22 @@ namespace CalEvent
};
Q_DECLARE_FLAGS(Types, Type)
KALARM_CAL_EXPORT QString uid(const QString& id, Type);
KALARMCAL_EXPORT QString uid(const QString& id, Type);
#ifndef USE_KRESOURCES
KALARM_CAL_EXPORT Type status(const KCalCore::ConstEventPtr&, QString* param = 0);
KALARM_CAL_EXPORT void setStatus(const KCalCore::Event::Ptr&, Type, const QString& param = QString());
KALARMCAL_EXPORT Type status(const KCalCore::ConstEventPtr&, QString* param = 0);
KALARMCAL_EXPORT void setStatus(const KCalCore::Event::Ptr&, Type, const QString& param = QString());
/** Return the alarm Type for a mime type string. */
KALARM_CAL_EXPORT Type type(const QString& mimeType);
KALARMCAL_EXPORT Type type(const QString& mimeType);
/** Return the alarm Types for a list of mime type strings. */
KALARM_CAL_EXPORT Types types(const QStringList& mimeTypes);
KALARMCAL_EXPORT Types types(const QStringList& mimeTypes);
/** Return the mime type string corresponding to an alarm Type. */
KALARM_CAL_EXPORT QString mimeType(Type);
KALARMCAL_EXPORT QString mimeType(Type);
/** Return the mime type strings corresponding to alarm Types. */
KALARM_CAL_EXPORT QStringList mimeTypes(Types);
KALARMCAL_EXPORT QStringList mimeTypes(Types);
#else
KALARM_CAL_EXPORT Type status(const KCal::Event*, QString* param = 0);
KALARM_CAL_EXPORT void setStatus(KCal::Event*, Type, const QString& param = QString());
KALARMCAL_EXPORT Type status(const KCal::Event*, QString* param = 0);
KALARMCAL_EXPORT void setStatus(KCal::Event*, Type, const QString& param = QString());
#endif
} // namespace CalEvent
......
/*
* kaevent.cpp - represents calendar events
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2001-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......
/*
* kaevent.h - represents calendar events
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2001-2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
......@@ -22,7 +23,7 @@
#ifndef KAEVENT_H
#define KAEVENT_H
#include "kalarm_cal_export.h"
#include "kalarmcal_export.h"
#include "datetime.h"
#include "karecurrence.h"
......@@ -75,7 +76,7 @@ namespace KAlarmCal
*
* @author David Jarvie <djarvie@kde.org>
*/
class KALARM_CAL_EXPORT KAAlarm
class KALARMCAL_EXPORT KAAlarm
{
public:
/** The basic KAAlarm action types. */
......@@ -206,7 +207,7 @@ class KALARM_CAL_EXPORT KAAlarm
*
* @author David Jarvie <djarvie@kde.org>
*/
class KALARM_CAL_EXPORT KAEvent
class KALARMCAL_EXPORT KAEvent
{
public:
/** A list of pointers to KAEvent objects. */
......
/* This file is part of the KDE project
Copyright (C) 2007 David Faure <faure@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KALARM_CAL_EXPORT_H
#define KALARM_CAL_EXPORT_H
/* needed for KDE_EXPORT and KDE_IMPORT macros */
#include <kdemacros.h>
#ifndef KALARM_CAL_EXPORT
# if defined(KDEPIM_STATIC_LIBS)
/* No export/import for static libraries */
# define KALARM_CAL_EXPORT
# elif defined(MAKE_KALARM_CALENDAR_LIB)
/* We are building this library */
# define KALARM_CAL_EXPORT KDE_EXPORT
# else
/* We are using this library */
# define KALARM_CAL_EXPORT KDE_IMPORT
# endif
#endif
# ifndef KALARM_CAL_EXPORT_DEPRECATED
# define KALARM_CAL_EXPORT_DEPRECATED KDE_DEPRECATED KALARM_CAL_EXPORT
# endif
#endif
/*
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2011 by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published
* by the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This library 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 Library General Public
* License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef KALARMCAL_EXPORT_H
#define KALARMCAL_EXPORT_H
/* needed for KDE_EXPORT and KDE_IMPORT macros */
#include <kdemacros.h>
#ifndef KALARMCAL_EXPORT
# if defined(KDEPIM_STATIC_LIBS)
/* No export/import for static libraries */
# define KALARMCAL_EXPORT
# elif defined(MAKE_KALARMCAL_LIB)
/* We are building this library */
# define KALARMCAL_EXPORT KDE_EXPORT
# else
/* We are using this library */
# define KALARMCAL_EXPORT KDE_IMPORT
# endif
#endif
# ifndef KALARMCAL_EXPORT_DEPRECATED
# define KALARMCAL_EXPORT_DEPRECATED KDE_DEPRECATED KALARMCAL_EXPORT
# endif
#endif
/*
* karecurrence.cpp - recurrence with special yearly February 29th handling
* Program: kalarm
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2005-2011 by David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment