2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 namespace Tizen.Account.AccountManager
22 /// Event arguments passed when Event is triggered to notify that account is updated/removed from the account database.
24 /// <since_tizen> 3 </since_tizen>
25 public class AccountSubscriberEventArgs : EventArgs
27 private const string NotiInsert = "insert";
28 private const string NotiDelete = "delete";
29 private const string NotiUpdate = "update";
30 private const string NotiSyncUpdate = "sync_update";
31 internal AccountSubscriberEventArgs(string eventType, int accountId)
33 if (eventType.CompareTo(NotiInsert) == 0)
35 EventType = AccountNotificationType.Insert;
37 else if (eventType.CompareTo(NotiDelete) == 0)
39 EventType = AccountNotificationType.Delete;
41 else if (eventType.CompareTo(NotiUpdate) == 0)
43 EventType = AccountNotificationType.Update;
45 else if (eventType.CompareTo(NotiSyncUpdate) == 0)
47 EventType = AccountNotificationType.syncUpdate;
50 AccountId = accountId;
54 /// The account event type
56 /// <since_tizen> 3 </since_tizen>
57 public AccountNotificationType EventType
64 /// The account ID to update
66 /// <since_tizen> 3 </since_tizen>