+
+
+
+
+
+
+
+
+
diff --git a/gaming/htmls/DEBUG/NCL/ec/ec_example.js b/gaming/htmls/DEBUG/NCL/ec/ec_example.js
new file mode 100644
index 0000000..377af2a
--- /dev/null
+++ b/gaming/htmls/DEBUG/NCL/ec/ec_example.js
@@ -0,0 +1,221 @@
+//-------------------------------------------------------------------
+//
+// Progress Bar
+//
+// This is a javascript that simulates a progress bar on the page.
+// The progress is based on the return value of an external functional call
+//
+// Usage: showProgressBar(ec,tbpFunction,doneFunction,divObj,
+// timeInterval,message1, message2,
+// color,height,width,style)
+// ecVarName - ECommerceInterface object variable name string
+// tbpFunction - returns progess text and bar %. see updateProgress()
+// (tbp stands for text and bar per cent)
+// doneFunction - javascript function to call upon completion
+// divObj - id of the div object that act as a container of this progress bar
+// timeInterval - time interval (milliseconds) to obtain the status and update the progress bar
+// message1 - a msg string to display before the progress %
+// message2 - a msg string to display after the progress %
+// color - color for the bar/outer boundary of the box
+// height - height of the box/bar
+// width - total width of the box/bar
+// style - style for the message string displayed above the progress bar
+//
+// Requirements: Following code must be included in the page
+//
+// var ec = new ECommerceObj; // global variable
+//
+//
+//
+// Where the name used for ec and divObj are passed as args to showProgressBar.
+//
+//-------------------------------------------------------------------
+
+function showProgressBar(ecVarName,tbpFunction,doneFunction,divObj,
+ timeInterval,message1,message2,
+ color,height,width,style)
+{
+ var pbColor = (color!=null && color!='') ? color : "#006666";
+ var pbHeight = (height!=null && height!='') ? height : "20";
+ var pbWidth = (width!=null && width!='') ? width : "400";
+ var msgString1 = (message1!=null && message1!='') ? message1 : "";
+ var msgString2 = (message2!=null && message2!='') ? message2 : "";
+ var msgStyle = (style!=null && style!='') ? style : "font:bold; color:#FA8072;";
+
+ document.getElementById(divObj).innerHTML = ''
+ + '
'
+ + '
'
+ + '
'
+ + ' '
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + ' '
+ + '
'
+ + '
'
+ + ' '
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
'
+ + '
center
'
+ + '
'
+ + '
'
+ + '
'
+ + '
';
+
+ updateProgress(ecVarName,tbpFunction,doneFunction,timeInterval,msgString1,msgString2,pbWidth);
+}
+
+//-------------------------------------------------------------------
+//
+// The progress bar will keep obtaining the status after every timeInterval milliseconds
+//
+//-------------------------------------------------------------------
+
+function updateProgress(ecVarName,tbpFunction,doneFunction,timeInterval,
+ msgString1,msgString2,barSize)
+{
+ var result;
+ var m;
+ var barPerCent = new Object;
+ eval("var progress = " +ecVarName+".getProgress();");
+
+ if (progress.status != EC_ERROR_NOT_DONE) {
+ document.getElementById('msg').innerText = "";
+ document.getElementById('box').style.visibility = 'hidden';
+ eval(doneFunction+"(progress)");
+ return;
+ }
+
+ eval("result = " +tbpFunction+"(barPerCent, progress);");
+
+ m = document.getElementById('msg');
+
+ if (msgString1 != null)
+ m.innerHTML = msgString1;
+ if (result != null)
+ m.innerHTML += " " + result;
+ if (msgString2 != null)
+ m.innerHTML += msgString2;
+
+ document.getElementById('bar').style.width = barPerCent.value + '%';
+
+ setTimeout("updateProgress(\""+ecVarName+"\",\""+
+ tbpFunction+"\",\""+doneFunction+"\",\""+timeInterval+"\",\""+
+ msgString1+"\",\""+msgString2+"\",\""+barSize+"\");", timeInterval);
+
+}
+
+//-------------------------------------------------------------------
+// Trim functions
+// Returns string with whitespace trimmed
+//-------------------------------------------------------------------
+
+function LTrim(str)
+{
+ if (str==null)
+ {
+ return str;
+ }
+
+ for (var i=0; str.charAt(i)==" " || str.charAt(i)=="\n" || str.charAt(i)=="\t"; i++);
+
+ return str.substring(i,str.length);
+}
+
+function RTrim(str)
+{
+ if (str==null)
+ {
+ return str;
+ }
+
+ for (var i=str.length-1; str.charAt(i)==" " || str.charAt(i)=="\n" || str.charAt(i)=="\t"; i--);
+
+ return str.substring(0,i+1);
+}
+
+function Trim(str)
+{
+ return LTrim(RTrim(str));
+}
+
+
+
+
+function errString (errCode)
+{
+ var a = new Array();
+
+ a[0] = "OK";
+ a[-(EC_ERROR_FAIL)] = "Generic error";
+ a[-(EC_ERROR_NOT_SUPPORTED)] = "Feature not implemented";
+ a[-(EC_ERROR_INSUFICIENT_RESOURCE)] = "Insufficient resource";
+ a[-(EC_ERROR_INVALID)] = "Invalid argument";
+ a[-(EC_ERROR_NOMEM)] = "Insufficient memory";
+ a[-(EC_ERROR_NOT_FOUND)] = "Not found";
+ a[-(EC_ERROR_NOT_BUSY)] = "No active async operation";
+ a[-(EC_ERROR_BUSY)] = "Busy";
+ a[-(EC_ERROR_NOT_DONE)] = "Not done";
+
+ a[-(EC_ERROR_NET_NA)] = "Internet access not available";
+ a[-(EC_ERROR_WS_REPORT)] = "Server reports a problem";
+ a[-(EC_ERROR_ECARD)] = "Invalid eCard";
+
+ a[-(EC_ERROR_NET_CONTENT)] = "Error downloading content";
+ a[-(EC_ERROR_CONTENT_SIZE)] = "Downloaded content size is not expected value";
+
+ a[-(EC_ERROR_WS_RESP)] = "invalid web service response";
+ a[-(EC_ERROR_TICKET)] = "problem importing ticket";
+ a[-(EC_ERROR_TITLE)] = "problem importing title";
+ a[-(EC_ERROR_TITLE_CONTENT)] = "problem importing title content";
+ a[-(EC_ERROR_CANCELED)] = "The operation was canceled.";
+ a[-(EC_ERROR_ALREADY)] = "one time only action was previously done";
+
+ a[-(EC_ERROR_INIT)] = "library has not been initialized";
+ a[-(EC_ERROR_REGISTER)] = "virtual console is not registered";
+
+ a[-(EC_ERROR_WS_RECV)] = "recv error on web service response";
+ a[-(EC_ERROR_NOT_ACTIVE)] = "expected operation is not active op";
+
+ a[-(EC_ERROR_FILE_READ)] = "Error reading a file";
+ a[-(EC_ERROR_FILE_WRITE)] = "Error writing a file";
+
+ a[-(EC_ERROR_NOT_OWNED)] = "Title is not owned";
+ a[-(EC_ERROR_BAD_HEAP)] = "An invalid heap was passed to eclib";
+ a[-(EC_ERROR_HTTP_HDR_PARSE)] = "Could not parse http header";
+ a[-(EC_ERROR_CONFIG)] = "Invlaid configuration (e.g. url is invalid)";
+
+ var msg = a[-errCode];
+
+ if (msg == null) {
+ msg = "Unrecognized Error Code: " + errCode;
+ }
+
+ return msg;
+}
+
+/* returns 0 if not in HTTPStatus ECError range */
+function errCodeToHTTPStatus (errCode)
+{
+ if (errCode > EC_HTTP_STATUS_RANGE_START || errCode < EC_HTTP_STATUS_RANGE_END) {
+ return 0;
+ } else {
+ return (-(errCode - EC_ERROR_RANGE_START)) + 100;
+ }
+}
+
diff --git a/gaming/htmls/DEBUG/NCL/ec/ec_example_index.html b/gaming/htmls/DEBUG/NCL/ec/ec_example_index.html
new file mode 100644
index 0000000..3a6fb68
--- /dev/null
+++ b/gaming/htmls/DEBUG/NCL/ec/ec_example_index.html
@@ -0,0 +1,10 @@
+
+
+Prototype DSi Shop but online. Enjoy! ^^
+
+
+
+
+
\ No newline at end of file
diff --git a/gaming/htmls/DEBUG/NCL/ec/ec_point.html b/gaming/htmls/DEBUG/NCL/ec/ec_point.html
new file mode 100644
index 0000000..3ba30a6
Binary files /dev/null and b/gaming/htmls/DEBUG/NCL/ec/ec_point.html differ
diff --git a/gaming/htmls/DEBUG/NCL/ec/ec_u.html b/gaming/htmls/DEBUG/NCL/ec/ec_u.html
new file mode 100644
index 0000000..5ddfb4c
--- /dev/null
+++ b/gaming/htmls/DEBUG/NCL/ec/ec_u.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+ec_u.html
+
+
diff --git a/gaming/htmls/DEBUG/NCL/ec/progress_bar.gif b/gaming/htmls/DEBUG/NCL/ec/progress_bar.gif
new file mode 100644
index 0000000..2fa5e74
Binary files /dev/null and b/gaming/htmls/DEBUG/NCL/ec/progress_bar.gif differ
diff --git a/gaming/htmls/DEBUG/NCL/ec/progress_bar_border.gif b/gaming/htmls/DEBUG/NCL/ec/progress_bar_border.gif
new file mode 100644
index 0000000..ac954c6
Binary files /dev/null and b/gaming/htmls/DEBUG/NCL/ec/progress_bar_border.gif differ
diff --git a/gaming/htmls/DEBUG/NCL/ec/syncEc.js b/gaming/htmls/DEBUG/NCL/ec/syncEc.js
new file mode 100644
index 0000000..7ac2707
--- /dev/null
+++ b/gaming/htmls/DEBUG/NCL/ec/syncEc.js
@@ -0,0 +1,59 @@
+/*
+ syncEc.js
+ 非同期処理の EC 関数を同期処理にしたりするラッパー
+*/
+
+/*
+ 指定ミリ秒間ブロッキングして待つ関数
+ よい子はあまり真似しないように
+*/
+function wait_( time )
+{
+ var start = new Date();
+ var now;
+ do
+ {
+ now = new Date();
+ } while ( now.getTime() - start.getTime() <= time );
+}
+
+/*
+ 非同期処理の EC を無理やり同期処理にする関数
+ ec_func は eval で実行するので文字列として渡してください
+ 基本的に getProgress に対してしか使わないはずですが…
+ 例:
+ var progress = SyncEc( "ec.getProgress()" );
+*/
+function SyncEc( ec_func )
+{
+ var progress;
+ if ( ec_func == null || ec_func == undefined )
+ return ( progress );
+
+ progress = eval( ec_func );
+ while ( progress.status == EC_ERROR_NOT_DONE )
+ {
+ wait_( 100 );
+ progress = eval( ec_func );
+ }
+ return ( progress );
+}
+
+/*
+ 非同期処理の EC を指定したコールバック関数で通知する関数
+ 現在実装中
+*/
+function AsynEc( func, callback, interval )
+{
+ if ( interval < 0 )
+ interval = 1;
+ var progress = eval( ec_func );
+ if ( progress.status == EC_ERROR_NOT_DONE )
+ {
+ setTimeout('AsynEc("' + func + '","' + callback + '","' + interval + '")', interval );
+ }
+ else
+ {
+ eval( callback + "( progress )" );
+ }
+}
\ No newline at end of file
diff --git a/gaming/htmls/DEBUG/NCL/index.html b/gaming/htmls/DEBUG/NCL/index.html
new file mode 100644
index 0000000..0f30181
--- /dev/null
+++ b/gaming/htmls/DEBUG/NCL/index.html
@@ -0,0 +1,10 @@
+
+
+Prototype DSi Shop but online. Enjoy! ^^
+
+
+
+
+
\ No newline at end of file
diff --git a/gaming/htmls/DEBUG/NCL/index_d.html b/gaming/htmls/DEBUG/NCL/index_d.html
new file mode 100644
index 0000000..ee5f398
--- /dev/null
+++ b/gaming/htmls/DEBUG/NCL/index_d.html
@@ -0,0 +1,95 @@
+
+
+
+
+NCL index_d
+
+
+
+
+
+