+++ /dev/null
-/*
- * Copyright 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef MODEL2_DATA_ITEM_H
-#define MODEL2_DATA_ITEM_H
-
-#include <functional>
-#include <tizen.h>
-
-namespace Model2
-{
- class EXPORT_API DataItem
- {
- public:
- /**
- * @brief Change callback
- * @param[in] Changed info
- */
- typedef std::function<void(int)> UpdateCallback;
-
- /**
- * @brief Delete callback
- */
- typedef std::function<void()> DeleteCallback;
-
- virtual ~DataItem() { }
-
- /**
- * @brief Set update callback
- * @param[in] callback Update callback
- */
- void setUpdateCallback(UpdateCallback callback);
-
- /**
- * @brief Unset update callback
- */
- void unsetUpdateCallback();
-
- /**
- * @brief Set delete callback
- * @param[in] callback Delete callback
- */
- void setDeleteCallback(DeleteCallback callback);
-
- /**
- * @brief Unset delete callback
- */
- void unsetDeleteCallback();
-
- protected:
- /**
- * @brief ContactData updated callback
- * @param[in] changes Changed info
- */
- void onUpdated(int changes);
-
- /**
- * @brief ContactData deleted callback
- */
- void onDeleted();
-
- private:
- UpdateCallback m_OnUpdated;
- DeleteCallback m_OnDeleted;
- };
-}
-
-
-
-#endif /* MODEL2_DATA_ITEM_H */
+++ /dev/null
-/*
- * Copyright 2016 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef MODEL2_DATA_PROVIDER_H
-#define MODEL2_DATA_PROVIDER_H
-
-#include "Model2/DataItem.h"
-
-#include <list>
-
-namespace Model2
-{
- class EXPORT_API DataProvider
- {
- public:
- typedef std::list<DataItem *> DataList;
-
- /**
- * @brief Called once initialization is finished.
- */
- typedef std::function<void()> InitializeCallback;
-
- /**
- * @brief Insert callback
- * @param[in] data
- */
- typedef std::function<void(DataItem &)> InsertCallback;
-
- /**
- * @brief Called when provider has finished updating its items.
- */
- typedef std::function<void()> UpdateFinishedCallback;
-
- virtual ~DataProvider() { }
-
- /**
- * @brief Initialize provider data.
- * @remark Should be called before retrieving the data.
- * @param[in] callback Initialization finished callback
- */
- void initialize(InitializeCallback callback);
-
- /**
- * @return Data list
- */
- virtual const DataList &getDataList() = 0;
-
- /**
- * @brief Set insert callback
- * @param[in] callback Create callback
- */
- void setInsertCallback(InsertCallback callback);
-
- /**
- * @brief Unset insert callback
- */
- void unsetInsertCallback();
-
- /**
- * @brief Set update finished callback
- * @param[in] callback Update finished callback
- */
- void setUpdateFinishedCallback(UpdateFinishedCallback callback);
-
- /**
- * @brief Unset update finished callback
- */
- void unsetUpdateFinishedCallback();
-
- protected:
- /**
- * @brief Called after initialize() to initialize provider data.
- * @post onInitialized() should be called when initialization is finished.
- */
- virtual void onInitialize();
-
- /**
- * @brief Should be called to notify that initialization is finished.
- */
- void onInitialized();
-
- /**
- * @brief DataItem inserted callback
- * @param[in] dataItem Data item
- */
- void onInserted(DataItem &dataItem);
-
- /**
- * @brief Should be called to notify that update is finished.
- */
- void onUpdateFinished();
-
- private:
- InitializeCallback m_OnInitialized;
- InsertCallback m_OnInserted;
- UpdateFinishedCallback m_OnUpdateFinished;
- };
-}
-
-#endif /* MODEL2_DATA_PROVIDER_H */
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef LOGS_MODEL_DATA_ITEM_H
+#define LOGS_MODEL_DATA_ITEM_H
+
+#include <functional>
+#include <tizen.h>
+
+namespace Logs
+{
+ namespace Model
+ {
+ class EXPORT_API DataItem
+ {
+ public:
+ /**
+ * @brief Change callback
+ * @param[in] Changed info
+ */
+ typedef std::function<void(int)> UpdateCallback;
+
+ /**
+ * @brief Delete callback
+ */
+ typedef std::function<void()> DeleteCallback;
+
+ virtual ~DataItem() { }
+
+ /**
+ * @brief Set update callback
+ * @param[in] callback Update callback
+ */
+ void setUpdateCallback(UpdateCallback callback);
+
+ /**
+ * @brief Unset update callback
+ */
+ void unsetUpdateCallback();
+
+ /**
+ * @brief Set delete callback
+ * @param[in] callback Delete callback
+ */
+ void setDeleteCallback(DeleteCallback callback);
+
+ /**
+ * @brief Unset delete callback
+ */
+ void unsetDeleteCallback();
+
+ protected:
+ /**
+ * @brief ContactData updated callback
+ * @param[in] changes Changed info
+ */
+ void onUpdated(int changes);
+
+ /**
+ * @brief ContactData deleted callback
+ */
+ void onDeleted();
+
+ private:
+ UpdateCallback m_OnUpdated;
+ DeleteCallback m_OnDeleted;
+ };
+ }
+}
+
+
+
+#endif /* LOGS_MODEL_DATA_ITEM_H */
--- /dev/null
+/*
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef LOGS_MODEL_DATA_PROVIDER_H
+#define LOGS_MODEL_DATA_PROVIDER_H
+
+#include "Logs/Model/DataItem.h"
+
+#include <list>
+
+namespace Logs
+{
+ namespace Model
+ {
+ class EXPORT_API DataProvider
+ {
+ public:
+ typedef std::list<DataItem *> DataList;
+
+ /**
+ * @brief Called once initialization is finished.
+ */
+ typedef std::function<void()> InitializeCallback;
+
+ /**
+ * @brief Insert callback
+ * @param[in] data
+ */
+ typedef std::function<void(DataItem &)> InsertCallback;
+
+ /**
+ * @brief Called when provider has finished updating its items.
+ */
+ typedef std::function<void()> UpdateFinishedCallback;
+
+ virtual ~DataProvider() { }
+
+ /**
+ * @brief Initialize provider data.
+ * @remark Should be called before retrieving the data.
+ * @param[in] callback Initialization finished callback
+ */
+ void initialize(InitializeCallback callback);
+
+ /**
+ * @return Data list
+ */
+ virtual const DataList &getDataList() = 0;
+
+ /**
+ * @brief Set insert callback
+ * @param[in] callback Create callback
+ */
+ void setInsertCallback(InsertCallback callback);
+
+ /**
+ * @brief Unset insert callback
+ */
+ void unsetInsertCallback();
+
+ /**
+ * @brief Set update finished callback
+ * @param[in] callback Update finished callback
+ */
+ void setUpdateFinishedCallback(UpdateFinishedCallback callback);
+
+ /**
+ * @brief Unset update finished callback
+ */
+ void unsetUpdateFinishedCallback();
+
+ protected:
+ /**
+ * @brief Called after initialize() to initialize provider data.
+ * @post onInitialized() should be called when initialization is finished.
+ */
+ virtual void onInitialize();
+
+ /**
+ * @brief Should be called to notify that initialization is finished.
+ */
+ void onInitialized();
+
+ /**
+ * @brief DataItem inserted callback
+ * @param[in] dataItem Data item
+ */
+ void onInserted(DataItem &dataItem);
+
+ /**
+ * @brief Should be called to notify that update is finished.
+ */
+ void onUpdateFinished();
+
+ private:
+ InitializeCallback m_OnInitialized;
+ InsertCallback m_OnInserted;
+ UpdateFinishedCallback m_OnUpdateFinished;
+ };
+ }
+}
+
+#endif /* LOGS_MODEL_DATA_PROVIDER_H */
#ifndef LOGS_MODEL_LOG_H
#define LOGS_MODEL_LOG_H
-#include "Model2/DataItem.h"
+#include "Logs/Model/DataItem.h"
#include <contacts.h>
#include <time.h>
/**
* @brief Log record information
*/
- class Log : public ::Model2::DataItem
+ class Log : public DataItem
{
public:
/**
#include <time.h>
#include <memory>
-#include "Model2/DataProvider.h"
+#include "Logs/Model/DataProvider.h"
#include "Logs/Model/Log.h"
#include "Logs/Model/LogGroup.h"
/**
* @brief Provides list of logs
*/
- class LogProvider : public ::Model2::DataProvider
+ class LogProvider : public DataProvider
{
public:
/**
* limitations under the License.
*/
-#include "Model2/DataItem.h"
+#include "Logs/Model/DataItem.h"
-using namespace Model2;
+using namespace Logs::Model;
void DataItem::setUpdateCallback(UpdateCallback callback)
{
* limitations under the License.
*/
-#include "Model2/DataProvider.h"
+#include "Logs/Model/DataProvider.h"
-using namespace Model2;
+using namespace Logs::Model;
void DataProvider::initialize(InitializeCallback callback)
{