# ukui-notification

## Introduction

ukui-notification provides the notification service, notification development library, and notification control plugin for the UKUI desktop environment.

| Binary Package | Description |
|----------------|-------------|
| ukui-notification-server | Notification server |
| libukui-notification1 | Notification library (runtime) |
| libukui-notification-dev | Notification library (development files) |
| libukui-notification-doc | Notification library API documentation (QCH) |

## Table of Contents

- [Notification Server](#notification-server)
- [Notification Library](#notification-library)
- [Notification Control Plugin](#notification-control-plugin)
- [Building](#building)
- [Debian Packaging](#debian-packaging)

## Notification Server

ukui-notification-server implements the freedesktop [Notification Specification](https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html).

### Supported Capabilities

| Capability | Description |
|------------|-------------|
| actions | Notification action buttons |
| body | Rich text body content |
| body-hyperlinks | Hyperlinks in body text |
| persistence | Persistent notifications |
| sound | Notification sound |

### Extended Hints

| Hint Name | Description |
|-----------|-------------|
| x-ukui-display | Specifies which DISPLAY the notification popup should appear on |

### Extended Interfaces

| Interface | Parameters | Return | Description |
|-----------|-----------|--------|-------------|
| org.ukui.NotificationServer.UpdateUnreadMessagesNumber | String desktop_entry, UInt32 number | void | Update unread message count for an application |
| org.ukui.NotificationServer.RegisterNotificationControl | String desktop_entry | void | Register notification control for an application |

## Notification Library

### CMake Integration

```cmake
find_package(ukui-notification)
target_link_libraries(yourapp ukui-notification)
```

### pkg-config Integration

```cmake
find_package(PkgConfig REQUIRED)
pkg_check_modules(NOTIFICATION ukui-notification)
target_include_directories(yourapp ${NOTIFICATION_INCLUDE_DIRS})
target_link_libraries(yourapp ${NOTIFICATION_LIBRARIES})
```

### Public Headers

| Header | Description |
|--------|-------------|
| notification-client.h | Notification center client registration, message sync, and action execution |
| popup-notification.h | Single notification data management |
| notification-close-reason.h | Notification close reason enumeration |
| notification-global-settings.h | Global notification settings |
| applications-settings.h | Application notification behavior settings |
| single-application-settings.h | Per-application notification settings |
| settings-properties.h | Notification settings property definitions |
| settings-properties-info.h | Notification settings property information |
| utils.h | Utility functions |

## Notification Control Plugin

notification-ukcc-plugin is a UKUI Control Center plugin for managing application notification permissions.

## Building

### Dependencies

- cmake, extra-cmake-modules, doxygen, pkgconf, qtchooser
- qt6-base-dev, qt6-declarative-dev, qt6-tools-dev
- libukui-quick-dev (>= 4.20.8.0)
- libukui-search-dev (>= 4.0.1.5)
- libgsettings-qt6-dev
- libkysdk-applications-dev
- libukcc-dev
- kwayland-dev

### Compile

```bash
mkdir build && cd build
cmake ..
make -j$(nproc)
```

### Build Options

| Option | Default | Description |
|--------|---------|-------------|
| BUILD_TEST | OFF | Build test programs |
| BUILD_QCH | ON | Generate QCH format API documentation |

### Install

```bash
sudo make install
```

## Debian Packaging

```bash
dpkg-buildpackage -us -uc -b
```

Generated binary packages:

- `ukui-notification-server` — Notification server executable
- `libukui-notification1` — Runtime library
- `libukui-notification-dev` — Development files (headers, CMake config, pkg-config)
- `libukui-notification-doc` — API documentation

## License

This project is licensed under GPL-3+. See [LICENSE](LICENSE) for details. The third-party component `3rd-parties/qtsingleapplication` is licensed under BSD-3-Clause.
