Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
5cf4d63a
Commit
5cf4d63a
authored
13 years ago
by
Leyla Farazha
Browse files
Options
Downloads
Patches
Plain Diff
attempting to do the outbox import
parent
adf39dd1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llpanelmarketplaceoutbox.cpp
+41
-2
41 additions, 2 deletions
indra/newview/llpanelmarketplaceoutbox.cpp
indra/newview/llviewermedia.cpp
+11
-0
11 additions, 0 deletions
indra/newview/llviewermedia.cpp
indra/newview/llviewermedia.h
+2
-0
2 additions, 0 deletions
indra/newview/llviewermedia.h
with
54 additions
and
2 deletions
indra/newview/llpanelmarketplaceoutbox.cpp
+
41
−
2
View file @
5cf4d63a
...
@@ -38,6 +38,9 @@
...
@@ -38,6 +38,9 @@
#include
"llsidepanelinventory.h"
#include
"llsidepanelinventory.h"
#include
"llsidetray.h"
#include
"llsidetray.h"
#include
"lltimer.h"
#include
"lltimer.h"
#include
"llviewernetwork.h"
#include
"llagent.h"
#include
"llviewermedia.h"
#include
"llfolderview.h"
#include
"llfolderview.h"
static
LLRegisterPanelClassWrapper
<
LLPanelMarketplaceOutbox
>
t_panel_marketplace_outbox
(
"panel_marketplace_outbox"
);
static
LLRegisterPanelClassWrapper
<
LLPanelMarketplaceOutbox
>
t_panel_marketplace_outbox
(
"panel_marketplace_outbox"
);
...
@@ -190,10 +193,46 @@ void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel)
...
@@ -190,10 +193,46 @@ void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel)
gTimeDelayDebugFunc
=
""
;
gTimeDelayDebugFunc
=
""
;
}
}
class
LLInventorySyncResponder
:
public
LLHTTPClient
::
Responder
{
public:
LLInventorySyncResponder
()
:
LLCurl
::
Responder
()
{
}
void
completed
(
U32
status
,
const
std
::
string
&
reason
,
const
LLSD
&
content
)
{
if
(
isGoodStatus
(
status
))
{
// Complete success
llinfos
<<
"sync complete"
<<
llendl
;
}
else
{
llwarns
<<
"sync failed"
<<
llendl
;
}
}
};
void
LLPanelMarketplaceOutbox
::
onSyncButtonClicked
()
void
LLPanelMarketplaceOutbox
::
onSyncButtonClicked
()
{
{
// TODO: Actually trigger sync to marketplace
std
::
string
url
=
"http://pdp24.lindenlab.com/3000"
;
/*"https://marketplace.secondlife.com/";
if (!LLGridManager::getInstance()->isInProductionGrid())
{
std::string gridLabel = LLGridManager::getInstance()->getGridLabel();
url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str());
}
*/
url
+=
"api/1/users/"
;
url
+=
gAgent
.
getID
().
getString
();
url
+=
"/inventory_import"
;
LLHTTPClient
::
get
(
url
,
new
LLInventorySyncResponder
(),
LLViewerMedia
::
getHeaders
());
mSyncInProgress
=
true
;
mSyncInProgress
=
true
;
updateSyncButtonStatus
();
updateSyncButtonStatus
();
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llviewermedia.cpp
+
11
−
0
View file @
5cf4d63a
...
@@ -1394,6 +1394,17 @@ class LLInventoryUserStatusResponder : public LLHTTPClient::Responder
...
@@ -1394,6 +1394,17 @@ class LLInventoryUserStatusResponder : public LLHTTPClient::Responder
}
}
};
};
LLSD
LLViewerMedia
::
getHeaders
()
{
LLSD
headers
=
LLSD
::
emptyMap
();
headers
[
"Accept"
]
=
"*/*"
;
headers
[
"Cookie"
]
=
sOpenIDCookie
;
headers
[
"User-Agent"
]
=
getCurrentUserAgent
();
return
headers
;
}
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
// static
// static
void
LLViewerMedia
::
setOpenIDCookie
()
void
LLViewerMedia
::
setOpenIDCookie
()
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llviewermedia.h
+
2
−
0
View file @
5cf4d63a
...
@@ -162,6 +162,8 @@ class LLViewerMedia
...
@@ -162,6 +162,8 @@ class LLViewerMedia
static
LLPluginClassMedia
*
getSpareBrowserMediaSource
();
static
LLPluginClassMedia
*
getSpareBrowserMediaSource
();
static
void
setOnlyAudibleMediaTextureID
(
const
LLUUID
&
texture_id
);
static
void
setOnlyAudibleMediaTextureID
(
const
LLUUID
&
texture_id
);
static
LLSD
getHeaders
();
private:
private:
static
void
setOpenIDCookie
();
static
void
setOpenIDCookie
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment