From 0864314ca2083ad584323997e1eabc570125d2a1 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 12 Mar 2015 20:50:43 -0400 Subject: Add Checksum support for FreeBSD, and tie it into lumina-fm. --- libLumina/LuminaOS-Debian.cpp | 5 +++++ libLumina/LuminaOS-DragonFly.cpp | 5 +++++ libLumina/LuminaOS-FreeBSD.cpp | 12 ++++++++++++ libLumina/LuminaOS-Linux.cpp | 4 ++++ libLumina/LuminaOS-OpenBSD.cpp | 4 ++++ libLumina/LuminaOS-kFreeBSD.cpp | 6 +++++- libLumina/LuminaOS-template.cpp | 5 +++++ libLumina/LuminaOS.h | 3 +++ 8 files changed, 43 insertions(+), 1 deletion(-) (limited to 'libLumina') diff --git a/libLumina/LuminaOS-Debian.cpp b/libLumina/LuminaOS-Debian.cpp index 8228d7c4..4f2032fa 100644 --- a/libLumina/LuminaOS-Debian.cpp +++ b/libLumina/LuminaOS-Debian.cpp @@ -193,4 +193,9 @@ int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining return 0; //not implemented yet for Linux } +//File Checksums +QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the input file + return QStringList(); +} + #endif diff --git a/libLumina/LuminaOS-DragonFly.cpp b/libLumina/LuminaOS-DragonFly.cpp index dd9320fc..35bff04c 100644 --- a/libLumina/LuminaOS-DragonFly.cpp +++ b/libLumina/LuminaOS-DragonFly.cpp @@ -171,4 +171,9 @@ int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining return LUtils::getCmdOutput("apm -t").join("").toInt(); } +//File Checksums +QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the input file + return QStringList(); +} + #endif diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp index c58d2397..269bed52 100644 --- a/libLumina/LuminaOS-FreeBSD.cpp +++ b/libLumina/LuminaOS-FreeBSD.cpp @@ -183,4 +183,16 @@ int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining return LUtils::getCmdOutput("apm -t").join("").toInt(); } +//File Checksums +QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the input file + QStringList info = LUtils::getCmdOutput("md5 \""+filepaths.join("\" \"")+"\""); + for(int i=0; i