1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __DMTCOMMITPLUGIN_H__
18#define __DMTCOMMITPLUGIN_H__
19
20#ifndef __cplusplus
21#error "This is a C++ header file; it requires C++ to compile."
22#endif
23
24/**
25 \file dmtCommitPlugin.hpp
26 \brief  The dmtCommitPlugin.hpp header file contains constants and datatypes
27           for the device managment Commit plugin.\n
28           <b>Warning:</b>  All functions, structures, and classes from this header file are for internal usage only!!!
29*/
30
31#include "dmtEventData.hpp"
32#include "dmtPlugin.hpp"
33
34/**
35* Enumeration for Event types, used for backward compatibility
36*/
37enum {
38/** Event "None" */
39    DMT_EVENT_NONE = -1,
40/** Event "Add" */
41    DMT_EVENT_ADD = 0,
42/** Event "Delete" */
43    DMT_EVENT_DELETE = 1,
44/** Event "Replace" */
45    DMT_EVENT_REPLACE = 2,
46/** Event "Indirect Update" */
47    DMT_EVENT_INDIRECT_UPDATE = 3
48};
49/** Definition for DMT_EVENT_T as INT32*/
50typedef INT32 DMT_EVENT_T;
51
52/** Structure Subscription Data, contains info about tree changes, used for backward compatibility */
53struct DM_SUBSCRIPTION_DATA_T
54{
55/**
56* Default constructor
57*/
58  DM_SUBSCRIPTION_DATA_T(){m_eAction = DMT_EVENT_NONE;}
59/**
60* Constructor
61* \param strKey [in] - child node name as a string
62* \param eAction [in] - child node operation as a DMT_EVENT_T
63*/
64  DM_SUBSCRIPTION_DATA_T( const DMString& strKey, DMT_EVENT_T eAction ){m_strKey = strKey; m_eAction = eAction;}
65
66 /** child node name */
67  DMString  m_strKey;
68
69 /** child node operation */
70  DMT_EVENT_T m_eAction;
71};
72
73
74/** DM Subscription Vector, inheritance from  DMVector, used for backward compatibility
75* \par Category: General
76* \par Persistence: Transient
77* \par Security: Non-Secure
78* \par Migration State: FINAL
79*/
80class DMSubscriptionVector : public DMVector<DM_SUBSCRIPTION_DATA_T>
81{
82};
83
84
85#endif //__DMTCOMMITPLUGIN_H__
86