#include "PrinterFileSystem.h"
#include "libslic3r/Utils.hpp"
#include "libslic3r/Format/bbs_3mf.hpp"
#include "libslic3r/Model.hpp"
#include "slic3r/GUI/I18N.hpp"
#include "../../Utils/NetworkAgent.hpp"
#include "../BitmapCache.hpp"
#include <algorithm>
#include <boost/algorithm/hex.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/date_time/posix_time/posix_time_config.hpp>
#include <boost/endian/conversion.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/log/trivial.hpp>
#include <boost/thread/lock_types.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/weak_ptr.hpp>
#include <boost/uuid/detail/md5.hpp>
#include <boost/regex.hpp>
#include <string>
#include <cerrno>
#include <system_error>
#include <wx/event.h>
#include <map>
#include "slic3r/GUI/Printer/BambuTunnel.h"
#include <vector>
#include <cassert>
#include <utility>
#include <ctime>
#include <openssl/md5.h>
#include <memory>
#include <wx/log.h>
#include <ios>
#include <iterator>
#include <filesystem>
#include <functional>
#include <wx/datetime.h>
#include <sstream>
#include <istream>
#include "libslic3r/Semver.hpp"
#include <cmath>
#include <cstdio>
#include <cctype>
#include <wx/mstream.h>
#include "nlohmann/json.hpp"
#include <cstring>
#include <wx/thread.h>
#include <stdlib.h>
#include "libslic3r/PrintConfig.hpp"
#include <dlfcn.h>
Go to the source code of this file.
|
| std::string | last_system_error () |
| | wxDEFINE_EVENT (EVT_STATUS_CHANGED, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_MODE_CHANGED, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_FILE_CHANGED, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_SELECT_CHANGED, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_THUMBNAIL, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_DOWNLOAD, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_RAMDOWNLOAD, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_MEDIA_ABILITY_CHANGED, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_UPLOADING, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_UPLOAD_CHANGED, wxCommandEvent) |
| | wxDEFINE_EVENT (EVT_FILE_CALLBACK, wxCommandEvent) |
| static std::string | durationString (long duration) |
| static void * | get_function (const char *name) |
| BambuLib * | bambulib_get () |
◆ GET_FUNC
Value:
static void * get_function(const char *name)
Definition PrinterFileSystem.cpp:1836
Referenced by StaticBambuLib::get().
◆ ThumbnailType
| Enumerator |
|---|
| OldThumbnail | |
| VideoThumbnail | |
| ModelMetadata | |
| ModelThumbnail | |
| FinishThumbnail | |
944{
950};
@ ModelMetadata
Definition PrinterFileSystem.cpp:947
@ ModelThumbnail
Definition PrinterFileSystem.cpp:948
@ VideoThumbnail
Definition PrinterFileSystem.cpp:946
@ OldThumbnail
Definition PrinterFileSystem.cpp:945
@ FinishThumbnail
Definition PrinterFileSystem.cpp:949
◆ bambulib_get()
| BambuLib * bambulib_get |
( |
| ) |
|
1909 {
static StaticBambuLib & get(BambuLib *copy=nullptr)
Definition PrinterFileSystem.cpp:1857
References StaticBambuLib::get().
◆ durationString()
| std::string durationString |
( |
long | duration | ) |
|
|
static |
994{
995 static boost::regex rx("^0d(0h)?");
996 auto time = boost::format("%1%d%2%h%3%m") % (duration / 86400) % ((duration % 86400) / 3600) % ((duration % 3600) / 60);
997 return boost::regex_replace(time.str(), rx, "");
998}
Referenced by PrinterFileSystem::ParseThumbnail().
◆ get_function()
| void * get_function |
( |
const char * | name | ) |
|
|
static |
1837{
1838 void* function = nullptr;
1839
1841 return function;
1842
1843#if defined(_MSC_VER) || defined(_WIN32)
1844 function =
reinterpret_cast<void*
>(GetProcAddress(
module, name));
1845#else
1846 function = dlsym(
module, name);
1847#endif
1848
1849 if (!function) {
1850 BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(", can not find function %1%") % name;
1851 }
1852 return function;
1853}
static void * module
Definition Mouse3DHandlerMac.mm:93
References module.
◆ last_system_error()
| std::string last_system_error |
( |
| ) |
|
◆ wxDEFINE_EVENT() [1/11]
| wxDEFINE_EVENT |
( |
EVT_DOWNLOAD | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [2/11]
| wxDEFINE_EVENT |
( |
EVT_FILE_CALLBACK | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [3/11]
| wxDEFINE_EVENT |
( |
EVT_FILE_CHANGED | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [4/11]
| wxDEFINE_EVENT |
( |
EVT_MEDIA_ABILITY_CHANGED | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [5/11]
| wxDEFINE_EVENT |
( |
EVT_MODE_CHANGED | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [6/11]
| wxDEFINE_EVENT |
( |
EVT_RAMDOWNLOAD | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [7/11]
| wxDEFINE_EVENT |
( |
EVT_SELECT_CHANGED | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [8/11]
| wxDEFINE_EVENT |
( |
EVT_STATUS_CHANGED | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [9/11]
| wxDEFINE_EVENT |
( |
EVT_THUMBNAIL | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [10/11]
| wxDEFINE_EVENT |
( |
EVT_UPLOAD_CHANGED | , |
|
|
wxCommandEvent | ) |
◆ wxDEFINE_EVENT() [11/11]
| wxDEFINE_EVENT |
( |
EVT_UPLOADING | , |
|
|
wxCommandEvent | ) |
◆ default_thumbnail
| wxBitmap default_thumbnail |
|
static |
◆ error_messages
| std::map<int, std::string> error_messages |
|
static |
Initial value:= {
}
#define L(s)
Definition ExtrusionEntity.cpp:25
@ ERROR_PIPE
Definition PrinterFileSystem.h:62
@ FILE_NO_EXIST
Definition PrinterFileSystem.h:66
@ ERROR_RES_BUSY
Definition PrinterFileSystem.h:64
@ FILE_WRITE_ERR
Definition PrinterFileSystem.h:78
@ API_VERSION_UNSUPPORT
Definition PrinterFileSystem.h:74
@ FILE_CHECK_ERR
Definition PrinterFileSystem.h:71
@ FILE_TYPE_ERR
Definition PrinterFileSystem.h:72
@ FILE_EXIST
Definition PrinterFileSystem.h:75
@ STORAGE_UNAVAILABLE
Definition PrinterFileSystem.h:73
@ ERROR_TIME_OUT
Definition PrinterFileSystem.h:65
@ STORAGE_SPACE_NOT_ENOUGH
Definition PrinterFileSystem.h:76
@ SEND_ERR
Definition PrinterFileSystem.h:81
@ FILE_RENAME_ERR
Definition PrinterFileSystem.h:80
@ FILE_CREATE_ERR
Definition PrinterFileSystem.h:77
@ MD5_COMPARE_ERR
Definition PrinterFileSystem.h:79