libstorage
|
00001 /* 00002 * Copyright (c) [2004-2014] Novell, Inc. 00003 * 00004 * All Rights Reserved. 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of version 2 of the GNU General Public License as published 00008 * by the Free Software Foundation. 00009 * 00010 * This program is distributed in the hope that it will be useful, but WITHOUT 00011 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00013 * more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, contact Novell, Inc. 00017 * 00018 * To contact Novell about this file by physical or electronic mail, you may 00019 * find current contact information at www.novell.com. 00020 */ 00021 00022 00023 #ifndef HUMAN_STRING_H 00024 #define HUMAN_STRING_H 00025 00026 #include "storage/StorageSwig.h" 00027 00028 #include <string> 00029 00030 using std::string; 00031 00032 00033 namespace storage 00034 { 00035 00041 int numSuffixes(); 00042 00050 string getSuffix(int i, bool classic); 00051 00052 00063 string byteToHumanString(unsigned long long size, bool classic, int precision, 00064 bool omit_zeroes); 00065 00079 bool humanStringToByte(const string& str, bool classic, unsigned long long& SWIG_OUTPUT(size)); 00080 00081 } 00082 00083 00084 #endif