-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deal with ranges -> message_ranges column rename (years ago... oops).…
… Update CMakeLists (newer c++std if available, prepare for needing DBUS). clearData on failure-exit in dumpavatars. Prep work for avatar extensions (#232). Properly import stickers in quotes on importfromdesktop. Refactor.
- Loading branch information
Showing
23 changed files
with
546 additions
and
446 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
Copyright (C) 2024 Selwin van Dijk | ||
This file is part of signalbackup-tools. | ||
signalbackup-tools is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
signalbackup-tools is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with signalbackup-tools. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef ATTACHMENTMETADATA_H_ | ||
#define ATTACHMENTMETADATA_H_ | ||
|
||
#include <string> | ||
|
||
struct AttachmentMetadata | ||
{ | ||
int width; | ||
int height; | ||
std::string filetype; | ||
long long int filesize; | ||
std::string hash; | ||
std::string filename; | ||
operator bool() const | ||
{ | ||
return (width != -1 && height != -1 && !filetype.empty() && filesize != 0); | ||
} | ||
|
||
static AttachmentMetadata getAttachmentMetaData(std::string const &filename, bool skiphash = false); | ||
static AttachmentMetadata getAttachmentMetaData(std::string const &filename, unsigned char *data, | ||
long long int data_size, bool skiphash = false); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.