Repository: GrapheneCt/NetStream
Branch: main
Commit: 99db706d860f
Files: 135
Total size: 635.7 KB
Directory structure:
gitextract_ehw9vfn_/
├── .gitignore
├── NetStream/
│ ├── CONTENTS/
│ │ ├── module/
│ │ │ ├── download_enabler_netstream.suprx
│ │ │ ├── libFourthTube.suprx
│ │ │ ├── libLootkit.suprx
│ │ │ ├── libSceAvPlayerPSVitaRGBA8888.suprx
│ │ │ ├── libcurl.suprx
│ │ │ ├── libfmodngpext.suprx
│ │ │ ├── libfmodstudio.suprx
│ │ │ └── libhvdb.suprx
│ │ └── sce_sys/
│ │ └── livearea/
│ │ └── contents/
│ │ └── template.xml
│ ├── NetStream.vcxproj
│ ├── NetStream.vcxproj.filters
│ ├── NetStream.vcxproj.user
│ ├── RES_RCO/
│ │ ├── file/
│ │ │ └── netstream_settings.xml
│ │ ├── locale/
│ │ │ ├── netstream_locale_en.xml
│ │ │ ├── netstream_locale_es.xml
│ │ │ ├── netstream_locale_fr.xml
│ │ │ ├── netstream_locale_it.xml
│ │ │ ├── netstream_locale_ja.xml
│ │ │ ├── netstream_locale_pl.xml
│ │ │ ├── netstream_locale_pt-br.xml
│ │ │ ├── netstream_locale_pt.xml
│ │ │ ├── netstream_locale_ru.xml
│ │ │ ├── netstream_locale_zh-s.xml
│ │ │ └── netstream_locale_zh-t.xml
│ │ ├── netstream_plugin.xml
│ │ └── texture/
│ │ ├── tex_black.dds
│ │ ├── tex_button_arrow_left.zlib
│ │ ├── tex_button_arrow_right.zlib
│ │ ├── tex_button_big_repeat.zlib
│ │ ├── tex_button_pause.zlib
│ │ ├── tex_button_play.zlib
│ │ ├── tex_button_settings.zlib
│ │ ├── tex_file_icon_music.zlib
│ │ ├── tex_vertical_separator.zlib
│ │ ├── tex_video_control_panel_status_pause.gim
│ │ ├── tex_video_control_panel_status_play.gim
│ │ ├── tex_yt_icon_favourite.zlib
│ │ ├── tex_yt_icon_history.zlib
│ │ └── tex_yt_icon_search.zlib
│ ├── gen_headers.bat
│ ├── gen_rco.bat
│ ├── include/
│ │ ├── browsers/
│ │ │ ├── ftp_server_browser.h
│ │ │ ├── generic_server_browser.h
│ │ │ ├── http_server_browser.h
│ │ │ ├── hvdb_tracks_browser.h
│ │ │ └── local_server_browser.h
│ │ ├── common.h
│ │ ├── debug.h
│ │ ├── dialog.h
│ │ ├── downloader.h
│ │ ├── event.h
│ │ ├── ftpparse.h
│ │ ├── hvdb_utils.h
│ │ ├── main.h
│ │ ├── menus/
│ │ │ ├── menu_first.h
│ │ │ ├── menu_ftp.h
│ │ │ ├── menu_generic.h
│ │ │ ├── menu_http.h
│ │ │ ├── menu_hvdb.h
│ │ │ ├── menu_hvdb_tracks.h
│ │ │ ├── menu_local.h
│ │ │ ├── menu_player_simple.h
│ │ │ ├── menu_player_youtube.h
│ │ │ ├── menu_server.h
│ │ │ ├── menu_settings.h
│ │ │ └── menu_youtube.h
│ │ ├── netstream_locale.h
│ │ ├── netstream_plugin.h
│ │ ├── netstream_settings.h
│ │ ├── np_utils.h
│ │ ├── option_menu.h
│ │ ├── players/
│ │ │ ├── player_av.h
│ │ │ ├── player_beav.h
│ │ │ ├── player_fmod.h
│ │ │ └── player_generic.h
│ │ ├── subs/
│ │ │ ├── subs_generic.h
│ │ │ └── subs_srt.h
│ │ ├── tex_pool.h
│ │ ├── tw_utils.h
│ │ ├── utils.h
│ │ └── yt_utils.h
│ ├── libs/
│ │ ├── include/
│ │ │ ├── fmodngpext.h
│ │ │ ├── ftube.h
│ │ │ ├── hvdb.h
│ │ │ ├── lootkit.h
│ │ │ └── sceavplayer_webmaf.h
│ │ └── lib/
│ │ ├── libFourthTube_stub.a
│ │ ├── libLootkit_stub.a
│ │ ├── libSceAvPlayerWebMAF_stub.a
│ │ ├── libfmodngpext_stub.a
│ │ └── libhvdb_stub.a
│ ├── package.conf
│ ├── param.sfx
│ └── source/
│ ├── browsers/
│ │ ├── ftp_server_browser.cpp
│ │ ├── http_server_browser.cpp
│ │ ├── hvdb_tracks_browser.cpp
│ │ └── local_server_browser.cpp
│ ├── debug.cpp
│ ├── dialog.cpp
│ ├── downloader.cpp
│ ├── event.cpp
│ ├── ftpparse.c
│ ├── hvdb_utils.cpp
│ ├── main.cpp
│ ├── menus/
│ │ ├── menu_first.cpp
│ │ ├── menu_generic.cpp
│ │ ├── menu_hvdb.cpp
│ │ ├── menu_player_simple.cpp
│ │ ├── menu_player_youtube.cpp
│ │ ├── menu_server.cpp
│ │ ├── menu_settings.cpp
│ │ └── menu_youtube.cpp
│ ├── np_utils.cpp
│ ├── option_menu.cpp
│ ├── paf_runtime.cpp
│ ├── players/
│ │ ├── player_av.cpp
│ │ ├── player_beav.cpp
│ │ └── player_fmod.cpp
│ ├── subs/
│ │ ├── subs_generic.cpp
│ │ └── subs_srt.cpp
│ ├── tex_pool.cpp
│ ├── tw_utils.cpp
│ ├── utils.cpp
│ └── yt_utils.cpp
├── NetStream-DE/
│ ├── NetStream-DE.vcxproj
│ ├── NetStream-DE.vcxproj.filters
│ ├── NetStream-DE.vcxproj.user
│ ├── download_enabler.cpp
│ └── paf_runtime.c
├── NetStream.sln
├── README.md
├── README_MODULE.md
├── hls_test.m3u8
└── hls_test_clean_multi_aux.m3u8
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
# VDS
*.vs
*.rco
*.rcd
*.pptx
eboot.bin
eboot2.bin
param.sfo
param2.sfo
PSVita_Debug
PSVita_Release
RES_RCO_TMP
================================================
FILE: NetStream/CONTENTS/sce_sys/livearea/contents/template.xml
================================================
labg.png
gate.png
ja title-en.png
en title-en.png
fr title-en.png
es title-en.png
de title-en.png
it title-en.png
nl title-en.png
pt title-en.png
ru title-en.png
ko title-en.png
ch title-en.png
zh title-en.png
fi title-en.png
sv title-en.png
da title-en.png
no title-en.png
pl title-en.png
en-gb title-en.png
pt-br title-en.png
tr title-en.png
title-en.png
================================================
FILE: NetStream/NetStream.vcxproj
================================================
Debug
PSVita
Release
PSVita
Designer
Designer
{CA4F859F-6FE6-413C-A24A-44CF552FCE91}
Application
Application
_DEBUG;SCE_PAF_TOOL_PRX;%(PreprocessorDefinitions)
true
NotUsing
$(SCE_PSP2_SDK_DIR)\target\include\vdsuite\user;$(SCE_PSP2_SDK_DIR)\target\include\vdsuite\common;$(ProjectDir)libs\include;$(ProjectDir)include;$(SCE_PSP2_SDK_DIR)\target\include\vdsuite\user\psp2_compat;%(AdditionalIncludeDirectories)
Cpp11
true
--no-standard-libraries
$(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;$(ProjectDir)libs\lib;%(AdditionalLibraryDirectories)
FullMapFile
-ltaihen_stub;-lSceRtcUser_stub;-lSceIpmi_stub;-lSceSysmem_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceModuleMgr_stub;-lSceProcessMgr_stub;-lSceTouch_stub;-lSceAppMgr_stub;-lSceAppMgrUser_stub;-lSceAppUtil_stub;-lSceAudio_stub;-lSceCtrl_stub;-lSceDisplay_stub;-lScePower_stub;-lSceSysmodule_stub;-lSceRegMgr_stub;-lSceDbg_stub;-lScePafThread_stub;-lScePafStdc_stub;-lScePafToplevel_stub;-lScePafResource_stub;-lScePafWidget_stub;-lScePafMisc_stub;-lScePafCommon_stub;-lScePafGraphics_stub;-lSceLibKernel_stub;-lSceNet_stub;-lSceNetCtl_stub;-lSceAppSettings_stub;-lSceCommonGuiDialog_stub;-lSceCommonDialog_stub;-lSceHttp_stub;-lSceSsl_stub;-lSceIniFileProcessor_stub;-lSceAvPlayerPSVita_stub;-lSceBeavCorePlayer_stub;-lSceDmacmgr_stub;-lSceFiber_stub;-lSceVshBridge_stub;-lSceNpManager_stub;-lSceNpCommon_stub;-lSceNpBasic_stub;-lSceNpTus_stub;-ltaihenUnsafe_stub;-lFourthTube_stub;-lLootkit_stub;-lhvdb_stub;-lcurl_stub;-lfmodstudio_stub;-lfmodngpext_stub;-lsnc;-lPafFileExt;%(AdditionalDependencies)
"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubprx.exe" --boot-param "$(ProjectDir)ebootparam.bin" "$(LocalDebuggerCommand)" "$(OutDir)eboot.bin"
"$(SCE_PSP2_SDK_DIR)/host_tools/build/rco/bin/psp2pafhashgen.exe" -i "$(ProjectDir)RES_RCO\netstream_plugin.xml" -o "$(ProjectDir)include\netstream_plugin.h"
"$(SCE_PSP2_SDK_DIR)/host_tools/build/rco/bin/psp2pafhashgen.exe" -i "$(ProjectDir)RES_RCO\file\netstream_settings.xml" -o "$(ProjectDir)include\netstream_settings.h"
"$(SCE_PSP2_SDK_DIR)/host_tools/build/rco/bin/psp2pafhashgen.exe" -i "$(ProjectDir)RES_RCO\locale\netstream_locale_en.xml" -o "$(ProjectDir)include\netstream_locale.h"
VDSUITE: generate PAF hashlist
NDEBUG;SCE_DBG_LOGGING_ENABLED=0;%(PreprocessorDefinitions)
Level3
NotUsing
$(SCE_PSP2_SDK_DIR)\target\include\vdsuite\user;$(SCE_PSP2_SDK_DIR)\target\include\vdsuite\common;$(ProjectDir)libs\include;$(ProjectDir)include;$(SCE_PSP2_SDK_DIR)\target\include\vdsuite\user\psp2_compat;%(AdditionalIncludeDirectories)
Cpp11
true
$(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;$(ProjectDir)libs\lib;%(AdditionalLibraryDirectories)
StripSymsAndDebug
StripFuncsAndData
true
--no-standard-libraries
-ltaihen_stub;-lSceRtcUser_stub;-lSceIpmi_stub;-lSceSysmem_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceModuleMgr_stub;-lSceProcessMgr_stub;-lSceTouch_stub;-lSceAppMgr_stub;-lSceAppMgrUser_stub;-lSceAppUtil_stub;-lSceAudio_stub;-lSceCtrl_stub;-lSceDisplay_stub;-lScePower_stub;-lSceSysmodule_stub;-lSceRegMgr_stub;-lSceDbg_stub;-lScePafThread_stub;-lScePafStdc_stub;-lScePafToplevel_stub;-lScePafResource_stub;-lScePafWidget_stub;-lScePafMisc_stub;-lScePafCommon_stub;-lScePafGraphics_stub;-lSceLibKernel_stub;-lSceNet_stub;-lSceNetCtl_stub;-lSceAppSettings_stub;-lSceCommonGuiDialog_stub;-lSceCommonDialog_stub;-lSceHttp_stub;-lSceSsl_stub;-lSceIniFileProcessor_stub;-lSceAvPlayerPSVita_stub;-lSceBeavCorePlayer_stub;-lSceDmacmgr_stub;-lSceFiber_stub;-lSceVshBridge_stub;-lSceNpManager_stub;-lSceNpCommon_stub;-lSceNpBasic_stub;-lSceNpTus_stub;-ltaihenUnsafe_stub;-lFourthTube_stub;-lLootkit_stub;-lhvdb_stub;-lcurl_stub;-lfmodstudio_stub;-lfmodngpext_stub;-lsnc;-lPafFileExt;%(AdditionalDependencies)
call "$(ProjectDir)gen_rco.bat"
"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubprx.exe" --strip --compress --boot-param "$(ProjectDir)ebootparam.bin" "$(LocalDebuggerCommand)" "$(OutDir)eboot.bin"
"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubsfo.exe" "$(ProjectDir)param.sfx" "$(OutDir)param.sfo"
"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubgen.exe" --file "$(OutDir)eboot.bin" eboot.bin --file "$(OutDir)param.sfo" sce_sys/param.sfo --file "$(ProjectDir)CONTENTS/sce_sys/icon0.png" sce_sys/icon0.png --file "$(ProjectDir)CONTENTS/sce_sys/pic0.png" sce_sys/pic0.png --file "$(ProjectDir)CONTENTS/sce_sys/livearea" sce_sys/livearea --file "$(ProjectDir)CONTENTS/sce_sys/manual" sce_sys/manual --file "$(ProjectDir)CONTENTS/module" module --file "$(ProjectDir)CONTENTS/netstream_plugin.rco" netstream_plugin.rco "$(OutDir)$(ProjectName).vpk"
copy /Y "$(OutDir)eboot.bin" "$(ProjectDir)CONTENTS/eboot.bin"
copy /Y "$(OutDir)param.sfo" "$(ProjectDir)CONTENTS/sce_sys/param.sfo"
"$(SCE_ROOT_DIR)/PSP2/Tools/Publishing Tools/bin/ext/make_pkg.exe" --output $(OutDir) "$(ProjectDir)package.conf" $(ProjectDir)
VDSUITE: Building packages
================================================
FILE: NetStream/NetStream.vcxproj.filters
================================================
{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
cpp;c;cxx;cc;s;asm
{93995380-89BD-4b04-88EB-625FBE52EBFB}
h;hpp
{46cc97e8-968f-4244-9a90-70ff8461f55e}
{846ca004-6b98-44d7-aef8-7a0982f51f14}
{784adb2a-2159-4d72-ba10-3c360fe3bb22}
{fbf463f0-23d6-426a-920e-d57c6fc940e0}
{ebaf1957-7ba0-40ce-a4b3-c3fbf14b8060}
{c1271002-95d8-4ece-9b10-de876141361f}
{0601fe77-e2f9-480e-8377-27578763de4a}
{02e6370e-4def-44f0-b9b3-f761cfa3fc9a}
{92115278-5319-4fda-b0eb-0787c9ec7d91}
Source Files
Source Files
Source Files
Source Files
Source Files
Source Files
Source Files\menus
Source Files\menus
Source Files\menus
Source Files\menus
Source Files\menus
Source Files\menus
Source Files
Source Files
Source Files\menus
Source Files
Source Files
Source Files
Source Files
Source Files
Source Files\menus
Source Files
Source Files\players
Source Files\players
Source Files\players
Source Files\browsers
Source Files\browsers
Source Files\browsers
Source Files\subs
Source Files\subs
Source Files\browsers
Header Files
Header Files
Header Files
Header Files
Header Files
Header Files\menus
Header Files\menus
Header Files
Header Files\menus
Header Files\menus
Header Files\menus
Header Files\menus
Header Files\menus
Header Files
Header Files\menus
Header Files
Header Files\menus
Header Files\menus
Header Files
Header Files
Header Files
Header Files
Header Files
Header Files\menus
Header Files
Header Files\players
Header Files\players
Header Files\players
Header Files\players
Header Files\browsers
Header Files\browsers
Header Files\browsers
Header Files\browsers
Header Files\subs
Header Files\subs
Header Files\menus
Header Files\browsers
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
Source Files\resource
================================================
FILE: NetStream/NetStream.vcxproj.user
================================================
================================================
FILE: NetStream/RES_RCO/file/netstream_settings.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_en.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_es.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_fr.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_it.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_ja.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_pl.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_pt-br.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_pt.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_ru.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_zh-s.xml
================================================
================================================
FILE: NetStream/RES_RCO/locale/netstream_locale_zh-t.xml
================================================
================================================
FILE: NetStream/RES_RCO/netstream_plugin.xml
================================================
================================================
FILE: NetStream/gen_headers.bat
================================================
@echo off
SET PLUGIN=netstream
SET HASHGEN=%SCE_PSP2_SDK_DIR%/host_tools/build/rco/bin/psp2pafhashgen.exe
"%HASHGEN%" -i "RES_RCO\%PLUGIN%_plugin.xml" -o "include\%PLUGIN%_plugin.h"
"%HASHGEN%" -i "RES_RCO\file\%PLUGIN%_settings.xml" -o "include\%PLUGIN%_settings.h"
"%HASHGEN%" -i "RES_RCO\locale\%PLUGIN%_locale_en.xml" -o "include\%PLUGIN%_locale.h"
================================================
FILE: NetStream/gen_rco.bat
================================================
@echo off
SET PLUGIN=netstream
SET COMPILER=%SCE_PSP2_SDK_DIR%/host_tools/build/rco/bin/acdc.exe
SET TMP=RES_RCO/RES_RCO_TMP
@RD /S /Q "%TMP%"
mkdir "%TMP%"
for %%f in (RES_RCO/locale/*.xml) do (
"%COMPILER%" -c -i "RES_RCO/locale/%%f" -s "%SCE_PSP2_SDK_DIR%/host_tools/build/rco/def/rcs.cxmldef" -o "%TMP%/%%f.rcs"
)
"%COMPILER%" -c -i "RES_RCO/%PLUGIN%_plugin.xml" -s "%SCE_PSP2_SDK_DIR%/host_tools/build/rco/def/rco.cxmldef" -o "CONTENTS/%PLUGIN%_plugin.rco" -r "CONTENTS/%PLUGIN%_plugin.rcd"
================================================
FILE: NetStream/include/browsers/ftp_server_browser.h
================================================
#ifndef _FTP_SERVER_BROWSER_H_
#define _FTP_SERVER_BROWSER_H_
#include
#include
#include
#include "browsers/generic_server_browser.h"
using namespace paf;
class FtpServerBrowser : public GenericServerBrowser
{
public:
FtpServerBrowser(const char *host, const char *port, const char *user, const char *password);
~FtpServerBrowser();
bool Probe();
bool IsAtRoot(string *current);
bool IsAtRoot();
void SetPath(const char *ref);
string GetPath();
void GetInfoForPlayer(string const& in, string& url, GenericPlayer::Option **opt);
vector *GoTo(const char *ref, int32_t *result);
private:
static size_t DownloadCore(char *buffer, size_t size, size_t nitems, void *userdata);
CURLU *m_url;
CURL *m_curl;
string m_root;
char *m_buffer;
uint32_t m_posInBuf;
int32_t m_useNlst;
};
#endif
================================================
FILE: NetStream/include/browsers/generic_server_browser.h
================================================
#ifndef _GENERIC_SERVER_BROWSER_H_
#define _GENERIC_SERVER_BROWSER_H_
#include
#include
using namespace paf;
class GenericServerBrowser
{
public:
class Entry
{
public:
enum Type
{
Type_UnsupportedFile,
Type_SupportedFile,
Type_PlaylistFile,
Type_Folder
};
string ref;
string displayName;
uint32_t type;
};
GenericServerBrowser()
{
}
virtual ~GenericServerBrowser()
{
}
virtual bool Probe() = 0;
virtual bool IsAtRoot(string *current) = 0;
virtual bool IsAtRoot() = 0;
virtual void SetPath(const char *ref) = 0;
virtual string GetPath() = 0;
virtual void GetInfoForPlayer(string const& in, string& url, GenericPlayer::Option **opt) = 0;
virtual vector *GoTo(const char *ref, int32_t *result) = 0;
};
#endif
================================================
FILE: NetStream/include/browsers/http_server_browser.h
================================================
#ifndef _HTTP_SERVER_BROWSER_H_
#define _HTTP_SERVER_BROWSER_H_
#include
#include
#include
#include "browsers/generic_server_browser.h"
using namespace paf;
class HttpServerBrowser : public GenericServerBrowser
{
public:
HttpServerBrowser(const char *host, const char *port, const char *user, const char *password);
~HttpServerBrowser();
bool Probe();
bool IsAtRoot(string *current);
bool IsAtRoot();
void SetPath(const char *ref);
string GetPath();
void GetInfoForPlayer(string const& in, string& url, GenericPlayer::Option **opt);
vector *GoTo(const char *ref, int32_t *result);
private:
static size_t DownloadCore(char *buffer, size_t size, size_t nitems, void *userdata);
CURLU *m_url;
CURL *m_curl;
string m_root;
char *m_buffer;
uint32_t m_posInBuf;
};
#endif
================================================
FILE: NetStream/include/browsers/hvdb_tracks_browser.h
================================================
#ifndef _HVDB_TRACKS_BROWSER_H_
#define _HVDB_TRACKS_BROWSER_H_
#include
#include
#include
#include "browsers/generic_server_browser.h"
using namespace paf;
class HvdbTracksBrowser : public GenericServerBrowser
{
public:
HvdbTracksBrowser(const char *workId, const char *workBannerUrl);
~HvdbTracksBrowser();
bool Probe();
bool IsAtRoot(string *current);
bool IsAtRoot();
void SetPath(const char *ref);
string GetPath();
void GetInfoForPlayer(string const& in, string& url, GenericPlayer::Option **opt);
vector *GoTo(const char *ref, int32_t *result);
private:
void ParseRefString(const char *str, HVDBItem **item, uint32_t *idx);
HVDBItem *GetItemAt(HVDBItem *firstItem, uint32_t idx);
string m_path;
string m_currentDataName;
string m_workId;
string m_bannerUrl;
void *m_hvdbCtx;
GenericPlayer::Option *m_option;
};
#endif
================================================
FILE: NetStream/include/browsers/local_server_browser.h
================================================
#ifndef _LOCAL_SERVER_BROWSER_H_
#define _LOCAL_SERVER_BROWSER_H_
#include
#include
#include
#include "browsers/generic_server_browser.h"
using namespace paf;
class LocalServerBrowser : public GenericServerBrowser
{
public:
static bool DefaultFsSort(const LocalServerBrowser::Entry* a, const LocalServerBrowser::Entry* b);
LocalServerBrowser();
~LocalServerBrowser();
bool Probe();
bool IsAtRoot(string *current);
bool IsAtRoot();
void SetPath(const char *ref);
string GetPath();
void GetInfoForPlayer(string const& in, string& url, GenericPlayer::Option **opt);
vector *GoTo(const char *ref, int32_t *result);
private:
string m_path;
};
#endif
================================================
FILE: NetStream/include/common.h
================================================
#ifndef _COMMON_H_
#define _COMMON_H_
#include
#include "netstream_plugin.h"
#include "netstream_settings.h"
#include "netstream_locale.h"
#include "menus/menu_settings.h"
#define USER_AGENT "Mozilla/5.0 (PlayStation Vita 3.74) AppleWebKit/537.73 (KHTML, like Gecko) Silk/3.2"
#define NP_TUS_FAV_LOG_SLOT (2)
#define NP_TUS_HIST_LOG_SLOT (1)
using namespace paf;
extern Plugin *g_appPlugin;
extern intrusive_ptr g_texCheckMark;
extern intrusive_ptr g_texTransparent;
#endif
================================================
FILE: NetStream/include/debug.h
================================================
#ifndef _DEBUG_H_
#define _DEBUG_H_
#include
#include
#ifdef _DEBUG
//#define DEBUG_MEM_HEAP
//#define DEBUG_SURFACE_HEAP
//#define DEBUG_JOB_QUEUE
//#define DEBUG_EXTRA_TTY
void InitDebug();
void SetCurrentDebugParam(paf::Plugin *plugin, paf::ui::Scene *page);
void SetPageDebugMode(paf::Plugin *plugin, paf::IDParam const& id, paf::Plugin::PageDebugMode mode, bool on);
#endif
#endif
================================================
FILE: NetStream/include/dialog.h
================================================
#ifndef _DIALOG_H_
#define _DIALOG_H_
#include
#include
#include
using namespace paf;
namespace dialog
{
enum
{
DialogEvent = (ui::Handler::CB_STATE + 0x40000),
};
enum ButtonCode
{
ButtonCode_X = 1,
ButtonCode_Ok,
ButtonCode_Cancel,
ButtonCode_Yes,
ButtonCode_No,
ButtonCode_Button1 = ButtonCode_Yes,
ButtonCode_Button2 = ButtonCode_No,
ButtonCode_Button3 = ButtonCode_Cancel
};
void OpenPleaseWait(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText, bool withCancel = false);
void OpenYesNo(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageTextL);
void OpenOk(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText);
void OpenError(Plugin *workPlugin, int32_t errorCode, const wchar_t *messageText = NULL);
void OpenTwoButton(
Plugin *workPlugin,
const wchar_t *titleText,
const wchar_t *messageText,
uint32_t button1TextHashref,
uint32_t button2TextHashref);
void OpenThreeButton(
Plugin *workPlugin,
const wchar_t *titleText,
const wchar_t *messageText,
uint32_t button1TextHashref,
uint32_t button2TextHashref,
uint32_t button3TextHashref);
ui::ListView *OpenListView(
Plugin *workPlugin,
const wchar_t *titleText);
ui::ScrollView *OpenScrollView(
Plugin *workPlugin,
const wchar_t *titleText);
void Close();
void WaitEnd();
bool IsActive();
};
#endif
================================================
FILE: NetStream/include/downloader.h
================================================
#ifndef _ELEVENMPV_DOWNLOADER_H_
#define _ELEVENMPV_DOWNLOADER_H_
#include
#include
#include
#include
using namespace paf;
class Downloader
{
public:
enum
{
DownloaderEvent = (ui::Handler::CB_STATE + 0x60000),
};
Downloader();
~Downloader();
int32_t Enqueue(Plugin *workPlugin, const char *url, const char *name);
int32_t EnqueueAsync(Plugin *workPlugin, const char *url, const char *name);
private:
class AsyncEnqueue : public job::JobItem
{
public:
AsyncEnqueue(Plugin *workPlugin, Downloader *downloader, const char *url, const char *name) :
job::JobItem("Downloader::AsyncEnqueue", NULL), m_plugin(workPlugin), m_downloader(downloader), m_url8(url), m_name8(name)
{
}
~AsyncEnqueue() {}
int32_t Run()
{
Downloader *pdownloader = (Downloader *)m_downloader;
pdownloader->Enqueue(m_plugin, m_url8.c_str(), m_name8.c_str());
return SCE_PAF_OK;
}
void Finish(int32_t result) {}
private:
string m_url8;
string m_name8;
void *m_downloader;
Plugin *m_plugin;
};
sce::Download dw;
};
#endif
================================================
FILE: NetStream/include/event.h
================================================
#ifndef _EVENT_UTIL_H_
#define _EVENT_UTIL_H_
#include
#include
using namespace paf;
namespace event
{
void BroadcastGlobalEvent(Plugin *workPlugin, uint32_t type, int32_t d0 = 0, int32_t d1 = 0, int32_t d2 = 0, int32_t d3 = 0);
};
#endif
================================================
FILE: NetStream/include/ftpparse.h
================================================
#ifndef FTPPARSE_H
#define FTPPARSE_H
#ifdef __cplusplus
extern "C" {
#endif
/*
ftpparse(&fp,buf,len) tries to parse one line of LIST output.
The line is an array of len characters stored in buf.
It should not include the terminating CR LF; so buf[len] is typically CR.
If ftpparse() can't find a filename, it returns 0.
If ftpparse() can find a filename, it fills in fp and returns 1.
fp is a struct ftpparse, defined below.
The name is an array of fp.namelen characters stored in fp.name;
fp.name points somewhere within buf.
*/
struct ftpparse {
char *name; /* not necessarily 0-terminated */
int namelen;
int flagtrycwd; /* 0 if cwd is definitely pointless, 1 otherwise */
int flagtryretr; /* 0 if retr is definitely pointless, 1 otherwise */
int sizetype;
long size; /* number of octets */
int mtimetype;
time_t mtime; /* modification time */
int idtype;
char *id; /* not necessarily 0-terminated */
int idlen;
} ;
#define FTPPARSE_SIZE_UNKNOWN 0
#define FTPPARSE_SIZE_BINARY 1 /* size is the number of octets in TYPE I */
#define FTPPARSE_SIZE_ASCII 2 /* size is the number of octets in TYPE A */
#define FTPPARSE_MTIME_UNKNOWN 0
#define FTPPARSE_MTIME_LOCAL 1 /* time is correct */
#define FTPPARSE_MTIME_REMOTEMINUTE 2 /* time zone and secs are unknown */
#define FTPPARSE_MTIME_REMOTEDAY 3 /* time zone and time of day are unknown */
/*
When a time zone is unknown, it is assumed to be GMT. You may want
to use localtime() for LOCAL times, along with an indication that the
time is correct in the local time zone, and gmtime() for REMOTE* times.
*/
#define FTPPARSE_ID_UNKNOWN 0
#define FTPPARSE_ID_FULL 1 /* unique identifier for files on this FTP server */
int ftpparse(struct ftpparse *,char *,int);
#ifdef __cplusplus
}
#endif
#endif
================================================
FILE: NetStream/include/hvdb_utils.h
================================================
#ifndef _HVDBUTILS_H_
#define _HVDBUTILS_H_
#include
#include
#include
#include "yt_utils.h"
#include "downloader.h"
using namespace paf;
namespace hvdbutils
{
void Init();
void Term();
void Flush();
int32_t EnqueueDownload(const char *url, const char *name);
int32_t EnqueueDownloadAsync(const char *url, const char *name);
};
#endif
================================================
FILE: NetStream/include/main.h
================================================
#ifndef _MAIN_H_
#define _MAIN_H_
#include
#include
using namespace paf;
namespace menu {
namespace main {
class NetcheckJob : public job::JobItem
{
public:
enum Type
{
Type_Initial,
Type_NpOnly
};
NetcheckJob(Type type) : job::JobItem("NS::NetcheckJob", NULL), m_type(type)
{
}
~NetcheckJob() {}
int32_t Run();
void Finish(int32_t result) {}
private:
void OnDialogUserCancelEvent(int32_t type);
Type m_type;
};
int32_t OnNpDialogComplete(void *data);
}
}
#endif
================================================
FILE: NetStream/include/menus/menu_first.h
================================================
#ifndef _MENU_FIRST_H_
#define _MENU_FIRST_H_
#include
#include
#include "menu_generic.h"
using namespace paf;
namespace menu {
class First : public GenericMenu
{
public:
class ListViewFactory : public ui::listview::ItemFactory
{
public:
ListViewFactory(menu::First *parent) : m_parent(parent)
{
}
~ListViewFactory()
{
}
ui::ListItem* Create(CreateParam& param)
{
return m_parent->CreateListItem(param);
}
private:
menu::First *m_parent;
};
First();
~First() override;
ui::ListItem* CreateListItem(ui::listview::ItemFactory::CreateParam& param);
void OnListButton(ui::Widget *self);
void SetOfflineMode();
MenuType GetMenuType() override
{
return MenuType_First;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
*count = 0;
return nullptr;
}
private:
bool m_showHvdb;
ui::ListView *m_rootList;
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_ftp.h
================================================
#ifndef _MENU_FTP_H_
#define _MENU_FTP_H_
#include
#include
#include "dialog.h"
#include "menu_server.h"
#include "browsers/ftp_server_browser.h"
#include "menus/menu_player_simple.h"
using namespace paf;
namespace menu {
class Ftp : public GenericServerMenu
{
public:
Ftp()
{
sce::AppSettings *settings = menu::Settings::GetAppSetInstance();
char host[256];
char port[32];
char user[256];
char password[256];
settings->GetString("ftp_host", host, sizeof(host), "");
settings->GetString("ftp_port", port, sizeof(port), "");
settings->GetString("ftp_user", user, sizeof(user), "");
settings->GetString("ftp_password", password, sizeof(password), "");
m_browser = new FtpServerBrowser(host, port, user, password);
}
MenuType GetMenuType() override
{
return MenuType_Ftp;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
*count = sizeof(k_settingsIdList) / sizeof(char*);
return k_settingsIdList;
}
private:
const uint32_t k_settingsIdList[1] = {
ftp_setting
};
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_generic.h
================================================
#ifndef _MENU_GENERIC_H_
#define _MENU_GENERIC_H_
#include
#include
using namespace paf;
namespace menu {
enum MenuType
{
MenuType_First, // Initial menu that is displayed after application boot
MenuType_Http, // HTTP server menu
MenuType_Ftp, // FTP server menu
MenuType_Local, // Local file browser menu
MenuType_Youtube, // YouTube menu
MenuType_Hvdb, // HVDB menu
MenuType_PlayerSimple, // Simple Player menu (simple fullscreen player)
MenuType_PlayerYouTube, // YouTube Player menu (description/comments etc.),
MenuType_HvdbTracks // HVDB tracks browser menu
};
/**
* Opens settings menu
*
* @param[in] type - PAF event type
* @param[in] self - PAF widget event issuer
* @param[in] e - PAF event object
* @param[in] userdata - Event userdata
*/
void SettingsButtonCbFun(int32_t type, ui::Handler *self, ui::Event *e, void *userdata);
/**
* Parameters that will be used for creating/opening the menu
*/
class MenuOpenParam : public Plugin::PageOpenParam
{
public:
/**
* @param[in] useFadeIn - when true, menu fades in
* @param[in] fadeinTimeMs - fadein time in milliseconds
* @param[in] effectType - PAF transition effect, one of paf::Plugin::TransitionType, can be used in combination with fadein
* @param[in] openFlags - PAF environment option flags, see paf::ui::EnvironmentParam
* @param[in] priority - PAF menu priority (rendering order)
*/
MenuOpenParam(
bool useFadeIn = false,
float fadeinTimeMs = 200.0f,
Plugin::TransitionType effectType = Plugin::TransitionType_None,
uint32_t openFlags = 0,
int32_t priority = -1) :
m_envOpt(nullptr)
{
fade = useFadeIn;
fade_time_ms = fadeinTimeMs;
transition_type = effectType;
overwrite_draw_priority = priority;
if (openFlags != 0)
{
if ((openFlags & ui::EnvironmentParam::RESOLUTION_HD_HALF) == ui::EnvironmentParam::RESOLUTION_HD_HALF
|| (openFlags & ui::EnvironmentParam::RESOLUTION_HD_FULL) == ui::EnvironmentParam::RESOLUTION_HD_FULL)
{
if (SCE_PAF_IS_DOLCE)
{
m_envOpt = new ui::EnvironmentParam(openFlags);
}
}
else
{
m_envOpt = new ui::EnvironmentParam(openFlags);
}
}
env_param = m_envOpt;
graphics_flag = 0x80;
}
~MenuOpenParam()
{
delete m_envOpt;
}
private:
ui::EnvironmentParam *m_envOpt; // PAF environment parameters object
};
/**
* Parameters that will be used for closing the menu
*/
class MenuCloseParam : public Plugin::PageCloseParam
{
public:
/**
* @param[in] useFadeOut - when true, menu fades out
* @param[in] fadeoutTimeMs - fadeout time in milliseconds
* @param[in] effectType - PAF transition effect, one of paf::Plugin::TransitionType, can be used in combination with fadeout
*/
MenuCloseParam(
bool useFadeOut = false,
float fadeoutTimeMs = 200.0f,
Plugin::TransitionType effectType = Plugin::TransitionType_None)
{
fade = useFadeOut;
fade_time_ms = fadeoutTimeMs;
transition_type = effectType;
}
~MenuCloseParam()
{
}
};
/**
* Generic application menu. All other menus must inherit from this class
*/
class GenericMenu
{
public:
/**
* @param[in] name - Menu template name. Must match name used for the template in the plugin XML
* @param[in] oparam - Menu open parameters
* @param[in] cparam - Menu close parameters
*/
GenericMenu(const char *, MenuOpenParam const& oparam, MenuCloseParam const& cparam);
virtual ~GenericMenu();
/**
* Activates the menu, enabling rendering and input for it
*/
virtual void Activate();
/**
* Deactivates the menu, disabling rendering and input for it
*
* @param[in] withDelay - When set to true, deactivation will be delayed by 200 milliseconds
*/
virtual void Deactivate(bool withDelay = false);
/**
* Disables user input for all menu elements
*/
virtual void DisableInput();
/**
* Enables user input for all menu elements
*/
virtual void EnableInput();
/**
* Get menu type
*
* @return menu type
*/
virtual MenuType GetMenuType() = 0;
/**
* Get supported settings menu items.
*
* @param[out] count - Number of items in the hash array
*
* @return pointer to the array of hashes of the names of supported settings items
*/
virtual const uint32_t *GetSupportedSettingsItems(int32_t *count) = 0;
/**
* Get menu root widget
*
* @return menu root scene widget
*/
ui::Scene *GetRoot() const;
protected:
ui::Scene *m_root; // Menu root scene widget
private:
MenuCloseParam m_closeParam; // Close parameters
};
/**
* Initializes menu system
*/
void InitMenuSystem();
/**
* Terminates menu system
*/
void TermMenuSystem();
/**
* Get total count of currently opened menus
*
* @return count of currently opened menus
*/
uint32_t GetMenuCount();
/**
* Get top menu
*
* @return pointer to the Menu object at the top of the menu stack
*/
menu::GenericMenu *GetTopMenu();
/**
* Get menu from the menu stack of currently opened menus
*
* @param[in] idx - Index of the menu in the menu stack
*
* @return pointer to the Menu object, or NULL if idx is invalid
*/
menu::GenericMenu *GetMenuAt(uint32_t idx);
/**
* Deactivate all opened menus, up to the margin.
* Menus are deactivated starting from the top of the menu stack, with endMargin number
* of menus remaining active at the bottom of the stack
*
* @param[in] endMargin - indicates how many menus from the bottom of the menu stack should be left active
*/
void DeactivateAll(uint32_t endMargin = 0);
/**
* Activate all opened menus
*/
void ActivateAll();
}
#endif
================================================
FILE: NetStream/include/menus/menu_http.h
================================================
#ifndef _MENU_HTTP_H_
#define _MENU_HTTP_H_
#include
#include
#include "dialog.h"
#include "menu_server.h"
#include "browsers/http_server_browser.h"
using namespace paf;
namespace menu {
class Http : public GenericServerMenu
{
public:
Http()
{
sce::AppSettings *settings = menu::Settings::GetAppSetInstance();
char host[256];
char port[32];
char user[256];
char password[256];
settings->GetString("http_host", host, sizeof(host), "");
settings->GetString("http_port", port, sizeof(port), "");
settings->GetString("http_user", user, sizeof(user), "");
settings->GetString("http_password", password, sizeof(password), "");
m_browser = new HttpServerBrowser(host, port, user, password);
}
MenuType GetMenuType() override
{
return MenuType_Http;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
*count = sizeof(k_settingsIdList) / sizeof(char*);
return k_settingsIdList;
}
private:
const uint32_t k_settingsIdList[1] = {
http_setting
};
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_hvdb.h
================================================
#ifndef _MENU_HVDB_H_
#define _MENU_HVDB_H_
#include
#include
#include "dialog.h"
#include "tex_pool.h"
#include "hvdb.h"
#include "menu_generic.h"
using namespace paf;
namespace menu {
class HVDB : public GenericMenu
{
public:
class Submenu
{
public:
enum SubmenuType
{
SubmenuType_Favourites = 0x947652c2
};
Submenu(HVDB *parentObj);
virtual ~Submenu();
virtual void ReleaseCurrentPage();
virtual void GoToNextPage() = 0;
virtual void GoToPrevPage() = 0;
virtual void GoToBasePageForSync() = 0;
virtual SubmenuType GetType() = 0;
ui::ListItem* CreateListItem(ui::listview::ItemFactory::CreateParam& param);
class ListViewCb : public ui::listview::ItemFactory
{
public:
ListViewCb(Submenu *parent) : m_parent(parent)
{
}
~ListViewCb()
{
}
ui::ListItem *Create(CreateParam& param)
{
return m_parent->CreateListItem(param);
}
void Start(StartParam& param)
{
param.list_item->Show(common::transition::Type_Popup1);
}
private:
Submenu *m_parent;
};
class Item
{
public:
Item()
{
}
wstring name;
wstring stat;
string workId;
string bannerUrl;
IDParam texId;
TexPool *texPool;
};
protected:
HVDB *m_baseParent;
ui::Widget *m_submenuRoot;
ui::ListView *m_list;
bool m_interrupted;
bool m_allJobsComplete;
vector- m_results;
uint32_t m_currentPage;
private:
static void OnTexPoolAdd(int32_t type, ui::Handler *self, ui::Event *e, void *userdata);
void OnListButton(ui::Widget *wdg);
};
class FavouriteSubmenu : public Submenu
{
public:
class FavouriteJob : public job::JobItem
{
public:
FavouriteJob(FavouriteSubmenu *parent) : job::JobItem("HVDB::FavouriteJob", NULL), m_parent(parent)
{
}
~FavouriteJob() {}
int32_t Run()
{
m_parent->ParseFavourite();
return SCE_PAF_OK;
}
void Finish(int32_t result) {}
private:
FavouriteSubmenu *m_parent;
};
FavouriteSubmenu(HVDB *parentObj);
~FavouriteSubmenu();
void ParseFavourite();
void GoToNextPage();
void GoToPrevPage();
void GoToBasePageForSync();
SubmenuType GetType()
{
return SubmenuType_Favourites;
}
private:
HVDBPaginationInfo m_pgi;
};
HVDB();
~HVDB() override;
void SwitchSubmenu(Submenu::SubmenuType type);
void Refresh();
MenuType GetMenuType() override
{
return MenuType_Hvdb;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
*count = sizeof(k_settingsIdList) / sizeof(char*);
return k_settingsIdList;
}
private:
void OnBackButton();
void OnSubmenuButton(ui::Widget *wdg);
void OnSettingsButton();
void OnOptionMenuEvent(int32_t type, int32_t subtype);
bool AuthMe();
ui::Widget *m_browserRoot;
ui::BusyIndicator *m_loaderIndicator;
ui::Text *m_topText;
Submenu *m_currentSubmenu;
int32_t m_dialogIdx;
TexPool *m_texPool;
const uint32_t k_settingsIdList[3] = {
hvdb_account_setting,
hvdb_search_setting,
hvdb_player_setting
};
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_hvdb_tracks.h
================================================
#ifndef _MENU_HVDB_TRACKS_H_
#define _MENU_HVDB_TRACKS_H_
#include
#include
#include "dialog.h"
#include "menu_server.h"
#include "browsers/hvdb_tracks_browser.h"
using namespace paf;
namespace menu {
class HvdbTracks : public GenericServerMenu
{
public:
HvdbTracks(const char *workId, const char *bannerUrl)
{
m_browser = new HvdbTracksBrowser(workId, bannerUrl);
}
MenuType GetMenuType() override
{
return MenuType_HvdbTracks;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
*count = sizeof(k_settingsIdList) / sizeof(char*);
return k_settingsIdList;
}
private:
const uint32_t k_settingsIdList[3] = {
hvdb_account_setting,
hvdb_search_setting,
hvdb_player_setting
};
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_local.h
================================================
#ifndef _MENU_LOCAL_H_
#define _MENU_LOCAL_H_
#include
#include
#include "dialog.h"
#include "menu_server.h"
#include "browsers/local_server_browser.h"
using namespace paf;
namespace menu {
class Local : public GenericServerMenu
{
public:
Local()
{
m_browser = new LocalServerBrowser();
}
MenuType GetMenuType() override
{
return MenuType_Local;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
*count = sizeof(k_settingsIdList) / sizeof(char*);
return k_settingsIdList;
}
private:
const uint32_t k_settingsIdList[1] = {
local_setting
};
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_player_simple.h
================================================
#ifndef _MENU_PLAYER_SIMPLE_H_
#define _MENU_PLAYER_SIMPLE_H_
#include
#include
#include "players/player_generic.h"
#include "subs/subs_generic.h"
#include "menu_generic.h"
#include "menu_youtube.h"
using namespace paf;
namespace menu {
class PlayerSimple : public GenericMenu
{
public:
enum
{
PlayerSimpleEvent = (ui::Handler::CB_STATE + 0x10000),
};
enum PlayerEvent
{
PlayerEvent_InitFail,
PlayerEvent_InitOk,
PlayerEvent_Back
};
enum AccJumpState
{
AccJumpState_None,
AccJumpState_Accumulate,
AccJumpState_Perform
};
enum SettingsOverride
{
SettingsOverride_None,
SettingsOverride_YouTube
};
class PadListener : public inputdevice::InputListener
{
public:
PadListener(PlayerSimple *parent) : InputListener(inputdevice::DEVICE_TYPE_PAD), m_parent(parent)
{
}
void OnUpdate(inputdevice::Data *data)
{
m_parent->OnPadUpdate(data);
}
private:
PlayerSimple *m_parent;
};
typedef void(*PlayerSimpleCallback)(PlayerSimple *player, void *pUserArg);
PlayerSimple(const char *url, GenericPlayer::Option *opt = NULL, GenericSubtitles::Option *sopt = NULL);
~PlayerSimple() override;
GenericPlayer *GetPlayer();
void SetScale(float scale);
float GetScale();
void SetPosition(float x, float y);
void SetSettingsOverride(SettingsOverride override);
MenuType GetMenuType() override
{
return MenuType_PlayerSimple;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
switch (m_settingsOverride)
{
case SettingsOverride_None:
*count = 0;
return nullptr;
case SettingsOverride_YouTube:
*count = sizeof(k_settingsIdListYoutubeOverride) / sizeof(char*);
return k_settingsIdListYoutubeOverride;
}
return nullptr;
}
private:
static int32_t PowerCallback(SceUID notifyId, int32_t notifyCount, int32_t notifyArg, void *pCommon);
static void UpdateTask(void *pArgBlock);
void OnVideoPlaneTouch();
void OnProgressBarStateChange(int32_t type);
void OnBackButton();
void OnPlayButton();
void OnWholeRepeatButton();
void OnPowerCallback(int32_t notifyArg);
void OnGenericPlayerStateChange(int32_t state);
void OnUpdate();
void OnPadUpdate(inputdevice::Data *data);
ui::Widget *m_videoPlane;
ui::BusyIndicator *m_loadIndicator;
ui::Widget *m_leftAccText;
ui::Widget *m_rightAccText;
ui::Widget *m_statPlane;
ui::Widget *m_backButton;
ui::Widget *m_wholeRepeatButton;
ui::Text *m_elapsedTimeText;
ui::Text *m_subsMainText;
ui::Text *m_subsEdgeText[4];
ui::ProgressBarTouch *m_progressBar;
ui::Widget *m_progressPlane;
ui::Widget *m_playButton;
uint32_t m_oldCurrTime;
bool m_progressPlaneShown;
uint32_t m_progressPlaneShownTime;
bool m_isSeeking;
bool m_isLS;
uint32_t m_oldButtons;
GenericPlayer::PlayerState m_oldState;
int32_t m_accJumpTime;
uint32_t m_accStartTime;
AccJumpState m_accJumpState;
float m_currentScale;
SettingsOverride m_settingsOverride;
SceUID m_pwCbId;
common::SharedPtr m_padListener;
GenericSubtitles::SystemSettings m_subSettings;
math::v2 m_subsBaseCharSize;
vector m_subIndices;
vector m_oldSubIndices;
GenericPlayer *m_player;
GenericSubtitles *m_subtitles;
const uint32_t k_settingsIdListYoutubeOverride[4] = {
youtube_search_setting,
youtube_comment_setting,
youtube_quality_setting,
youtube_player_setting
};
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_player_youtube.h
================================================
#ifndef _MENU_PLAYER_YOUTUBE_H_
#define _MENU_PLAYER_YOUTUBE_H_
#include
#include
#include "dialog.h"
#include "ftube.h"
#include "menu_generic.h"
#include "menus/menu_player_simple.h"
using namespace paf;
#define LIVE_COMMENT_NUM 6
#define LIVE_COMMENT_MAGIC 0x16865ddb
#define SELECT_QUALITY_MAGIC 0x3e9f36f4
#define USE_LIVE_COMMENT_HASHING
namespace menu {
class PlayerYoutube : public GenericMenu
{
public:
enum CompanelMode
{
CompanelMode_None,
CompanelMode_Description,
CompanelMode_Comment
};
class LoadJob : public job::JobItem
{
public:
LoadJob(PlayerYoutube *parent) : job::JobItem("YouTube::LoadJob", NULL), m_parent(parent)
{
}
~LoadJob() {}
int32_t Run()
{
m_parent->Load();
return SCE_PAF_OK;
}
void Finish(int32_t result) {}
private:
PlayerYoutube *m_parent;
};
class CommentItem
{
public:
wstring author;
wstring content;
wstring date;
wstring voteCount;
bool likedByOwner;
string replyContinuation;
};
class LiveCommentListViewCb : public ui::listview::ItemFactory
{
public:
LiveCommentListViewCb(menu::PlayerYoutube *parent) : m_parent(parent)
{
}
~LiveCommentListViewCb()
{
}
ui::ListItem* Create(CreateParam& param)
{
return m_parent->CreateLiveCommentListItem(param);
}
private:
menu::PlayerYoutube *m_parent;
};
class CommentListViewCb : public ui::listview::ItemFactory
{
public:
CommentListViewCb(menu::PlayerYoutube *parent) : m_parent(parent)
{
}
~CommentListViewCb()
{
}
ui::ListItem* Create(CreateParam& param)
{
return m_parent->CreateCommentListItem(param);
}
private:
PlayerYoutube *m_parent;
};
class SelectQualityDialogListViewCb : public ui::listview::ItemFactory
{
public:
SelectQualityDialogListViewCb(menu::PlayerYoutube *parent) : m_parent(parent)
{
}
~SelectQualityDialogListViewCb()
{
}
ui::ListItem* Create(CreateParam& param)
{
return m_parent->CreateSelectQualityListItem(param);
}
private:
menu::PlayerYoutube *m_parent;
};
class LiveCommentParseThread : public thread::Thread
{
public:
LiveCommentParseThread(PlayerYoutube *parent) : thread::Thread(SCE_KERNEL_DEFAULT_PRIORITY_USER + 20, SCE_KERNEL_64KiB, "YouTube::CommentParseThread", NULL), m_parent(parent)
{
}
void EntryFunction()
{
m_parent->ParseLiveComments(this);
}
private:
PlayerYoutube *m_parent;
};
class CommentParseJob : public job::JobItem
{
public:
CommentParseJob(PlayerYoutube *parent) : job::JobItem("YouTube::CommentParseJob", NULL), m_parent(parent)
{
}
~CommentParseJob() {}
int32_t Run()
{
m_parent->ParseComments();
return SCE_PAF_OK;
}
void Finish(int32_t result) {}
private:
PlayerYoutube *m_parent;
};
PlayerYoutube(const char *id, bool isFavourite);
~PlayerYoutube() override;
MenuType GetMenuType() override
{
return MenuType_PlayerYouTube;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
*count = sizeof(k_settingsIdList) / sizeof(char*);
return k_settingsIdList;
}
private:
static void LoadSecondStageTask(void *pArgBlock);
void OnLoadSecondStage();
void OnDwAddComplete(int32_t result);
void OnBackButton();
void OnSettingsButton();
void OnExpandButton();
void OnVideoSettingsButton();
void OnSelectQualityButton(ui::Widget *wdg);
void OnFavButton();
void OnCommentButton();
void OnDescButton();
void OnCommentBodyButton(ui::Widget *wdg);
void OnPlayerEvent(int32_t type);
void OnOptionMenuEvent(int32_t type, int32_t subtype);
void OnSettingsEvent(int32_t type);
void Load();
void ParseComments();
ui::ListItem *CreateLiveCommentListItem(ui::listview::ItemFactory::CreateParam& param);
ui::ListItem *CreateCommentListItem(ui::listview::ItemFactory::CreateParam& param);
void ParseLiveComments(thread::Thread *thrd);
ui::ListItem *CreateSelectQualityListItem(ui::listview::ItemFactory::CreateParam& param);
ui::Text *m_title;
ui::Text *m_stat0;
ui::Text *m_stat1;
ui::Text *m_stat2;
ui::Button *m_expandButton;
ui::Button *m_videoSettingsButton;
ui::Button *m_favButton;
ui::Widget *m_companelBase;
ui::Widget *m_commentButton;
ui::Widget *m_descButton;
ui::ListView *m_companelRoot;
menu::PlayerSimple *m_player;
string m_videoLink;
string m_videoLinkForDw;
string m_audioLink;
string m_videoId;
bool m_isLive;
bool m_isFav;
string m_description;
string m_commentCont;
vector m_commentItems;
LiveCommentParseThread *m_liveCommentThread;
GenericPlayer::Option *m_option;
const uint32_t k_settingsIdList[5] = {
youtube_search_setting,
youtube_comment_setting,
youtube_quality_setting,
youtube_player_setting,
cloud_sync_setting
};
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_server.h
================================================
#ifndef _MENU_SERVER_H_
#define _MENU_SERVER_H_
#include
#include
#include "dialog.h"
#include "menu_generic.h"
#include "browsers/generic_server_browser.h"
#include "menus/menu_player_simple.h"
using namespace paf;
namespace menu {
class GenericServerMenu : public GenericMenu
{
public:
class ListViewCb : public ui::listview::ItemFactory
{
public:
ListViewCb(GenericServerMenu *parent) : m_parent(parent)
{
}
~ListViewCb()
{
}
ui::ListItem *Create(CreateParam& param)
{
return m_parent->CreateListItem(param);
}
void Start(StartParam& param)
{
param.list_item->Show(common::transition::Type_Popup1);
}
private:
GenericServerMenu *m_parent;
};
class GoToJob : public job::JobItem
{
public:
GoToJob(GenericServerMenu *parent) : job::JobItem("Server::GoToJob", NULL), m_parent(parent)
{
}
~GoToJob() {}
int32_t Run()
{
m_parent->GoTo(m_targetRef);
return SCE_PAF_OK;
}
void Finish(int32_t result) {}
void SetRef(const string& ref)
{
m_targetRef = ref;
}
private:
GenericServerMenu *m_parent;
string m_targetRef;
};
class BrowserPage
{
public:
BrowserPage() : m_isLoaded(false)
{
}
~BrowserPage()
{
}
vector *m_itemList;
ui::ListView *m_list;
bool m_isLoaded;
};
GenericServerMenu();
~GenericServerMenu() override;
ui::ListItem* CreateListItem(ui::listview::ItemFactory::CreateParam& param);
void GoTo(const string& ref);
bool PushBrowserPage(string *ref);
bool PopBrowserPage();
protected:
GenericServerBrowser *m_browser;
private:
void OnBackButton();
void OnListButton(ui::Widget *wdg);
void OnSettingsButton();
void OnPlayerEvent(int32_t type);
void OnOptionMenuEvent(int32_t type);
void OnConnectionFailedDialogEvent();
void OnPlayerCreateTimeout(GenericServerBrowser::Entry *entry);
ui::Widget *m_browserRoot;
ui::BusyIndicator *m_loaderIndicator;
ui::Text *m_topText;
vector m_pageList;
menu::GenericMenu *m_player;
bool m_firstBoot;
bool m_playerFailed;
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_settings.h
================================================
#ifndef _MENU_SETTINGS_H_
#define _MENU_SETTINGS_H_
#include
#include
#include "menus/menu_generic.h"
using namespace paf;
namespace menu {
class Settings
{
public:
enum
{
SettingsEvent = (ui::Handler::CB_STATE + 0x30000),
};
enum SettingsEvent
{
SettingsEvent_Close,
SettingsEvent_ValueChange
};
Settings();
~Settings();
static Settings *GetInstance();
static sce::AppSettings *GetAppSetInstance();
static void Init();
private:
static void CBOnStartPageTransition(const char *elementId, int32_t type);
static void CBOnPageActivate(const char *elementId, int32_t type);
static void CBOnPageDeactivate(const char *elementId, int32_t type);
static int32_t CBOnCheckVisible(const char *elementId, bool *pIsVisible);
static int32_t CBOnPreCreate(const char *elementId, sce::AppSettings::Element *element);
static int32_t CBOnPostCreate(const char *elementId, paf::ui::Widget *widget);
static int32_t CBOnPress(const char *elementId, const char *newValue);
static int32_t CBOnPress2(const char *elementId, const char *newValue);
static void CBOnTerm(int32_t result);
static wchar_t *CBOnGetString(const char *elementId);
static int32_t CBOnGetSurface(graph::Surface **surf, const char *elementId);
};
}
#endif
================================================
FILE: NetStream/include/menus/menu_youtube.h
================================================
#ifndef _MENU_YOUTUBE_H_
#define _MENU_YOUTUBE_H_
#include
#include
#include "dialog.h"
#include "tex_pool.h"
#include "ftube.h"
#include "menu_generic.h"
using namespace paf;
namespace menu {
class YouTube : public GenericMenu
{
public:
class Submenu
{
public:
enum SubmenuType
{
SubmenuType_Search = 0xbe840a1f,
SubmenuType_History = 0x2bc652ba,
SubmenuType_Favourites = 0x947652c2
};
Submenu(YouTube *parentObj);
virtual ~Submenu();
virtual void ReleaseCurrentPage();
virtual void GoToNextPage() = 0;
virtual void GoToPrevPage() = 0;
virtual void GoToBasePageForSync() = 0;
virtual SubmenuType GetType() = 0;
ui::ListItem* CreateListItem(ui::listview::ItemFactory::CreateParam& param);
class ListViewCb : public ui::listview::ItemFactory
{
public:
ListViewCb(Submenu *parent) : m_parent(parent)
{
}
~ListViewCb()
{
}
ui::ListItem *Create(CreateParam& param)
{
return m_parent->CreateListItem(param);
}
void Start(StartParam& param)
{
param.list_item->Show(common::transition::Type_Popup1);
}
private:
Submenu *m_parent;
};
class Item
{
public:
Item()
{
}
FTItemType type;
wstring name;
wstring time;
wstring stat;
string videoId;
IDParam texId;
TexPool *texPool;
};
protected:
YouTube *m_baseParent;
ui::Widget *m_submenuRoot;
ui::ListView *m_list;
bool m_interrupted;
bool m_allJobsComplete;
vector
- m_results;
uint32_t m_currentPage;
private:
static void OnTexPoolAdd(int32_t type, ui::Handler *self, ui::Event *e, void *userdata);
void OnListButton(ui::Widget *wdg);
};
class SearchSubmenu : public Submenu
{
public:
class SearchJob : public job::JobItem
{
public:
SearchJob(SearchSubmenu *parent) : job::JobItem("YouTube::SearchJob", NULL), m_parent(parent)
{
}
~SearchJob() {}
int32_t Run()
{
m_parent->Search();
return SCE_PAF_OK;
}
void Finish(int32_t result) {}
private:
SearchSubmenu *m_parent;
};
SearchSubmenu(YouTube *parentObj);
~SearchSubmenu();
void Search();
void GoToNextPage();
void GoToPrevPage();
void GoToBasePageForSync();
SubmenuType GetType()
{
return SubmenuType_Search;
}
private:
void OnSearchButton();
ui::TextBox *m_searchBox;
ui::Widget *m_searchButton;
string m_request;
map m_continuations;
};
class HistorySubmenu : public Submenu
{
public:
class HistoryJob : public job::JobItem
{
public:
HistoryJob(HistorySubmenu *parent) : job::JobItem("YouTube::HistoryJob", NULL), m_parent(parent)
{
}
~HistoryJob() {}
int32_t Run()
{
m_parent->Parse();
return SCE_PAF_OK;
}
void Finish(int32_t result) {}
private:
HistorySubmenu *m_parent;
};
HistorySubmenu(YouTube *parentObj);
~HistorySubmenu();
void Parse();
void GoToNextPage();
void GoToPrevPage();
void GoToBasePageForSync();
SubmenuType GetType()
{
return SubmenuType_History;
}
};
class FavouriteSubmenu : public Submenu
{
public:
class FavouriteJob : public job::JobItem
{
public:
FavouriteJob(FavouriteSubmenu *parent) : job::JobItem("YouTube::FavouriteJob", NULL), m_parent(parent)
{
}
~FavouriteJob() {}
int32_t Run()
{
m_parent->Parse();
return SCE_PAF_OK;
}
void Finish(int32_t result) {}
private:
FavouriteSubmenu *m_parent;
};
FavouriteSubmenu(YouTube *parentObj);
~FavouriteSubmenu();
void Parse();
void GoToNextPage();
void GoToPrevPage();
void GoToBasePageForSync();
SubmenuType GetType()
{
return SubmenuType_Favourites;
}
private:
void OnSearchButton();
ui::TextBox *m_searchBox;
ui::Widget *m_searchButton;
string m_request;
};
class LogClearJob : public job::JobItem
{
public:
enum Type
{
Type_Fav,
Type_Hist
};
LogClearJob(Type type, Submenu *submenu) : job::JobItem("YouTube::LogClearJob", NULL), m_type(type), m_submenu(submenu)
{
}
~LogClearJob() {}
int32_t Run();
void Finish(int32_t result) {}
private:
Type m_type;
Submenu *m_submenu;
};
class CloudJob : public job::JobItem
{
public:
enum Type
{
Type_Upload,
Type_Download
};
CloudJob(Type type, Submenu *submenu) : job::JobItem("YouTube::CloudJob", NULL), m_type(type), m_submenu(submenu)
{
}
~CloudJob() {}
int32_t Run();
void Finish(int32_t result) {}
private:
Type m_type;
Submenu *m_submenu;
};
YouTube();
~YouTube() override;
void SwitchSubmenu(Submenu::SubmenuType type);
MenuType GetMenuType() override
{
return MenuType_Youtube;
}
const uint32_t *GetSupportedSettingsItems(int32_t *count) override
{
*count = sizeof(k_settingsIdList) / sizeof(char*);
return k_settingsIdList;
}
private:
void OnBackButton();
void OnSubmenuButton(ui::Widget *wdg);
void OnSettingsButton();
void OnOptionMenuEvent(int32_t type, int32_t subtype);
void OnDialogEvent(int32_t type);
void OnSettingsEvent(int32_t type);
ui::Widget *m_browserRoot;
ui::BusyIndicator *m_loaderIndicator;
ui::Text *m_topText;
ui::Box *m_btMenu;
ui::Widget *m_searchBt;
ui::Widget *m_histBt;
ui::Widget *m_favBt;
Submenu *m_currentSubmenu;
int32_t m_dialogIdx;
TexPool *m_texPool;
const uint32_t k_settingsIdList[5] = {
youtube_search_setting,
youtube_comment_setting,
youtube_quality_setting,
youtube_player_setting,
cloud_sync_setting
};
};
}
#endif
================================================
FILE: NetStream/include/netstream_locale.h
================================================
#ifndef _netstream_locale_H_
#define _netstream_locale_H_
//
//This file was generated automatically by psp2pafhshgen.exe
//
#define msg_title_menu_first (0xcae20590)
#define msg_fpmenu_item_0 (0xab1aa619)
#define msg_fpmenu_item_1 (0xc308121f)
#define msg_fpmenu_item_2 (0x45965a3d)
#define msg_fpmenu_item_3 (0xa8fb98bc)
#define msg_fpmenu_item_4 (0x5c491dfd)
#define msg_youtube_history (0xa8a29762)
#define msg_youtube_description (0x336514d8)
#define msg_youtube_comment_more (0xa3ada054)
#define msg_youtube_comment_detail (0x057bb502)
#define msg_youtube_comment_reply (0x996ef6f5)
#define msg_youtube_comment_like_count (0xc4d65d6e)
#define msg_next_page (0x8adf20f8)
#define msg_previous_page (0xede8bfcb)
#define msg_settings (0xed3441bf)
#define msg_settings_http (0x6c5673f2)
#define msg_settings_ftp (0x704624b0)
#define msg_settings_account (0x9c86b550)
#define msg_settings_local (0xd9a4496d)
#define msg_settings_search (0x58e3fab6)
#define msg_settings_comment (0x126adfcc)
#define msg_settings_quality (0xe8b7b3e1)
#define msg_settings_player (0xc522e457)
#define msg_settings_cloud_sync (0xd17de6c8)
#define msg_settings_verinfo (0x32a4c75a)
#define msg_http_host (0xdcb23ff1)
#define msg_http_port (0xc7f3641b)
#define msg_http_user (0x4af03db0)
#define msg_http_password (0x1df489af)
#define msg_ftp_host (0x3bfcdb72)
#define msg_ftp_port (0xa27211e8)
#define msg_ftp_user (0x91940499)
#define msg_ftp_password (0x8b0f92bb)
#define msg_ftp_nlst (0xc8025a39)
#define msg_ftp_nlst_hint (0x8bac33a4)
#define msg_hvdb_host (0xda01ba30)
#define msg_hvdb_user (0xe167be34)
#define msg_hvdb_password (0x30dea278)
#define msg_local_playlist_prefix (0x4278708e)
#define msg_local_sort_name (0xd5e8c8fa)
#define msg_local_sort_type (0x02c5dfcb)
#define msg_option_local_sort_name_0 (0x6ae3e929)
#define msg_option_local_sort_name_1 (0x27cace63)
#define msg_option_local_sort_type_0 (0x07755294)
#define msg_option_local_sort_type_1 (0xa20432c9)
#define msg_youtube_quality_vod_video (0x1908a662)
#define msg_youtube_quality_vod_audio (0x972a9228)
#define msg_youtube_quality_live (0xf9526359)
#define msg_youtube_search_region (0x0b103c0e)
#define msg_youtube_search_sort (0x656f44a5)
#define msg_youtube_search_date (0xcf93868a)
#define msg_youtube_search_dur (0xcfaf8812)
#define msg_youtube_search_feature (0xa8de0f20)
#define msg_youtube_search_proxy (0x4c529b77)
#define msg_youtube_comment_sort (0xfd6ca373)
#define msg_option_search_region_0 (0xb56add1e)
#define msg_option_search_sort_0 (0x522b5f02)
#define msg_option_search_sort_1 (0xecde5937)
#define msg_option_search_sort_2 (0xa41c4c57)
#define msg_option_search_sort_3 (0x2dc7bf9f)
#define msg_option_search_date_0 (0x9dc2d0cd)
#define msg_option_search_date_1 (0x7972fabe)
#define msg_option_search_date_2 (0x8b497f22)
#define msg_option_search_date_3 (0xe22a82a1)
#define msg_option_search_date_4 (0x9a7b465f)
#define msg_option_search_date_5 (0xe7a24a6b)
#define msg_option_search_dur_0 (0xc39e8c4f)
#define msg_option_search_dur_1 (0xc44c1c25)
#define msg_option_search_dur_2 (0x8cf1273f)
#define msg_option_search_dur_3 (0x6b7af5cc)
#define msg_option_search_feature_0 (0x4f23fcae)
#define msg_option_search_feature_1 (0xd4ecbd56)
#define msg_option_comment_sort_0 (0x0715b7f3)
#define msg_option_comment_sort_1 (0x59115ba0)
#define msg_option_youtube_quality_vod_video_0 (0x8e8f98b5)
#define msg_option_youtube_quality_vod_video_1 (0xb30ef49b)
#define msg_option_youtube_quality_vod_video_2 (0x5165af0b)
#define msg_option_youtube_quality_vod_video_3 (0x7d4ae9f0)
#define msg_option_youtube_quality_vod_video_4 (0x6c8ddd13)
#define msg_option_youtube_quality_vod_video_5 (0xae9e2192)
#define msg_option_youtube_quality_live_0 (0xee0ba354)
#define msg_option_youtube_quality_live_1 (0x858f1e17)
#define msg_option_youtube_quality_live_2 (0x6f2108e2)
#define msg_option_youtube_quality_live_3 (0x789efe84)
#define msg_option_youtube_quality_live_4 (0xe2994c58)
#define msg_hvdb_search_sort (0xfa7c8d91)
#define msg_hvdb_search_sort_type (0x9b0bd3ed)
#define msg_hvdb_search_filter (0x31ded7e7)
#define msg_option_hvdb_search_sort_0 (0x93cdc1e6)
#define msg_option_hvdb_search_sort_1 (0xec171b82)
#define msg_option_hvdb_search_sort_type_0 (0xccfe3a39)
#define msg_option_hvdb_search_sort_type_1 (0x8e2eed08)
#define msg_option_hvdb_search_sort_type_2 (0x40b00c6a)
#define msg_option_hvdb_search_sort_type_3 (0x787efc0e)
#define msg_option_hvdb_search_sort_type_4 (0x39eecc63)
#define msg_option_hvdb_search_sort_type_5 (0x3f9339c8)
#define msg_option_hvdb_search_sort_type_6 (0xcbcb9f9d)
#define msg_option_hvdb_search_sort_type_7 (0xcad39666)
#define msg_option_hvdb_search_sort_type_8 (0xde388b81)
#define msg_option_hvdb_search_filter_0 (0x68f52ed4)
#define msg_option_hvdb_search_filter_1 (0xbac48c12)
#define msg_option_hvdb_search_filter_2 (0x4fc34921)
#define msg_option_hvdb_search_filter_3 (0xaa3e0f0c)
#define msg_option_hvdb_search_filter_4 (0x0f26631d)
#define msg_option_hvdb_search_filter_5 (0x9f0969d9)
#define msg_toggle_hvdb_banner (0x0e69d985)
#define msg_toggle_cloud_sync (0xe3434564)
#define msg_toggle_cloud_sync_auto (0x2144bf5c)
#define msg_cloud_sync_hint (0x650bd57f)
#define msg_toggle_youtube_min (0x9236786a)
#define msg_settings_hvdb_refresh (0xa20c0934)
#define msg_settings_youtube_cloud_upload (0x5fe6009c)
#define msg_settings_youtube_cloud_download (0xb35e246e)
#define msg_settings_youtube_clean_history (0xce0c7a4d)
#define msg_settings_youtube_clean_fav (0x0342b229)
#define msg_settings_youtube_clean_history_confirm (0xd3225a4e)
#define msg_settings_youtube_clean_fav_confirm (0x68a1ba57)
#define msg_settings_youtube_download (0x8449e69c)
#define msg_settings_youtube_download_audio (0x99364cad)
#define msg_settings_youtube_download_begin (0x5ed1d900)
#define msg_quality_select_dialog_title (0x6307ab56)
#define msg_error_psn_connection (0x56f0c03c)
#endif
================================================
FILE: NetStream/include/netstream_plugin.h
================================================
#ifndef _netstream_plugin_H_
#define _netstream_plugin_H_
//
//This file was generated automatically by psp2pafhshgen.exe
//
#define netstream_plugin (0xb2fabc6f)
#define page_first (0xe63e6133)
#define plane_base_bg_page_first (0x94c4a1ca)
#define template_ref_top_title_bar_page_first (0x3f9ee201)
#define template_ref_list_view_page_first (0xc4d69f4c)
#define page_server_generic (0x4bcbf5f5)
#define plane_base_bg_page_server_generic (0x7e8e5c95)
#define template_ref_top_title_bar_page_server_generic (0x9f4f703a)
#define plane_browser_root_page_server_generic (0xbe3c359a)
#define busyindicator_loader_page_server_generic (0x124a7a79)
#define button_back_page_server_generic (0xa4f7d1fe)
#define button_settings_page_server_generic (0x0efde917)
#define page_youtube (0xd9d437d7)
#define plane_base_bg_page_youtube (0x86efefd3)
#define template_ref_top_title_bar_page_youtube (0xa1049fc2)
#define plane_browser_root_page_youtube (0x149aa632)
#define busyindicator_loader_page_youtube (0x8c1b7fd7)
#define plane_bottommenu_page_youtube (0x67720528)
#define box_bottommenu_page_youtube (0xc88bf810)
#define button_yt_btmenu_search (0xbe840a1f)
#define button_yt_btmenu_history (0x2bc652ba)
#define yt_plane_bottommenu_sep1 (0xd2144aee)
#define button_yt_btmenu_favourite (0x947652c2)
#define yt_plane_bottommenu_sep2 (0x019d2b63)
#define button_back_page_youtube (0xaf2e605e)
#define button_settings_page_youtube (0x72ea9465)
#define page_hvdb (0x46781da9)
#define plane_base_bg_page_hvdb (0x5221a311)
#define template_ref_top_title_bar_page_hvdb (0x90950173)
#define plane_browser_root_page_hvdb (0xec2b4bf1)
#define busyindicator_loader_page_hvdb (0x5d1f04ac)
#define button_back_page_hvdb (0x49aa414e)
#define button_settings_page_hvdb (0x6e9c0546)
#define page_youtube_player (0xce0eb512)
#define plane_base_bg_page_youtube_player (0x14efbee7)
#define plane_root_page_youtube_player (0x9794cec3)
#define text_video_title (0x440b44a9)
#define plane_video_dummy (0xd6acc553)
#define text_video_stat_0 (0x04004a27)
#define text_video_stat_1 (0xdeb2242c)
#define text_video_stat_2 (0x9e5efcb0)
#define button_youtube_fav (0xfe64fd07)
#define button_youtube_expand (0x5935ac0d)
#define button_youtube_settings (0xfd489044)
#define plane_youtube_live_now (0xa4e3ca2a)
#define plane_youtube_companel_base (0x62c325b5)
#define plane_youtube_companel_frame (0x9795d2cc)
#define plane_youtube_companel_fill (0x1780cda8)
#define button_yt_companel_description (0x6a78b2b9)
#define button_yt_companel_comment (0x629df833)
#define button_back_page_youtube_player (0x0aaea8c4)
#define button_settings_page_youtube_player (0xa823085e)
#define plane_youtube_loader (0x87680fe5)
#define busyindicator_youtube_loader (0xcb3165bc)
#define page_player_simple (0xf185100a)
#define plane_video_page_player_simple (0x79d84d3d)
#define landscape (0x0a2f2cd9)
#define full_hd (0x4dbf9bdc)
#define text_video_page_player_subs_edge_0 (0xf011e6a6)
#define text_video_page_player_subs_edge_1 (0x5dcd2072)
#define text_video_page_player_subs_edge_2 (0xc0000861)
#define text_video_page_player_subs_edge_3 (0x8061d9eb)
#define text_video_page_player_subs_main (0x0dc433eb)
#define busyindicator_video_page_player_simple (0xb6f59ab8)
#define text_video_page_player_simple_acc_left (0x9b2f5135)
#define text_video_page_player_simple_acc_right (0xe77b3c6f)
#define button_video_page_control_trigger (0x0996c400)
#define button_video_page_whole_repeat (0xa6a71a6b)
#define plane_statindicator (0xf1b32eba)
#define plane_video_control_panel_bg (0x3c3c2c43)
#define progressbar_touch_video_control_panel (0x2e5febc7)
#define text_video_control_panel_progressbar_label_elapsed (0x64c584eb)
#define text_video_control_panel_progressbar_label_total (0xd4315474)
#define button_video_control_panel_playpause (0xddeb183f)
#define button_back_page_player_simple (0x0a0a4f24)
#define style_button_option_single (0x667e5d41)
#define plane_obj1 (0xf239aa56)
#define label_obj1 (0xbde6cef8)
#define plane_obj2 (0xa246c545)
#define style_button_option_top (0xf808f140)
#define style_button_option_bottom (0xa4f80dc0)
#define style_button_option_middle (0x29d701c3)
#define style_text_option_menu_ruler (0x9d28f73d)
#define text_obj1 (0xa56e4ba2)
#define style_plane_black (0xaaa827ae)
#define style_busyindicator_big (0x44a21a77)
#define style_text_top_title_bar (0x1bc003d9)
#define style_list_view_generic (0xfad63dd9)
#define style_list_view_item_generic (0x885879e0)
#define style_image_button_list_button (0xe6cd9335)
#define plane_obj3 (0xddbbc1de)
#define style_plane_video_page_control_bg (0x762eff8c)
#define style_text_video_control_panel_progressbar_label_green (0x3eb7c2ac)
#define style_text_video_control_panel_progressbar_label_white (0xa273dd12)
#define style_video_control_panel_progressbar (0x31bc66a3)
#define plane_obj6 (0xa5ea3dd2)
#define plane_obj7 (0x07e9a874)
#define plane_obj8 (0xda8566da)
#define plane_obj4 (0x1c4fbcb6)
#define plane_obj9 (0x39d33475)
#define plane_obj5 (0x7c500a37)
#define style_button_video_control_panel (0xe0c4c74b)
#define style_button_video_big_repeat (0x3e151589)
#define style_text_video_control_panel_acc_left (0xf9313764)
#define style_text_video_control_panel_acc_right (0xb234f959)
#define style_list_view_hvdb (0xf0d6bf00)
#define style_image_button_list_button_hvdb (0xacb012c0)
#define style_image_button_list_button_hvdb_aligned (0xb1433214)
#define style_text_list_button_hvdb_subtext (0xdbdbf648)
#define style_list_view_youtube (0xd50417b3)
#define style_button_yt_search (0x3dc1bb84)
#define style_button_yt_history (0x623942ea)
#define style_button_yt_favourite (0x437141f6)
#define style_text_box_top_youtube_search (0x38cc6c7c)
#define style_button_yt_top_search (0xc93ad05d)
#define style_image_button_list_button_youtube (0x24f20afe)
#define style_image_button_list_button_youtube_aligned (0xc9fe737b)
#define style_text_list_button_youtube_time (0x409c87af)
#define style_text_list_button_youtube_subtext (0x92697e0c)
#define style_text_youtube_video_title (0x52460631)
#define style_text_youtube_video_stat (0xd461b912)
#define style_text_youtube_video_stat_right_align (0xa9e17ed6)
#define style_text_youtube_companel (0x38fa4408)
#define style_button_yt_expand (0x578c3485)
#define style_button_yt_settings (0x4c5eda08)
#define style_button_yt_fav (0x3465f513)
#define style_plane_youtube_loader (0xbbff71eb)
#define style_button_yt_companel (0x9ec395e5)
#define style_list_view_companel (0x386ff929)
#define style_scroll_view_companel (0xfc80bbc0)
#define style_button_yt_comment (0x41c21f50)
#define style_button_yt_quality_select (0xb111e15d)
#define template_option_menu_base (0xed36b1c7)
#define button_option_menu_close (0x655c6a32)
#define plane_option_menu_base (0x4446ff86)
#define text_option_menu_ruler (0xc9cdb2cc)
#define box_option_menu (0xae3d8acd)
#define template_option_menu_button_single (0x9227a229)
#define button_option_menu_single (0x242a5612)
#define template_option_menu_button_top (0x9e7aa431)
#define button_option_menu_top (0x1f350609)
#define template_option_menu_button_bottom (0xeaf5dc69)
#define button_option_menu_bottom (0xe034ff9c)
#define template_option_menu_button_middle (0x429cab34)
#define button_option_menu_middle (0xbbc3bf22)
#define template_top_title_bar (0xdb521164)
#define plane_top (0x8be92f90)
#define box_top (0xd461521e)
#define text_top (0xfab814ca)
#define plane_top_separator (0x939510d6)
#define template_list_item_generic (0x929d094f)
#define list_item_generic (0xce92de48)
#define image_button_list_item (0xefeb27e8)
#define template_list_view_generic (0xaf8dc058)
#define list_view_generic (0xa176265a)
#define template_list_view_hvdb_fav (0x5bd1ad61)
#define plane_list_view_hvdb_fav_root (0xf5b571f4)
#define list_view_hvdb (0xb6455f38)
#define template_list_item_hvdb (0xb17d6cbb)
#define list_item_hvdb (0x5f236960)
#define image_button_list_item_hvdb (0xc16c2ffd)
#define text_list_item_hvdb_time (0xe9ff1a73)
#define text_list_item_hvdb_subtext (0x46b06861)
#define template_list_item_hvdb_aligned (0xea9a41ee)
#define list_item_hvdb_aligned (0xe88d0f7f)
#define image_button_list_item_hvdb_aligned (0xf206e7d6)
#define template_list_view_youtube_search (0xfc5c5e23)
#define plane_list_view_youtube_search_root (0x698023d4)
#define plane_top_youtube_search (0x98cff0fe)
#define text_box_top_youtube_search (0xb85026a0)
#define button_top_youtube_search (0x8bb93ec5)
#define list_view_youtube (0x141e4129)
#define template_list_view_youtube_history (0xf3ccbdab)
#define plane_list_view_youtube_history_root (0x65e38415)
#define template_list_view_youtube_fav (0x07f60af5)
#define plane_list_view_youtube_fav_root (0x4ee965e7)
#define plane_top_youtube_fav (0x8951635e)
#define template_list_item_youtube (0x8e21b0cb)
#define list_item_youtube (0xbb459f1c)
#define image_button_list_item_youtube (0x4af481a3)
#define text_list_item_youtube_time (0x94781539)
#define text_list_item_youtube_subtext (0xbf47692e)
#define template_list_item_youtube_aligned (0xf3990ecd)
#define list_item_youtube_aligned (0x1df53fb2)
#define image_button_list_item_youtube_aligned (0x0ad60347)
#define template_list_view_youtube_companel (0x8fde7ef3)
#define list_view_youtube_companel (0xf935cf50)
#define template_scroll_view_youtube_companel (0x8824b2e2)
#define scroll_view_youtube_companel (0x2af8c40c)
#define text_youtube_companel (0x0d53901a)
#define template_list_item_youtube_quality_select (0x4c0e8661)
#define list_item_youtube_quality_select (0x482b1df9)
#define button_yt_quality_select_item (0x398a71ea)
#define template_list_item_youtube_comment (0x9439135e)
#define list_item_youtube_comment (0x82a72645)
#define button_yt_companel_comment_item (0x160347a5)
#define template_scroll_item_youtube_comment_detail (0x18ae4e45)
#define text_youtube_comment_detail (0x64dd9d5e)
#define plane_comment_detail_separator (0x5376d048)
#define text_youtube_comment_detail_body (0x7ab6ee5d)
#define ja (0x84572ef2)
#define en (0x094b0fe0)
#define fr (0xb858a87c)
#define es (0x09cd68a2)
#define de (0x600ccd1b)
#define it (0x6c5522ca)
#define nl (0x595477bd)
#define pt (0xbc811258)
#define ru (0x67b8b1c4)
#define ko (0x65a7da8f)
#define fi (0x6b163fa3)
#define sv (0x0a6190df)
#define da (0xcdd4f874)
#define no (0xfd128635)
#define pl (0xf437cb07)
#define tr (0xd9e83874)
#define tex_yt_icon_search (0x9d4271de)
#define tex_yt_icon_history (0xd7b56e3a)
#define tex_yt_icon_favourite (0x007f29c1)
#define tex_vertical_separator (0x497731c5)
#define tex_button_pause (0x15a38e2c)
#define tex_button_play (0xe662c1b8)
#define tex_button_big_repeat (0x1c7a4609)
#define tex_button_arrow_left (0x9c71909e)
#define tex_button_arrow_right (0xd9857177)
#define tex_button_settings (0x75dcaa15)
#define tex_common_bg (0xa935e111)
#define tex_fpmenu_icon_youtube (0xa84eb1aa)
#define tex_fpmenu_icon_http (0x9a91af5d)
#define tex_fpmenu_icon_ftp (0xa8d8a98c)
#define tex_fpmenu_icon_local (0x01add48c)
#define tex_fpmenu_icon_hvdb (0x850881d2)
#define tex_file_icon_video (0x5aa46fb7)
#define tex_file_icon_folder (0xdeab6c16)
#define tex_file_icon_playlist (0xfb08ccb2)
#define tex_file_icon_music (0xdd85e31c)
#define tex_file_icon_unsupported (0x289b9013)
#define tex_black (0x974eadf7)
#define tex_button_expand (0xff3d36d8)
#define tex_yt_icon_live_now (0x96343816)
#define tex_yt_icon_favourite_for_player (0xf11b796d)
#define tex_yt_icon_favourite_for_player_glow (0xbdb0e87f)
#define file_netstream_settings (0x66adfd8d)
#endif
================================================
FILE: NetStream/include/netstream_settings.h
================================================
#ifndef _netstream_settings_H_
#define _netstream_settings_H_
//
//This file was generated automatically by psp2pafhshgen.exe
//
#define ns_setting (0x9ae4442b)
#define http_setting (0x823282d5)
#define http_host (0xbe7aa61b)
#define http_port (0x4d5195ab)
#define http_user (0x74bca4c7)
#define http_password (0x1cc16d21)
#define ftp_setting (0x72e40d3f)
#define ftp_host (0xe1a509f3)
#define ftp_port (0xef7b3626)
#define ftp_user (0x89e77ea8)
#define ftp_password (0x571003fe)
#define ftp_nlst (0xd6f1d921)
#define hvdb_account_setting (0x53adb9eb)
#define hvdb_host (0x92199baf)
#define hvdb_user (0x48230999)
#define hvdb_password (0x24f1face)
#define hvdb_search_setting (0x647436d9)
#define list_hvdb_search_sort (0x4b1ffc49)
#define list_hvdb_search_sort_00 (0xe48be6b0)
#define list_hvdb_search_sort_01 (0xf456ace6)
#define list_hvdb_search_sort_type (0x0d052e0a)
#define list_hvdb_search_sort_type_00 (0xac31e72a)
#define list_hvdb_search_sort_type_01 (0x599cece6)
#define list_hvdb_search_sort_type_02 (0x2b00d21e)
#define list_hvdb_search_sort_type_03 (0xbcc70780)
#define list_hvdb_search_sort_type_04 (0x8c223f0b)
#define list_hvdb_search_sort_type_05 (0x780c2ccc)
#define list_hvdb_search_sort_type_06 (0xce32a1ca)
#define list_hvdb_search_sort_type_07 (0xe3b428a8)
#define list_hvdb_search_sort_type_08 (0x2e867622)
#define list_hvdb_search_filter (0xfff9f55b)
#define list_hvdb_search_filter_00 (0xff601f56)
#define list_hvdb_search_filter_01 (0x14923727)
#define list_hvdb_search_filter_02 (0xa208d4a8)
#define list_hvdb_search_filter_03 (0x74b344f7)
#define list_hvdb_search_filter_04 (0x4ada3bb1)
#define list_hvdb_search_filter_05 (0x75f5ea81)
#define hvdb_player_setting (0x7085ec8e)
#define toggle_hvdb_banner (0x2f9d4916)
#define local_setting (0x988ec70c)
#define local_playlist_prefix (0xa088d09c)
#define list_local_sort_name (0xf7bca884)
#define list_local_sort_name_00 (0x8b449a7a)
#define list_local_sort_name_01 (0xa0340593)
#define list_local_sort_type (0x6e2b969f)
#define list_local_sort_type_00 (0x8cca7adf)
#define list_local_sort_type_01 (0x996d8e98)
#define youtube_search_setting (0x47942f14)
#define list_youtube_search_region (0x274ee177)
#define list_youtube_search_region_00 (0xd5304921)
#define list_youtube_search_sort (0xcf6d2a1c)
#define list_youtube_search_sort_00 (0x43d23f6c)
#define list_youtube_search_sort_01 (0xa6ae18f3)
#define list_youtube_search_sort_02 (0x331188e8)
#define list_youtube_search_sort_03 (0x0842641b)
#define list_youtube_search_date (0xcdcb47c1)
#define list_youtube_search_date_00 (0xe8d5f4d5)
#define list_youtube_search_date_01 (0x98d22213)
#define list_youtube_search_date_02 (0x98f72046)
#define list_youtube_search_date_03 (0x154a251e)
#define list_youtube_search_date_04 (0xf19b986e)
#define list_youtube_search_date_05 (0x8f0eac16)
#define list_youtube_search_dur (0x46241320)
#define list_youtube_search_dur_00 (0x7eb02561)
#define list_youtube_search_dur_01 (0x71920c7a)
#define list_youtube_search_dur_02 (0xdc2a6509)
#define list_youtube_search_dur_03 (0xf394dc0f)
#define list_youtube_search_feature (0x1f3fe3e7)
#define list_youtube_search_feature_00 (0xef4ef491)
#define list_youtube_search_feature_01 (0x4a955857)
#define text_field_youtube_search_proxy (0x76a42f88)
#define youtube_comment_setting (0x83fbebce)
#define list_youtube_comment_sort (0xec9209f7)
#define llist_youtube_comment_sort_00 (0x4993c0b5)
#define llist_youtube_comment_sort_01 (0x197955f2)
#define youtube_quality_setting (0x962064f3)
#define list_youtube_quality_vod_video (0x7a1e6972)
#define list_youtube_quality_vod_video_00 (0xa56d44d5)
#define list_youtube_quality_vod_video_01 (0x0c8bb609)
#define list_youtube_quality_vod_video_02 (0xdc83cbc1)
#define list_youtube_quality_vod_video_03 (0x51f96b07)
#define list_youtube_quality_vod_video_04 (0x9c60d0ee)
#define list_youtube_quality_vod_video_05 (0xfc7571be)
#define list_youtube_quality_live (0x5e89b800)
#define list_youtube_quality_live_00 (0x6eeed69e)
#define list_youtube_quality_live_01 (0xf914faac)
#define list_youtube_quality_live_02 (0x49637007)
#define list_youtube_quality_live_03 (0xf4b1f21a)
#define list_youtube_quality_live_04 (0x5c407879)
#define youtube_player_setting (0xb7539596)
#define toggle_youtube_min (0x32513d0c)
#define cloud_sync_setting (0xfb02b78a)
#define toggle_cloud_sync (0x2c7de826)
#define toggle_cloud_sync_auto (0x59fcfe5e)
#define verinfo_setting (0x45eb30eb)
#define label_verinfo (0x804ff666)
#endif
================================================
FILE: NetStream/include/np_utils.h
================================================
#ifndef _NP_UTILS_H_
#define _NP_UTILS_H_
#include
#include
#include
using namespace paf;
namespace nputils
{
class TUS
{
public:
TUS();
~TUS();
int32_t Init();
int32_t Term();
int32_t UploadFile(uint32_t slot, const char *path);
int32_t DownloadFile(uint32_t slot, const char *path);
int32_t UploadString(uint32_t slot, const string& data);
int32_t DownloadString(uint32_t slot, string& data);
int32_t GetDataStatus(uint32_t slot, SceNpTusDataStatus *status);
int32_t DeleteData(uint32_t slot);
int32_t DeleteData(const vector *slots);
private:
SceNpId m_npid;
int32_t m_ctx;
};
int32_t PreInit(thread::SyncCall::Function onComplete);
int32_t Init(const char *tag = NULL, bool needTUS = false, const vector *usedTUSSlots = NULL);
int32_t Term();
bool IsAllGreen();
TUS *GetTUS();
int32_t NetDialogInit(void *data);
void NetDialogCheck(void *data);
};
#endif
================================================
FILE: NetStream/include/option_menu.h
================================================
#ifndef _OPTION_MENU_H_
#define _OPTION_MENU_H_
#include
#include
using namespace paf;
#define OPTION_MENU_BUTTON_MAGIC 0xa5448baf
class OptionMenu
{
public:
enum
{
OptionMenuEvent = (ui::Handler::CB_STATE + 0x50000),
};
enum OptionMenuEvent
{
OptionMenuEvent_Button,
OptionMenuEvent_Close
};
class Button
{
public:
wstring label;
};
OptionMenu(Plugin *workPlugin, ui::Widget *root, vector