示例#1
0
        internal static NotificationError GetSound(NotificationSafeHandle handle, out AccessoryOption type, out string path)
        {
            NotificationError ret;
            IntPtr            ptr;

            ret = GetSoundReferenceType(handle, out type, out ptr);

            if (ptr == IntPtr.Zero)
            {
                path = null;
            }
            else
            {
                path = Marshal.PtrToStringAnsi(ptr);
            }

            return(ret);
        }
        internal static ErrorCode GetVibration(NotificationSafeHandle handle, out AccessoryOption type, out string path)
        {
            ErrorCode err;
            IntPtr    ptr;

            err = GetVibrationReferenceType(handle, out type, out ptr);

            if (ptr == IntPtr.Zero)
            {
                path = null;
            }
            else
            {
                path = Marshal.PtrToStringAnsi(ptr);
            }

            return(err);
        }
示例#3
0
 internal static extern NotificationError SetLed(NotificationSafeHandle handle, AccessoryOption type, int color);
示例#4
0
 internal static extern NotificationError SetVibration(NotificationSafeHandle handle, AccessoryOption type, string path);
示例#5
0
 internal static extern NotificationError GetVibrationReferenceType(NotificationSafeHandle handle, out AccessoryOption type, out IntPtr path);
 internal static extern ErrorCode GetLed(NotificationSafeHandle handle, out AccessoryOption type, out int color);
 internal static extern ErrorCode GetSoundReferenceType(NotificationSafeHandle handle, out AccessoryOption type, out IntPtr path);