OmniStacksStaticModules 2.0.0
Loading...
Searching...
No Matches
ReminderSync::anonymous_namespace{ReminderSync.cppm} Namespace Reference

Classes

struct  ProcessResult
 osascript 子进程的退出码与双管道输出。 More...

Functions

bool valid_task_id (std::string_view value)
 任务 ID 只允许字母、数字、-、_,防止注入 action/AppleScript 参数。
std::optional< std::array< int, 3 > > split_date (std::string_view value)
 严格拆分并校验 YYYY-MM-DD;用于 AppleScript 日期构造前的领域校验。
std::string read_descriptor (int descriptor)
 读到 EOF 的管道读取器。
std::expected< ProcessResult, SyncError > run_osascript (std::string_view script, const std::vector< std::string > &arguments)
 启动 osascript,并通过独立 argv 传递用户字段。
std::vector< std::string > common_arguments (const TaskReminder &task, std::string_view marker)
 构造两个 AppleScript 共用的位置参数序列。

Function Documentation

◆ common_arguments()

std::vector< std::string > ReminderSync::anonymous_namespace{ReminderSync.cppm}::common_arguments ( const TaskReminder & task,
std::string_view marker )

构造两个 AppleScript 共用的位置参数序列。

Definition at line 251 of file ReminderSync.cppm.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_descriptor()

std::string ReminderSync::anonymous_namespace{ReminderSync.cppm}::read_descriptor ( int descriptor)

读到 EOF 的管道读取器。

Note
遇到 EINTR 自动重试;其他读取错误结束并保留已读内容。

Definition at line 155 of file ReminderSync.cppm.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_osascript()

std::expected< ProcessResult, SyncError > ReminderSync::anonymous_namespace{ReminderSync.cppm}::run_osascript ( std::string_view script,
const std::vector< std::string > & arguments )

启动 osascript,并通过独立 argv 传递用户字段。

Note
不使用 shell;脚本以 -e 传入,附加参数放在 -- 后。

Definition at line 175 of file ReminderSync.cppm.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ split_date()

std::optional< std::array< int, 3 > > ReminderSync::anonymous_namespace{ReminderSync.cppm}::split_date ( std::string_view value)

严格拆分并校验 YYYY-MM-DD;用于 AppleScript 日期构造前的领域校验。

Definition at line 129 of file ReminderSync.cppm.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid_task_id()

bool ReminderSync::anonymous_namespace{ReminderSync.cppm}::valid_task_id ( std::string_view value)

任务 ID 只允许字母、数字、-、_,防止注入 action/AppleScript 参数。

Definition at line 121 of file ReminderSync.cppm.

Here is the call graph for this function:
Here is the caller graph for this function: