57):
58 """Create an ephemeral (non-interactive) notification
59
60 :param summary: Summary text for the notification
61 :param body: Body text to display in the notification
62 :param icon: Path string to the icon to use
63 :param hint_strings: List of tuples containing the 'name' and value
64 for setting the hint strings for the notification
65 :param urgency: Urgency string for the noticiation, either: 'LOW',
66 'NORMAL', 'CRITICAL'
67 """
68 Notify.init('Lomiri')
69
70 logger.info(
71 "Creating ephemeral: summary(%s), body(%s), urgency(%r) "
72 "and Icon(%s)",
73 summary,
74 body,
75 urgency,
76 icon
77 )
78
79 notification = Notify.Notification.new(summary, body, icon)
80
81 for hint in hints:
82 key, value = hint
83 notification.set_hint_string(key, value)
84 logger.info("Adding hint to notification: (%s, %s)", key, value)
85 notification.set_urgency(_get_urgency(urgency))
86
87 return notification
88
89