summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp186
1 files changed, 0 insertions, 186 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f1fdfc548b..e35375f43c 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -507,192 +507,6 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
}
}
-// S32 exported_object_count = 0;
-// S32 exported_image_count = 0;
-// S32 current_object_count = 0;
-// S32 current_image_count = 0;
-
-// extern LLNotifyBox *gExporterNotify;
-// extern LLUUID gExporterRequestID;
-// extern std::string gExportDirectory;
-
-// extern LLUploadDialog *gExportDialog;
-
-// std::string gExportedFile;
-
-// std::map<LLUUID, std::string> gImageChecksums;
-
-// void export_complete()
-// {
-// LLUploadDialog::modalUploadFinished();
-// gExporterRequestID.setNull();
-// gExportDirectory = "";
-
-// LLFILE* fXML = LLFile::fopen(gExportedFile, "rb"); /* Flawfinder: ignore */
-// fseek(fXML, 0, SEEK_END);
-// long length = ftell(fXML);
-// fseek(fXML, 0, SEEK_SET);
-// U8 *buffer = new U8[length + 1];
-// size_t nread = fread(buffer, 1, length, fXML);
-// if (nread < (size_t) length)
-// {
-// LL_WARNS("Messaging") << "Short read" << LL_ENDL;
-// }
-// buffer[nread] = '\0';
-// fclose(fXML);
-
-// char *pos = (char *)buffer;
-// while ((pos = strstr(pos+1, "<sl:image ")) != 0)
-// {
-// char *pos_check = strstr(pos, "checksum=\"");
-
-// if (pos_check)
-// {
-// char *pos_uuid = strstr(pos_check, "\">");
-
-// if (pos_uuid)
-// {
-// char image_uuid_str[UUID_STR_SIZE]; /* Flawfinder: ignore */
-// memcpy(image_uuid_str, pos_uuid+2, UUID_STR_SIZE-1); /* Flawfinder: ignore */
-// image_uuid_str[UUID_STR_SIZE-1] = 0;
-
-// LLUUID image_uuid(image_uuid_str);
-
-// LL_INFOS("Messaging") << "Found UUID: " << image_uuid << LL_ENDL;
-
-// std::map<LLUUID, std::string>::iterator itor = gImageChecksums.find(image_uuid);
-// if (itor != gImageChecksums.end())
-// {
-// LL_INFOS("Messaging") << "Replacing with checksum: " << itor->second << LL_ENDL;
-// if (!itor->second.empty())
-// {
-// memcpy(&pos_check[10], itor->second.c_str(), 32); /* Flawfinder: ignore */
-// }
-// }
-// }
-// }
-// }
-
-// LLFILE* fXMLOut = LLFile::fopen(gExportedFile, "wb"); /* Flawfinder: ignore */
-// if (fwrite(buffer, 1, length, fXMLOut) != length)
-// {
-// LL_WARNS("Messaging") << "Short write" << LL_ENDL;
-// }
-// fclose(fXMLOut);
-
-// delete [] buffer;
-// }
-
-
-// void exported_item_complete(const LLTSCode status, void *user_data)
-// {
-// //std::string *filename = (std::string *)user_data;
-
-// if (status < LLTS_OK)
-// {
-// LL_WARNS("Messaging") << "Export failed!" << LL_ENDL;
-// }
-// else
-// {
-// ++current_object_count;
-// if (current_image_count == exported_image_count && current_object_count == exported_object_count)
-// {
-// LL_INFOS("Messaging") << "*** Export complete ***" << LL_ENDL;
-
-// export_complete();
-// }
-// else
-// {
-// gExportDialog->setMessage(llformat("Exported %d/%d object files, %d/%d textures.", current_object_count, exported_object_count, current_image_count, exported_image_count));
-// }
-// }
-// }
-
-// struct exported_image_info
-// {
-// LLUUID image_id;
-// std::string filename;
-// U32 image_num;
-// };
-
-// void exported_j2c_complete(const LLTSCode status, void *user_data)
-// {
-// exported_image_info *info = (exported_image_info *)user_data;
-// LLUUID image_id = info->image_id;
-// U32 image_num = info->image_num;
-// std::string filename = info->filename;
-// delete info;
-
-// if (status < LLTS_OK)
-// {
-// LL_WARNS("Messaging") << "Image download failed!" << LL_ENDL;
-// }
-// else
-// {
-// LLFILE* fIn = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */
-// if (fIn)
-// {
-// LLPointer<LLImageJ2C> ImageUtility = new LLImageJ2C;
-// LLPointer<LLImageTGA> TargaUtility = new LLImageTGA;
-
-// fseek(fIn, 0, SEEK_END);
-// S32 length = ftell(fIn);
-// fseek(fIn, 0, SEEK_SET);
-// U8 *buffer = ImageUtility->allocateData(length);
-// if (fread(buffer, 1, length, fIn) != length)
-// {
-// LL_WARNS("Messaging") << "Short read" << LL_ENDL;
-// }
-// fclose(fIn);
-// LLFile::remove(filename);
-
-// // Convert to TGA
-// LLPointer<LLImageRaw> image = new LLImageRaw();
-
-// ImageUtility->updateData();
-// ImageUtility->decode(image, 100000.0f);
-
-// TargaUtility->encode(image);
-// U8 *data = TargaUtility->getData();
-// S32 data_size = TargaUtility->getDataSize();
-
-// std::string file_path = gDirUtilp->getDirName(filename);
-
-// std::string output_file = llformat("%s/image-%03d.tga", file_path.c_str(), image_num);//filename;
-// //S32 name_len = output_file.length();
-// //strcpy(&output_file[name_len-3], "tga");
-// LLFILE* fOut = LLFile::fopen(output_file, "wb"); /* Flawfinder: ignore */
-// char md5_hash_string[33]; /* Flawfinder: ignore */
-// strcpy(md5_hash_string, "00000000000000000000000000000000"); /* Flawfinder: ignore */
-// if (fOut)
-// {
-// if (fwrite(data, 1, data_size, fOut) != data_size)
-// {
-// LL_WARNS("Messaging") << "Short write" << LL_ENDL;
-// }
-// fseek(fOut, 0, SEEK_SET);
-// fclose(fOut);
-// fOut = LLFile::fopen(output_file, "rb"); /* Flawfinder: ignore */
-// LLMD5 my_md5_hash(fOut);
-// my_md5_hash.hex_digest(md5_hash_string);
-// }
-
-// gImageChecksums.insert(std::pair<LLUUID, std::string>(image_id, md5_hash_string));
-// }
-// }
-
-// ++current_image_count;
-// if (current_image_count == exported_image_count && current_object_count == exported_object_count)
-// {
-// LL_INFOS("Messaging") << "*** Export textures complete ***" << LL_ENDL;
-// export_complete();
-// }
-// else
-// {
-// gExportDialog->setMessage(llformat("Exported %d/%d object files, %d/%d textures.", current_object_count, exported_object_count, current_image_count, exported_image_count));
-// }
-//}
-
void process_derez_ack(LLMessageSystem*, void**)
{
if(gViewerWindow) gViewerWindow->getWindow()->decBusyCount();