summaryrefslogtreecommitdiff
path: root/indra/newview/lldirpicker.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldirpicker.h')
-rw-r--r--indra/newview/lldirpicker.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index 8656b23afd..c7dba12130 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -33,6 +33,13 @@
#include "stdtypes.h"
+#include "llthread.h"
+#include <queue>
+
+#if LL_WINDOWS
+#include <shlobj.h>
+#endif
+
#if LL_DARWIN
// AssertMacros.h does bad things.
@@ -53,7 +60,7 @@ public:
// calling this before main() is undefined
static LLDirPicker& instance( void ) { return sInstance; }
- BOOL getDir(std::string* filename);
+ BOOL getDir(std::string* filename, bool blocking = true);
std::string getDirName();
// clear any lists of buffers or whatever, and make sure the dir
@@ -76,11 +83,15 @@ private:
LLFilePicker *mFilePicker;
#endif
+
std::string* mFileName;
std::string mDir;
bool mLocked;
static LLDirPicker sInstance;
+#if LL_WINDOWS
+ BROWSEINFO bi;
+#endif
public:
// don't call these directly please.
@@ -88,4 +99,33 @@ public:
~LLDirPicker();
};
+class LLDirPickerThread : public LLThread
+{
+public:
+
+ static std::queue<LLDirPickerThread*> sDeadQ;
+ static LLMutex* sMutex;
+
+ static void initClass();
+ static void cleanupClass();
+ static void clearDead();
+
+ std::vector<std::string> mResponses;
+ std::string mProposedName;
+
+ typedef boost::signals2::signal<void(const std::vector<std::string>& filenames, std::string proposed_name)> dir_picked_signal_t;
+
+ LLDirPickerThread(const dir_picked_signal_t::slot_type& cb, const std::string &proposed_name);
+ ~LLDirPickerThread();
+
+ void getFile();
+
+ virtual void run();
+
+ virtual void notify(const std::vector<std::string>& filenames);
+
+private:
+ dir_picked_signal_t* mFilePickedSignal;
+};
+
#endif