Merge branch 'master' into notification-service
[platform/upstream/iotivity.git] / service / notification / android / notification-service / src / main / java / org / iotivity / service / ns / IoTNotification.java
1 package org.iotivity.service.ns;
2
3 import android.util.Log;
4 import org.iotivity.service.ns.NSMessage;
5 import org.iotivity.service.ns.NSConsumer;
6 import org.iotivity.service.ns.NSSync;
7
8 public class IoTNotification
9 {
10     public IoTNotification()
11     {
12     }
13
14     static
15     {
16         System.loadLibrary("notification_provider_jni");
17     }
18
19     public native int NSStartProvider(boolean access,
20         NSSubscriptionListner subscriptionListener,
21         NSSynchListner syncListener);
22     public native int NSStopProvider();
23     public native int NSSendNotification(NSMessage message);
24     public native int NSProviderReadCheck(NSMessage message);
25     public native int NSAccept(NSConsumer consumer, boolean accepted);
26
27     public interface NSSubscriptionListner {
28         public void OnNSSubscribedEvent(String consumerId);
29     }
30
31     public interface NSSynchListner {
32         public void OnNSSynchronizedEvent(String messageId, int syncState);
33     }
34 }
35