{
internal static class Notification
{
+ internal delegate void ResponseEventCallback(IntPtr ptr, int type, IntPtr userData);
+
[DllImport(Libraries.Notification, EntryPoint = "notification_create")]
internal static extern IntPtr Create(NotificationType type);
[DllImport(Libraries.Notification, EntryPoint = "notification_post")]
internal static extern NotificationError Post(NotificationSafeHandle handle);
+ [DllImport(Libraries.Notification, EntryPoint = "notification_post_with_event_cb")]
+ internal static extern NotificationError PostWithEventCallback(NotificationSafeHandle handle, ResponseEventCallback cb, IntPtr userdata);
+
[DllImport(Libraries.Notification, EntryPoint = "notification_get_pkgname")]
internal static extern NotificationError GetPackageName(NotificationSafeHandle handle, out IntPtr name);
[DllImport(Libraries.Notification, EntryPoint = "notification_set_delete_timeout")]
internal static extern NotificationError SetDeleteTime(NotificationSafeHandle handle, int timeout);
- [DllImport(Libraries.Notification, EntryPoint = "notification_set_extention_data")]
- internal static extern NotificationError SetExtentionData(NotificationSafeHandle handle, string key, SafeBundleHandle bundleHandle);
+ [DllImport(Libraries.Notification, EntryPoint = "notification_set_extension_data")]
+ internal static extern NotificationError SetExtensionData(NotificationSafeHandle handle, string key, SafeBundleHandle bundleHandle);
- [DllImport(Libraries.Notification, EntryPoint = "notification_get_extention_data")]
- internal static extern NotificationError GetExtentionData(NotificationSafeHandle handle, string key, out SafeBundleHandle bundleHandle);
+ [DllImport(Libraries.Notification, EntryPoint = "notification_get_extension_data")]
+ internal static extern NotificationError GetExtensionData(NotificationSafeHandle handle, string key, out SafeBundleHandle bundleHandle);
[DllImport(Libraries.Notification, EntryPoint = "notification_get_args")]
- internal static extern NotificationError GetExtentionBundle(NotificationSafeHandle handle, out IntPtr args, out IntPtr group_args);
+ internal static extern NotificationError GetExtensionBundle(NotificationSafeHandle handle, out IntPtr args, out IntPtr group_args);
[DllImport(Libraries.Notification, EntryPoint = "notification_get_default_button")]
internal static extern NotificationError GetDefaultButton(NotificationSafeHandle handle, out int index);
[DllImport(Libraries.Notification, EntryPoint = "notification_get_extension_event_handler")]
internal static extern NotificationError GetExtensionAction(NotificationSafeHandle handle, NotificationEventType type, out SafeAppControlHandle appcontrol);
+ [DllImport(Libraries.Notification, EntryPoint = "notification_clone")]
+ internal static extern NotificationError Clone(IntPtr handle, out IntPtr cloned);
+
+ [DllImport(Libraries.Notification, EntryPoint = "notification_set_check_box")]
+ internal static extern NotificationError SetCheckBox(NotificationSafeHandle handle, bool flag, bool checkedValue);
+
+ [DllImport(Libraries.Notification, EntryPoint = "notification_get_check_box")]
+ internal static extern NotificationError GetCheckBox(NotificationSafeHandle handle, out bool flag, out bool checkedValue);
+
internal static NotificationError GetText(NotificationSafeHandle handle, NotificationText type, out string text)
{
NotificationError ret;