Delete timedate_i.h file.
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
This commit is contained in:
parent
ac8fe7a5b1
commit
c9ef3709fe
162
0001-feature-timedate-Delete-timedate_i.h-file.patch
Normal file
162
0001-feature-timedate-Delete-timedate_i.h-file.patch
Normal file
@ -0,0 +1,162 @@
|
||||
From 929f76de69e1e14f5f52925da9f05c577acaea7b Mon Sep 17 00:00:00 2001
|
||||
From: tangjie02 <tangjie02@kylinsec.com.cn>
|
||||
Date: Fri, 28 Oct 2022 15:34:01 +0800
|
||||
Subject: [PATCH] feature(timedate): Delete timedate_i.h file.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 删除timedate_i.h文件,因为文件命名格式错误。
|
||||
|
||||
Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
|
||||
---
|
||||
include/timedate-i.h | 32 +++++++++++++++--
|
||||
include/timedate_i.h | 51 ---------------------------
|
||||
plugins/timedate/timedate-format.h | 3 +-
|
||||
plugins/timedate/timedate-manager.cpp | 8 ++---
|
||||
4 files changed, 34 insertions(+), 60 deletions(-)
|
||||
delete mode 100644 include/timedate_i.h
|
||||
|
||||
diff --git a/include/timedate-i.h b/include/timedate-i.h
|
||||
index d80caf9..6091b6c 100644
|
||||
--- a/include/timedate-i.h
|
||||
+++ b/include/timedate-i.h
|
||||
@@ -14,5 +14,33 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#define TIMEDATE_NEW_INTERFACE
|
||||
-#include <kiran-system-daemon/timedate_i.h>
|
||||
\ No newline at end of file
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+{
|
||||
+#endif
|
||||
+
|
||||
+#define TIMEDATE_DBUS_NAME "com.kylinsec.Kiran.SystemDaemon.TimeDate"
|
||||
+#define TIMEDATE_OBJECT_PATH "/com/kylinsec/Kiran/SystemDaemon/TimeDate"
|
||||
+#define TIMEDATE_DBUS_INTERFACE_NAME "com.kylinsec.Kiran.SystemDaemon.TimeDate"
|
||||
+
|
||||
+ enum TimedateDateFormatType
|
||||
+ {
|
||||
+ // 时间日期的长格式
|
||||
+ TIMEDATE_FORMAT_TYPE_LONG = 0,
|
||||
+ // 时间日期的短格式
|
||||
+ TIMEDATE_FORMAT_TYPE_SHORT,
|
||||
+ TIMEDATE_FORMAT_TYPE_LAST,
|
||||
+ };
|
||||
+
|
||||
+ enum TimedateHourFormat
|
||||
+ {
|
||||
+ // 12小时制
|
||||
+ TIMEDATE_HOUSR_FORMAT_12_HOURS = 0,
|
||||
+ // 24小时制
|
||||
+ TIMEDATE_HOUSR_FORMAT_24_HOURS,
|
||||
+ TIMEDATE_HOUSR_FORMAT_LAST
|
||||
+ };
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/include/timedate_i.h b/include/timedate_i.h
|
||||
deleted file mode 100644
|
||||
index 4607553..0000000
|
||||
--- a/include/timedate_i.h
|
||||
+++ /dev/null
|
||||
@@ -1,51 +0,0 @@
|
||||
-/**
|
||||
- * Copyright (c) 2020 ~ 2021 KylinSec Co., Ltd.
|
||||
- * kiran-cc-daemon is licensed under Mulan PSL v2.
|
||||
- * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
- * You may obtain a copy of Mulan PSL v2 at:
|
||||
- * http://license.coscl.org.cn/MulanPSL2
|
||||
- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||
- * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||
- * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||
- * See the Mulan PSL v2 for more details.
|
||||
- *
|
||||
- * Author: tangjie02 <tangjie02@kylinos.com.cn>
|
||||
- */
|
||||
-
|
||||
-
|
||||
-#pragma once
|
||||
-
|
||||
-#ifndef TIMEDATE_NEW_INTERFACE
|
||||
-#warning This file will be deprecated. please use timedate-i.h file
|
||||
-#endif
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-extern "C"
|
||||
-{
|
||||
-#endif
|
||||
-
|
||||
-#define TIMEDATE_DBUS_NAME "com.kylinsec.Kiran.SystemDaemon.TimeDate"
|
||||
-#define TIMEDATE_OBJECT_PATH "/com/kylinsec/Kiran/SystemDaemon/TimeDate"
|
||||
-#define TIMEDATE_DBUS_INTERFACE_NAME "com.kylinsec.Kiran.SystemDaemon.TimeDate"
|
||||
-
|
||||
- enum TimedateDateFormatType
|
||||
- {
|
||||
- // 时间日期的长格式
|
||||
- TIMEDATE_FORMAT_TYPE_LONG = 0,
|
||||
- // 时间日期的短格式
|
||||
- TIMEDATE_FORMAT_TYPE_SHORT,
|
||||
- TIMEDATE_FORMAT_TYPE_LAST,
|
||||
- };
|
||||
-
|
||||
- enum TimedateHourFormat
|
||||
- {
|
||||
- // 12小时制
|
||||
- TIMEDATE_HOUSR_FORMAT_12_HOURS = 0,
|
||||
- // 24小时制
|
||||
- TIMEDATE_HOUSR_FORMAT_24_HOURS,
|
||||
- TIMEDATE_HOUSR_FORMAT_LAST
|
||||
- };
|
||||
-
|
||||
-#ifdef __cplusplus
|
||||
-}
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/plugins/timedate/timedate-format.h b/plugins/timedate/timedate-format.h
|
||||
index 764b7d8..f938bba 100644
|
||||
--- a/plugins/timedate/timedate-format.h
|
||||
+++ b/plugins/timedate/timedate-format.h
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
#include "lib/base/base.h"
|
||||
|
||||
-#define TIMEDATE_NEW_INTERFACE
|
||||
-#include "timedate_i.h"
|
||||
+#include "timedate-i.h"
|
||||
|
||||
namespace Kiran
|
||||
{
|
||||
diff --git a/plugins/timedate/timedate-manager.cpp b/plugins/timedate/timedate-manager.cpp
|
||||
index 6978874..92a4147 100644
|
||||
--- a/plugins/timedate/timedate-manager.cpp
|
||||
+++ b/plugins/timedate/timedate-manager.cpp
|
||||
@@ -33,8 +33,7 @@
|
||||
#include "plugins/timedate/timedate-def.h"
|
||||
#include "plugins/timedate/timedate-util.h"
|
||||
|
||||
-#define TIMEDATE_NEW_INTERFACE
|
||||
-#include "timedate_i.h"
|
||||
+#include "timedate-i.h"
|
||||
|
||||
#ifdef HAVE_SELINUX
|
||||
#include <selinux/selinux.h>
|
||||
@@ -899,9 +898,8 @@ bool TimedateManager::check_timezone_name(const std::string &name)
|
||||
name.length() > MAX_TIMEZONE_LENGTH)
|
||||
return false;
|
||||
|
||||
- auto iter = std::find_if(name.begin(), name.end(), [](char c) -> bool {
|
||||
- return !g_ascii_isalnum(c) && !strchr("+-_/", c);
|
||||
- });
|
||||
+ auto iter = std::find_if(name.begin(), name.end(), [](char c) -> bool
|
||||
+ { return !g_ascii_isalnum(c) && !strchr("+-_/", c); });
|
||||
|
||||
if (iter != name.end())
|
||||
{
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
Name: kiran-cc-daemon
|
||||
Version: 2.4.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: DBus daemon for Kiran Desktop
|
||||
|
||||
License: MulanPSL-2.0
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch0001: 0001-feature-timedate-Delete-timedate_i.h-file.patch
|
||||
|
||||
|
||||
BuildRequires: cmake >= 3.2
|
||||
BuildRequires: pkgconfig(glibmm-2.4)
|
||||
@ -150,6 +152,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
|
||||
%{_libdir}/pkgconfig/kiran-cc-daemon.pc
|
||||
|
||||
%changelog
|
||||
* Fri Oct 28 2022 tangjie02 <tangjie02@kylinsec.com.cn> - 2.4.0-2
|
||||
- KYOS-F: Delete timedate_i.h file.
|
||||
|
||||
* Tue Oct 25 2022 tangjie02 <tangjie02@kylinsec.com.cn> - 2.4.0-1
|
||||
- KYOS-F: init commit for v2.4 version.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user