1 //******************************************************************
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 package org.iotivity.service.ns.common;
23 import android.util.Log;
27 * @brief This class provides implementation of Notification Message object.
31 private static final String LOG_TAG = "NotificationService_Message";
33 public enum MessageType
41 private MessageType(int type)
46 public int getMessageType()
51 public long mMessageId = 0;
52 public String mProviderId = null;
54 public String mSourceName = null;
55 public MessageType mType = MessageType.ALERT;
56 public String mTime = null;
58 public String mTitle = null;
59 public String mContentText = null;
60 public MediaContents mMediaContents = null;
62 private long mNativeHandle = 0;
64 public Message(String title, String contentText, String sourceName)
66 Log.i (LOG_TAG, "Message()");
69 mContentText = contentText;
70 mSourceName = sourceName;
73 public long getMessageId()
78 public String getProviderId()
83 public String getSourceName ()
88 public MessageType getType()
93 public String getTime()
103 public String getTitle()
108 public String getContentText()
113 public MediaContents getMediaContents()
115 return mMediaContents;
118 public void setSourceName (String sourceName)
120 mSourceName = sourceName;
123 public void setType(MessageType type)
128 public void setTime(String time)
133 public void setTTL(long ttl)
138 public void setTitle(String title)
143 public void setContentText(String contextText)
145 mContentText = contextText;
148 public void setMediaContents(MediaContents mediaContents)
150 mMediaContents = mediaContents;