diff --git a/LICENSE.txt b/LICENSE.txt index edc19c7..6f0d917 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,64 +1,64 @@ -End User License Agreement - -RICOH THETA SDK - -IMPORTANT –READ THIS END USER LICENSE AGREEMENT (“LICENSE AGREEMENT”) BEFORE INSTALLING OR USING ANY PART OF THE ABOVE SOFTWARE INCLUDING SOFTWARE AND ALL ACCOMPANYING DOCUMENTATION AND ANY AND ALL UPDATES AND MODIFICATIONS THERETO (“SOFTWARE”). INSTALLING OR USING ANY PART OF THE SOFTWARE INDICATES AND CONSTITUTES YOUR ACCEPTANCE OF THIS LICENSE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE AGREEMENT, RICOH COMPANY, LTD. (“RICOH”) ARE UNWILLING TO LICENSE THE SOFTWARE TO YOU AND YOU MUST DISCONTINUE THE USE OR INSTALLATION OF THE SOFTWARE IMMEDIATELY. - -1. Definition. -“Application Software” means any application software running in connection with and for use of Ricoh Product, which is developed by you in accordance with this License Agreement. -“Intellectual Property Rights” means any and all rights under patent, copyright, trade secret, and trademark laws and international/multinational treaties, and any and all proprietary and other rights in connection therewith. -“Ricoh Products” means the 360-degree camera RICOH THETA and its successors. Ricoh may separately specify the Ricoh Products on Ricoh’s website, in accompanying documentation or otherwise. -“Marks” means trademark, service mark, company logo and trade name. - -2. License. -Subject to the terms of this License Agreement, Ricoh grants you a limited, royalty-free, non-transferable, revocable and non-exclusive license to (a) use the Software solely for the purpose of designing or developing the Application Software and (b) distribute the Application Software and have any third party to use the Application Software solely for the purpose of using the Ricoh Product. You acknowledge and agree that Ricoh or third parties own all legal right, title and interest in and to the Software, including any Intellectual Property Rights that subsist in the Software. - -3. Restrictions. -3.1 Subject to the terms of this License Agreement, you may copy, modify and create derivative works of the Software solely for the purpose set forth in Section 2. -3.2 Except for as set forth in Section 3.1, you shall not copy, modify, decompile, reverse engineer, disassemble, attempt to derive source code or create derivative works of the Software or any part of the Software -3.3 Except for as set forth in Section 3.1, you shall not share, distribute, lend, rent, lease, loan, sublicense, sell, assign, transfer or otherwise make available the Software or your rights under this License Agreement to any third party. -3.4 Except for as set forth in Section 3.1, you shall not extract any portion of the Software for incorporation into other programs or for any other purpose. - -4. Application Software -Ricoh makes no warranty of any kind, either express or implied, including without limitation, any warranty that the Ricoh Product works properly in connection with the Application Software. You shall, at your sole cost and expense, evaluate whether the Application Software works properly and correct any bugs and errors of the Application Software. - -5. Support from Ricoh -Ricoh may, at its sole discretion, provide any technical information on the Software on its website. Notwithstanding the foregoing, Ricoh has no obligation to provide any support or advice to any third party or person, including without limitation, any support and advice for the development of the Application Software and the application and registration of the Application Software to application distribution website. - -6. Maintenance of the Application Software -6.1 You shall, at your sole cost and expense, maintain and update the Application Software to work properly. -6.2 You shall not make any misrepresentation which states, whether expresses or implied, that Ricoh is the developer, right holder or provider of the Application Software and its related services. Also you shall not use the Software for the purposes to violate, tamper with, or circumvent the security of any computer network, software, passwords, encryption codes, technological protection measures, or to otherwise engage in any kind of illegal activity, or to enable others to do so. -6.3 Subject to Section 5, you may, at your sole cost and expense, provide any third party with any support and maintenance service in relation to the Application Software. -6.4 You agree that if you use the Software to develop the Application Software for general public users, you will protect the privacy and legal rights of those users to comply with any applicable laws and regulations. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. -6.5 Ricoh may at any time, immediately terminate this License Agreement and you shall immediately cease using the Software and distributing the Application Software if Ricoh believes, in its sole discretion: (A) the Application Software is invisible to end users; (B) the end users of the Application Software do not easily delete or uninstall it; (C) the Application Software does not run to get the Product work properly; (D) the Application Software contains any contents which is not complied with Ricoh’s latest policy or Ricoh’s designated conditions; (E) the Application Software or any pictures or contents obtained through the Application Software infringe or is likely to infringe any third party’s Intellectual Property Rights or any third party’s rights of publicity or privacy or any other rights; and (F) the Application Software enables any party or person to use the Products in the way offensive to public order and moral. - -7. Changes to the Software or this License Agreement. -From time to time, Ricoh may update or otherwise modify the Software, for example, but not limited to, for purposes of error correction, improvement of features, and enhancement of security features. Such updates or modifications may change or delete the nature of features or other aspects of the Software, including features you may rely upon. You hereby agree that such activities may occur at Ricoh’s sole discretion without liability to you. In the event of such updates or modifications, you shall use the latest version of the Software and modify the Application Software in accordance with such latest version of the Software at your sole cost and expense. - -8. Promotion -8.1 Ricoh and Ricoh affiliates and their dealers may (a) introduce or promote the Application Software in connection with Ricoh Products on website, in promotion materials or at exhibitions; and (b) use your Mark on the promotion materials and package of the Ricoh Products and distribute such promotion materials. -8.2 You grant Ricoh and Ricoh affiliates and their dealers a non-exclusive, non-transferrable, royalty-free license to use, distribute your Mark in connection with the promotion and distribution of the Ricoh Products. -8.3 Nothing in this License Agreement gives you a right to use any of Ricoh’s Marks, domain names, or other distinctive brand features. - -9. Intellectual Property -9.1 You acknowledge and agree that Ricoh or its licensors obtain all right, title and interest in and to the Software. Ricoh agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in and to any Application Software, including any intellectual Property Rights thereof. -9.2 You acknowledge that the Software may include third party software subject to other terms and conditions governing the use of such software other than this License Agreement, including without limitation, open source software (“Open Source Software”). Terms and conditions applicable to the Open Source Software are provided to you together with this License Agreement, embedded in the Software or on Ricoh’s website. - -10. DISCLAIMER OF WARRANTIES. -RICOH AND ITS LICENSORS DO NOT PROMISE THAT THE SOFTWARE (INCLUDING ITS FUNCTIONALITY OR FEATURES), OR INFORMATION THAT YOU RECEIVE FROM RICOH WILL BE ACCURATE, ERROR-FREE OR UNINTERRUPTED, OR THAT ANY DEFECTS WILL BE CORRECTED. YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SOFTWARE IS AT YOUR SOLE RISK AND THAT THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM RICOH. RICOH CANNOT ENSURE THAT ANY FILES, INFORMATION OR OTHER DATA YOU ACCESS OR DOWNLOAD FROM THE SOFTWARE WILL BE FREE OF VIRUSES OR CONTAMINATION OR DESTRUCTIVE FEATURES, AND RICOH AND ITS LICENSORS DISCLAIM ANY LIABILITY RELATED THERETO. YOUR USE OF THE SOFTWARE AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SOFTWARE IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. RICOH AND ITS LICENSORS FURTHER EXPRESSLY DISCLAIM ALL WARRANTIES, DUTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES, DUTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, ACCURACY AND NON-INFRINGEMENT. YOUR SOLE REMEDY AGAINST RICOH AND ITS LICENSORS FOR DISSATISFACTION WITH THE SOFTWARE IS TO STOP USING IT. THIS LIMITATION OF RELIEF IS A PART OF THE BARGAIN BETWEEN YOU AND RICOH. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY RICOH, ITS SUBSIDIARIES AND AFFILIATES, ITS LICENSORS, OR A RICOH AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY, DUTY OR CONDITION, OR IN ANY WAY CHANGE THIS EXCLUSION OF WARRANTY, DUTY AND CONDITION. You understand that Ricoh is under no obligation to provide updates, enhancements, or corrections, or to notify you of any product or service changes that Ricoh may make, or to publicly announce or introduce the product(s) or service at any time in the future. - -11. LIMITATION OF LIABILITY. -YOU EXPRESSLY UNDERSTAND AND AGREE THAT RICOH, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU ARISING FROM OR RELATED TO THIS LICENSE AGREEMENT OR THE SOFTWARE UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF PROFITS, DATA, BUSINESS OR GOODWILL WHETHER OR NOT RICOH OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH DAMAGES AND LOSSES. Some jurisdictions may not allow exclusions or limitations of incidental or consequential damages, exclusions or limitations of implied warranties or conditions, or allow limitations on how long an implied warranty lasts, so the above limitations or exclusions may not apply to you in the event but only to the extent of any such disallowance. - -12. Indemnification. -To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Ricoh, its subsidiaries, affiliates and their respective directors, officers, employees and agents (“Indemnified Party(s)”) from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ and experts’ fees and settlement costs) arising out of or accruing from (a) your use or misuse of the Software, (b) any application you design or develop using the Software or any pictures or contents obtained through such application that actually or allegedly infringes or misappropriates any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy or any other rights, and (c) any non-compliance by you with this License Agreement or any law, rule or regulation. You and your counsel will cooperate as fully as reasonably required by the Indemnified Party(s) in defense or settlement of any claim. Ricoh and/or Indemnified Party(s) reserve the right, at its own expense, to assume the exclusive defense or settlement, and control of any matter otherwise subject to indemnification by you. You shall not in any event consent to any judgment, settlement, attachment, or lien, or any other act adverse to the interest of any Indemnified Party without the prior written consent of Ricoh and/or Indemnified Party(s). - -13. Termination -In case of any breach of this License Agreement, Ricoh may immediately terminate this License Agreement. Upon termination of this License Agreement, you shall immediately cease using the Software and distributing the Application Software - -14. Miscellaneous -14.1 Ricoh may modify or revise the terms and conditions of this License Agreement upon prior notice to you by sending email to you, notifying on Ricoh’s website or any other reasonable means. If you do not accept such revised terms and conditions, you shall notify Ricoh thereof and cease using the Software before the effective date of such revised terms and conditions. Upon your use of the Software after the effective date of such revised terms and conditions, you are deemed to accept such revised terms and conditions. -14.2 You agree that if Ricoh does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Ricoh has the benefit of under any applicable law), this will not be taken to be a formal waiver of Ricoh’s rights and that those rights or remedies will still be available to Ricoh. If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable. -14.3 This License Agreement shall be governed by, construed and enforced in accordance with the laws of Japan, without regard to the principles of conflict of law thereof. All disputes, out of or in relation to or in connection with this License Agreement shall be finally settled by arbitration in Tokyo, Japan, in accordance with the Commercial Arbitration Rules of The Japan Commercial Arbitration Association. You agree that any violation of or non-compliance with any term or condition this License Agreement by you will constitute an unlawful and unfair business practice, and will cause irreparable harm to Ricoh, its affiliates or third party licensors for which monetary damages would be inadequate, and you consent to Ricoh obtaining any injunctive or equitable relief that Ricoh deems necessary or appropriate in such circumstances. -14.4 This License Agreement contains the entire legal agreement between Ricoh and you relating to your use of the Software and supersedes all prior written or oral agreements, contracts or promises between Ricoh and you. -14.5 This License Agreement may not be assigned or transferred by you without the prior written approval of Ricoh. +End User License Agreement + +RICOH THETA SDK + +IMPORTANT –READ THIS END USER LICENSE AGREEMENT (“LICENSE AGREEMENT”) BEFORE INSTALLING OR USING ANY PART OF THE ABOVE SOFTWARE INCLUDING SOFTWARE AND ALL ACCOMPANYING DOCUMENTATION AND ANY AND ALL UPDATES AND MODIFICATIONS THERETO (“SOFTWARE”). INSTALLING OR USING ANY PART OF THE SOFTWARE INDICATES AND CONSTITUTES YOUR ACCEPTANCE OF THIS LICENSE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE AGREEMENT, RICOH COMPANY, LTD. (“RICOH”) ARE UNWILLING TO LICENSE THE SOFTWARE TO YOU AND YOU MUST DISCONTINUE THE USE OR INSTALLATION OF THE SOFTWARE IMMEDIATELY. + +1. Definition. +“Application Software” means any application software running in connection with and for use of Ricoh Product, which is developed by you in accordance with this License Agreement. +“Intellectual Property Rights” means any and all rights under patent, copyright, trade secret, and trademark laws and international/multinational treaties, and any and all proprietary and other rights in connection therewith. +“Ricoh Products” means the 360-degree camera RICOH THETA and its successors. Ricoh may separately specify the Ricoh Products on Ricoh’s website, in accompanying documentation or otherwise. +“Marks” means trademark, service mark, company logo and trade name. + +2. License. +Subject to the terms of this License Agreement, Ricoh grants you a limited, royalty-free, non-transferable, revocable and non-exclusive license to (a) use the Software solely for the purpose of designing or developing the Application Software and (b) distribute the Application Software and have any third party to use the Application Software solely for the purpose of using the Ricoh Product. You acknowledge and agree that Ricoh or third parties own all legal right, title and interest in and to the Software, including any Intellectual Property Rights that subsist in the Software. + +3. Restrictions. +3.1 Subject to the terms of this License Agreement, you may copy, modify and create derivative works of the Software solely for the purpose set forth in Section 2. +3.2 Except for as set forth in Section 3.1, you shall not copy, modify, decompile, reverse engineer, disassemble, attempt to derive source code or create derivative works of the Software or any part of the Software +3.3 Except for as set forth in Section 3.1, you shall not share, distribute, lend, rent, lease, loan, sublicense, sell, assign, transfer or otherwise make available the Software or your rights under this License Agreement to any third party. +3.4 Except for as set forth in Section 3.1, you shall not extract any portion of the Software for incorporation into other programs or for any other purpose. + +4. Application Software +Ricoh makes no warranty of any kind, either express or implied, including without limitation, any warranty that the Ricoh Product works properly in connection with the Application Software. You shall, at your sole cost and expense, evaluate whether the Application Software works properly and correct any bugs and errors of the Application Software. + +5. Support from Ricoh +Ricoh may, at its sole discretion, provide any technical information on the Software on its website. Notwithstanding the foregoing, Ricoh has no obligation to provide any support or advice to any third party or person, including without limitation, any support and advice for the development of the Application Software and the application and registration of the Application Software to application distribution website. + +6. Maintenance of the Application Software +6.1 You shall, at your sole cost and expense, maintain and update the Application Software to work properly. +6.2 You shall not make any misrepresentation which states, whether expresses or implied, that Ricoh is the developer, right holder or provider of the Application Software and its related services. Also you shall not use the Software for the purposes to violate, tamper with, or circumvent the security of any computer network, software, passwords, encryption codes, technological protection measures, or to otherwise engage in any kind of illegal activity, or to enable others to do so. +6.3 Subject to Section 5, you may, at your sole cost and expense, provide any third party with any support and maintenance service in relation to the Application Software. +6.4 You agree that if you use the Software to develop the Application Software for general public users, you will protect the privacy and legal rights of those users to comply with any applicable laws and regulations. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. +6.5 Ricoh may at any time, immediately terminate this License Agreement and you shall immediately cease using the Software and distributing the Application Software if Ricoh believes, in its sole discretion: (A) the Application Software is invisible to end users; (B) the end users of the Application Software do not easily delete or uninstall it; (C) the Application Software does not run to get the Product work properly; (D) the Application Software contains any contents which is not complied with Ricoh’s latest policy or Ricoh’s designated conditions; (E) the Application Software or any pictures or contents obtained through the Application Software infringe or is likely to infringe any third party’s Intellectual Property Rights or any third party’s rights of publicity or privacy or any other rights; and (F) the Application Software enables any party or person to use the Products in the way offensive to public order and moral. + +7. Changes to the Software or this License Agreement. +From time to time, Ricoh may update or otherwise modify the Software, for example, but not limited to, for purposes of error correction, improvement of features, and enhancement of security features. Such updates or modifications may change or delete the nature of features or other aspects of the Software, including features you may rely upon. You hereby agree that such activities may occur at Ricoh’s sole discretion without liability to you. In the event of such updates or modifications, you shall use the latest version of the Software and modify the Application Software in accordance with such latest version of the Software at your sole cost and expense. + +8. Promotion +8.1 Ricoh and Ricoh affiliates and their dealers may (a) introduce or promote the Application Software in connection with Ricoh Products on website, in promotion materials or at exhibitions; and (b) use your Mark on the promotion materials and package of the Ricoh Products and distribute such promotion materials. +8.2 You grant Ricoh and Ricoh affiliates and their dealers a non-exclusive, non-transferrable, royalty-free license to use, distribute your Mark in connection with the promotion and distribution of the Ricoh Products. +8.3 Nothing in this License Agreement gives you a right to use any of Ricoh’s Marks, domain names, or other distinctive brand features. + +9. Intellectual Property +9.1 You acknowledge and agree that Ricoh or its licensors obtain all right, title and interest in and to the Software. Ricoh agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in and to any Application Software, including any intellectual Property Rights thereof. +9.2 You acknowledge that the Software may include third party software subject to other terms and conditions governing the use of such software other than this License Agreement, including without limitation, open source software (“Open Source Software”). Terms and conditions applicable to the Open Source Software are provided to you together with this License Agreement, embedded in the Software or on Ricoh’s website. + +10. DISCLAIMER OF WARRANTIES. +RICOH AND ITS LICENSORS DO NOT PROMISE THAT THE SOFTWARE (INCLUDING ITS FUNCTIONALITY OR FEATURES), OR INFORMATION THAT YOU RECEIVE FROM RICOH WILL BE ACCURATE, ERROR-FREE OR UNINTERRUPTED, OR THAT ANY DEFECTS WILL BE CORRECTED. YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SOFTWARE IS AT YOUR SOLE RISK AND THAT THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM RICOH. RICOH CANNOT ENSURE THAT ANY FILES, INFORMATION OR OTHER DATA YOU ACCESS OR DOWNLOAD FROM THE SOFTWARE WILL BE FREE OF VIRUSES OR CONTAMINATION OR DESTRUCTIVE FEATURES, AND RICOH AND ITS LICENSORS DISCLAIM ANY LIABILITY RELATED THERETO. YOUR USE OF THE SOFTWARE AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE SOFTWARE IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. RICOH AND ITS LICENSORS FURTHER EXPRESSLY DISCLAIM ALL WARRANTIES, DUTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES, DUTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, ACCURACY AND NON-INFRINGEMENT. YOUR SOLE REMEDY AGAINST RICOH AND ITS LICENSORS FOR DISSATISFACTION WITH THE SOFTWARE IS TO STOP USING IT. THIS LIMITATION OF RELIEF IS A PART OF THE BARGAIN BETWEEN YOU AND RICOH. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY RICOH, ITS SUBSIDIARIES AND AFFILIATES, ITS LICENSORS, OR A RICOH AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY, DUTY OR CONDITION, OR IN ANY WAY CHANGE THIS EXCLUSION OF WARRANTY, DUTY AND CONDITION. You understand that Ricoh is under no obligation to provide updates, enhancements, or corrections, or to notify you of any product or service changes that Ricoh may make, or to publicly announce or introduce the product(s) or service at any time in the future. + +11. LIMITATION OF LIABILITY. +YOU EXPRESSLY UNDERSTAND AND AGREE THAT RICOH, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU ARISING FROM OR RELATED TO THIS LICENSE AGREEMENT OR THE SOFTWARE UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF PROFITS, DATA, BUSINESS OR GOODWILL WHETHER OR NOT RICOH OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH DAMAGES AND LOSSES. Some jurisdictions may not allow exclusions or limitations of incidental or consequential damages, exclusions or limitations of implied warranties or conditions, or allow limitations on how long an implied warranty lasts, so the above limitations or exclusions may not apply to you in the event but only to the extent of any such disallowance. + +12. Indemnification. +To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Ricoh, its subsidiaries, affiliates and their respective directors, officers, employees and agents (“Indemnified Party(s)”) from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ and experts’ fees and settlement costs) arising out of or accruing from (a) your use or misuse of the Software, (b) any application you design or develop using the Software or any pictures or contents obtained through such application that actually or allegedly infringes or misappropriates any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy or any other rights, and (c) any non-compliance by you with this License Agreement or any law, rule or regulation. You and your counsel will cooperate as fully as reasonably required by the Indemnified Party(s) in defense or settlement of any claim. Ricoh and/or Indemnified Party(s) reserve the right, at its own expense, to assume the exclusive defense or settlement, and control of any matter otherwise subject to indemnification by you. You shall not in any event consent to any judgment, settlement, attachment, or lien, or any other act adverse to the interest of any Indemnified Party without the prior written consent of Ricoh and/or Indemnified Party(s). + +13. Termination +In case of any breach of this License Agreement, Ricoh may immediately terminate this License Agreement. Upon termination of this License Agreement, you shall immediately cease using the Software and distributing the Application Software + +14. Miscellaneous +14.1 Ricoh may modify or revise the terms and conditions of this License Agreement upon prior notice to you by sending email to you, notifying on Ricoh’s website or any other reasonable means. If you do not accept such revised terms and conditions, you shall notify Ricoh thereof and cease using the Software before the effective date of such revised terms and conditions. Upon your use of the Software after the effective date of such revised terms and conditions, you are deemed to accept such revised terms and conditions. +14.2 You agree that if Ricoh does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Ricoh has the benefit of under any applicable law), this will not be taken to be a formal waiver of Ricoh’s rights and that those rights or remedies will still be available to Ricoh. If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable. +14.3 This License Agreement shall be governed by, construed and enforced in accordance with the laws of Japan, without regard to the principles of conflict of law thereof. All disputes, out of or in relation to or in connection with this License Agreement shall be finally settled by arbitration in Tokyo, Japan, in accordance with the Commercial Arbitration Rules of The Japan Commercial Arbitration Association. You agree that any violation of or non-compliance with any term or condition this License Agreement by you will constitute an unlawful and unfair business practice, and will cause irreparable harm to Ricoh, its affiliates or third party licensors for which monetary damages would be inadequate, and you consent to Ricoh obtaining any injunctive or equitable relief that Ricoh deems necessary or appropriate in such circumstances. +14.4 This License Agreement contains the entire legal agreement between Ricoh and you relating to your use of the Software and supersedes all prior written or oral agreements, contracts or promises between Ricoh and you. +14.5 This License Agreement may not be assigned or transferred by you without the prior written approval of Ricoh. diff --git a/LICENSE_ja.txt b/LICENSE_ja.txt index a2a2857..a525c0c 100755 --- a/LICENSE_ja.txt +++ b/LICENSE_ja.txt @@ -1,69 +1,69 @@ -ソフトウェア使用許諾契約書 - -RICOH THETA SDK - -上記ソフトウェア(コンピューターソフトウェア、マニュアルなどの関連書類及び電子文書並びにそれらのアップデート・アップグレード版を含み、以下、本ソフトウェアといいます)をご使用になる前に、以下の使用条件をよくお読み下さい。 -お客様が同意する旨のボタンをクリックまたは本ソフトウェアをご使用になられた時点で、お客様が以下の使用条件に同意して、お客様と株式会社リコー(以下、リコーといいます)との間で契約が成立したものとさせていただきます。万が一、本契約の条件にご同意頂けない場合には、本ソフトウェアのご使用はお控え頂きますようお願い致します。 - -使用条件 - -第1条(定義) -本契約において使用する次の用語は、以下に定める意味を有するものとします。 -1. 「開発ソフトウェア」とは、本契約に基づき、お客様が、本製品を作動させるように設計したアプリケーションプログラムを指します。 -2. 「知的財産権」とは、工業所有権に関する法律、著作権法若しくはその他の法律による保護を受けられる権利を指します。 -3. 「本製品」とは、RICOH THETAを指します(後継機種を含みます)。なお、リコーが、本ソフトウェアの関連文書、自社のウェブサイトその他の方法にて「本製品」の対象を指定できるものとします。 -4. 「お客様のマーク」とは、お客様が権利を保有する、商標、商号、ロゴ及びそれらに類する表示を指します。 - -第2条(使用権) -リコーは、お客様に対して、本契約に定める条件に基づき、お客様が、(1)開発ソフトウェアを開発する目的に限り、本ソフトウェアを使用し、または参照すること、及び、(2)本製品を使用する目的に限定して、第三者(以下「エンドユーザー」といいます)に対して開発ソフトウェアの使用を許諾し、頒布することにつき、非独占的且つ譲渡不可能な権利を許諾します。 - -第3条(権利の制限) -1. お客様は、第2条に定める目的の範囲内において本ソフトウェアを修正、追加等の改変を行うことができるものとします。 -2. お客様は、本ソフトウェアに関しリバースエンジニアリング、逆アセンブル、逆コンパイル等解析作業を行ってはならないものとします。 -3. お客様は、別途本契約において明示的に規定されている場合を除き、本ソフトウェアを再使用許諾、貸与又はリースその他の方法で第三者に使用させてはならないものとします。 -4. お客様は、別途本契約において明示的に規定されている場合を除き、本ソフトウェアの一部又はその構成部分を本ソフトウェアから分離して使用しないものとします。 - -第4条(動作確認) -リコーは、開発ソフトウェアが本製品を正しく作動させることについて一切の保証をしません。お客様は、ご自身の費用で、開発ソフトウェアが本製品を正しく作動させるか否か、確認を行い、開発ソフトウェアが本製品を正しく作動させない場合、お客様の費用で開発ソフトウェアを修正するものとします。 - -第5条(リコーからのサポート) -1. リコーは、自己の裁量において、リコーのウェブサイト上で本ソフトウェアに関する技術情報を掲載する場合があります。但し、いかなる場合においても、リコーは、お客様に対して本ソフトウェアに関するサポートやアドバイス等の一切を提供する義務を負わないものとします。 -2. リコーは、第三者の提供しているアプリ配布システムに開発ソフトウェアを登録する場合など、お客様の開発ソフトウェアをお客様が頒布する際に、サポートやアドバイス等の一切の協力を行う義務を負わないものとします。 - -第6条(開発ソフトウェアのメンテナンス及びサポート) -1. お客様は、本製品上で開発ソフトウェアが正しく作動するよう、開発ソフトウェアのメンテナンスを行い、且つ、アップデートを行うものとします。 -2. お客様は、エンドユーザーに対して、開発ソフトウェアの開発者又は権利者がリコー又はリコーの関連会社であるかのような誤解を生じさせるような行為を一切行わないものとします。 -3. お客様は、ご自身の費用で、開発ソフトウェアのエンドユーザーに対してサポートを提供するものとします。お客様とエンドユーザーとの間で開発ソフトウェアに関連した紛争を生じたときは、お客様自身が自らの費用で解決するものとし、リコー及びリコーの関連会社に一切の迷惑をかけないものとします。 -4. お客様がエンドユーザーから個人情報を収集する場合は、個人情報に関して適用される法令、条例及び規則を遵守するものとします。お客様による個人情報の収集やその取り扱いについて紛争を生じたときは、お客様自身が自らの費用で解決するものとし、リコー及びリコーの関連会社に一切の迷惑をかけないものとします。 -5. リコーが、自己の裁量で、(1)開発ソフトウェアが、エンドユーザーにより容易かつ可視的に特定できないものであると判断した場合、(2)開発ソフトウェアが、エンドユーザーにより、システム等からアンインストール及び削除することが容易にできないものである可能性があると判断した場合、(3)開発ソフトウェアが本製品を正しく作動させないものであると判断した場合、(4)開発ソフトウェアが、その時点でリコーから提供されている最新のポリシーその他の条件に合致しないコンテンツを含んでいる又は提供していると判断した場合、(5)開発ソフトウェアまたは開発ソフトウェアにより取得する画像またはコンテンツが第三者の知的財産権又は肖像権、プライバシー権、パブリシティ権その他一切の権利を侵害している、又は侵害する虞があると判断した場合、(6)開発ソフトウェアにより、本製品を公序良俗に反する方法にて利用することができるようになる場合、又は、(7)その他、開発ソフトウェアがエンドユーザーに対して悪影響を与えると合理的に判断した場合、リコーは、お客様に対して、開発ソフトウェアの頒布を中止するよう要求し、お客様は、直ちにその要求に従うものとします。 - -第7条(修正・アップデート) -本ソフトウェアのアップグレード版、アップデート版又はバクを修正する等何等かの修正が為されたバージョンが、リコーが適切と判断した方法で、公開される場合があります。かかる本ソフトウェアが公開された場合、お客様は、修正後の本ソフトウェアを使用し、お客様の費用で開発ソフトウェアを修正するものとします。 - -第8条(販促活動) -1. リコー、リコーの関連会社及び各々の代理店は、(1)それぞれのウェブサイト、販促資料や展示等を通じて、本製品に関連して開発ソフトウェアを紹介又は宣伝したり、(2)本製品の販促資料及び梱包にお客様のマークを掲載して、使用、展示又は頒布することができるものとします(以下、これらの活動を「販促活動」といいます)。 -2. お客様は、リコー及びリコーの関連会社に対して、本製品の広告、宣伝、梱包に関連して、お客様のマークを使用し、表示し、頒布する、非独占的且つ譲渡不可能な権利を無償で許諾します。当該権利には、リコー又はリコーの関連会社が、自己の代理店に対して、お客様のマークを使用させる権利を含むものとします。 -3. お客様は、リコー又はリコーの関連会社が権利を保有する商標、商号、ロゴ及びそれらに類する表示を使用してはならないものとします。 - -第9条(知的財産権) -1. リコー及びお客様は、(1)本ソフトウェアに関する権利がリコーまたはリコーのライセンサーに帰属し、本契約において明示的に規定されている場合を除き、お客様が本ソフトウェアに関して何等の権利も有しないこと、(2)お客様のマーク及び開発ソフトウェアに関する権利はお客様に帰属し、本契約において明示的に規定されている場合を除き、リコーがお客様のマーク及び開発ソフトウェアに関して何等の権利も有しないことを確認します。 -2. 本ソフトウェアには、オープンソフトウェア等の第三者の知的財産権の対象となるもの(以下、第三者権利物)が含まれることがあります。第三者権利物については、本契約の対象とならず、第三者権利物の権利者から使用許諾されます。当該使用条件については、本ソフトウェアの所定ファイルまたはリコーのウェブサイトをご確認ください。 - -第10条(無保証) -リコーは、本ソフトウェアを現状有姿でお客様に対して提供するものとします。リコーは、お客様に対して、本ソフトウェア及び開発ソフトウェアに関し、エラー・バグ等の不具合がないこと、中断なく稼動すること、安全、有効、正確であること、お客様の使用目的に合致していること、第三者の権利を侵害していないこと等を含め、明示・黙示を問わず何らの保証も行わないものとします。本ソフトウェアを使用したこと及び使用できなかったこと、及び開発ソフトウェアを開発したこと及びできなかったことに関して、お客様又は第三者に生じた損害については、全てお客様が負担するものとし、リコーに対して一切の責任及び損害も及ぼさないものとします。 - -第11条(補償) -(1)お客様が本ソフトウェアを利用したこと、(2)お客様が本契約に定める条項に違反したこと、または(3)お客様のマーク、開発ソフトウェア、又は開発ソフトウェアを通じて頒布又は入手可能となる画像又はコンテンツ等が第三者の知的財産権又は肖像権、プライバシー権、パブリシティ権その他一切の権利を侵害することに、直接的又は間接的に起因して、リコー及びリコーの関連会社に対する紛争が生じ、リコー及びリコーの関連会社に損害が生じた場合は、お客様は、リコー及びリコーの関連会社に対して、当該損害の一切を補償し、リコー及びリコーの関連会社に一切迷惑をかけないものとします。 - -第12条(責任制限) -リコー、リコーの関連会社の故意又は重過失による場合を除き、リコー、リコーの関連会社及び原権利者は、お客様に対して、本ソフトウェアに関して、如何なる損害賠償責任も負わないものとします。 - -第13条(契約の解約) -リコーは、お客様が本契約に定める条項に違反した場合、本契約を解約することができるものとします。この場合、お客様は、自らの費用で、開発ソフトウェアの頒布及び本ソフトウェアの使用を直ちに中止し、本ソフトウェア及びその複製物を廃棄するものとします。 - -第14条(その他) -1. リコーはお客様が登録した電子メールアドレスへの電子メールの発信、リコー所定のサイトでの告知又はその他リコーが適切と判断する方法をもってお客様に事前に通知することにより、本契約の条件を改訂することがあります。お客様はかかる改訂に同意しない場合は、本契約の条件改定の発効日前までに、リコーにその旨を連絡するとともに直ちに本ソフトウェアの使用を中止するものとします。本契約の条件改訂の発効日以降のお客様による本ソフトウェアの使用をもって、お客様は改訂されたソフトウェア使用許諾契約に同意したものとします。 -2. 本契約(改訂版を含む)は、本ソフトウェアに関して、リコーとお客様との間での合意事項を定めたものです。リコーが本契約上の権利を行使しない場合又は本契約上の規定に基づき該当する義務の履行を請求しない場合であっても、それらのことをもって、リコーが当該権利や義務の履行の請求を放棄したとは見なされないものとします。本契約の一部が法律上又は裁判所の判断によって無効とされた場合でも、無効であるとされた当該条項以外の規定は引き続き、リコーとお客様との間で有効に存続するものとします。 -3. 国際物品売買契約に関する国際連合条約は、本契約には適用されないものとします。本契約は、日本国法に準拠するものとします。本契約の規定の解釈又はこれらに規定なき事項について、リコーとお客様との間で疑義又は紛争が生じたときは、リコー及びお客様は、東京地方裁判所を第一審の専属的合意管轄裁判所とするものとします。 -4. 本契約は、本契約に基づく権利および義務に関する両当事者間の完全なる合意および了解事項を構成するものとし、本契約に関連する事前の合意、約束、協定、表示、および了解事項はすべて、明示的か黙示的、口頭か書面によるかにかかわらず、本契約が優先するものとします。 -5. リコーから書面による事前の承諾を得た場合を除き、本契約に基づく権利および義務の一部または全部をいかなる第三者に対しても譲渡することはできないものとします。 +ソフトウェア使用許諾契約書 + +RICOH THETA SDK + +上記ソフトウェア(コンピューターソフトウェア、マニュアルなどの関連書類及び電子文書並びにそれらのアップデート・アップグレード版を含み、以下、本ソフトウェアといいます)をご使用になる前に、以下の使用条件をよくお読み下さい。 +お客様が同意する旨のボタンをクリックまたは本ソフトウェアをご使用になられた時点で、お客様が以下の使用条件に同意して、お客様と株式会社リコー(以下、リコーといいます)との間で契約が成立したものとさせていただきます。万が一、本契約の条件にご同意頂けない場合には、本ソフトウェアのご使用はお控え頂きますようお願い致します。 + +使用条件 + +第1条(定義) +本契約において使用する次の用語は、以下に定める意味を有するものとします。 +1. 「開発ソフトウェア」とは、本契約に基づき、お客様が、本製品を作動させるように設計したアプリケーションプログラムを指します。 +2. 「知的財産権」とは、工業所有権に関する法律、著作権法若しくはその他の法律による保護を受けられる権利を指します。 +3. 「本製品」とは、RICOH THETAを指します(後継機種を含みます)。なお、リコーが、本ソフトウェアの関連文書、自社のウェブサイトその他の方法にて「本製品」の対象を指定できるものとします。 +4. 「お客様のマーク」とは、お客様が権利を保有する、商標、商号、ロゴ及びそれらに類する表示を指します。 + +第2条(使用権) +リコーは、お客様に対して、本契約に定める条件に基づき、お客様が、(1)開発ソフトウェアを開発する目的に限り、本ソフトウェアを使用し、または参照すること、及び、(2)本製品を使用する目的に限定して、第三者(以下「エンドユーザー」といいます)に対して開発ソフトウェアの使用を許諾し、頒布することにつき、非独占的且つ譲渡不可能な権利を許諾します。 + +第3条(権利の制限) +1. お客様は、第2条に定める目的の範囲内において本ソフトウェアを修正、追加等の改変を行うことができるものとします。 +2. お客様は、本ソフトウェアに関しリバースエンジニアリング、逆アセンブル、逆コンパイル等解析作業を行ってはならないものとします。 +3. お客様は、別途本契約において明示的に規定されている場合を除き、本ソフトウェアを再使用許諾、貸与又はリースその他の方法で第三者に使用させてはならないものとします。 +4. お客様は、別途本契約において明示的に規定されている場合を除き、本ソフトウェアの一部又はその構成部分を本ソフトウェアから分離して使用しないものとします。 + +第4条(動作確認) +リコーは、開発ソフトウェアが本製品を正しく作動させることについて一切の保証をしません。お客様は、ご自身の費用で、開発ソフトウェアが本製品を正しく作動させるか否か、確認を行い、開発ソフトウェアが本製品を正しく作動させない場合、お客様の費用で開発ソフトウェアを修正するものとします。 + +第5条(リコーからのサポート) +1. リコーは、自己の裁量において、リコーのウェブサイト上で本ソフトウェアに関する技術情報を掲載する場合があります。但し、いかなる場合においても、リコーは、お客様に対して本ソフトウェアに関するサポートやアドバイス等の一切を提供する義務を負わないものとします。 +2. リコーは、第三者の提供しているアプリ配布システムに開発ソフトウェアを登録する場合など、お客様の開発ソフトウェアをお客様が頒布する際に、サポートやアドバイス等の一切の協力を行う義務を負わないものとします。 + +第6条(開発ソフトウェアのメンテナンス及びサポート) +1. お客様は、本製品上で開発ソフトウェアが正しく作動するよう、開発ソフトウェアのメンテナンスを行い、且つ、アップデートを行うものとします。 +2. お客様は、エンドユーザーに対して、開発ソフトウェアの開発者又は権利者がリコー又はリコーの関連会社であるかのような誤解を生じさせるような行為を一切行わないものとします。 +3. お客様は、ご自身の費用で、開発ソフトウェアのエンドユーザーに対してサポートを提供するものとします。お客様とエンドユーザーとの間で開発ソフトウェアに関連した紛争を生じたときは、お客様自身が自らの費用で解決するものとし、リコー及びリコーの関連会社に一切の迷惑をかけないものとします。 +4. お客様がエンドユーザーから個人情報を収集する場合は、個人情報に関して適用される法令、条例及び規則を遵守するものとします。お客様による個人情報の収集やその取り扱いについて紛争を生じたときは、お客様自身が自らの費用で解決するものとし、リコー及びリコーの関連会社に一切の迷惑をかけないものとします。 +5. リコーが、自己の裁量で、(1)開発ソフトウェアが、エンドユーザーにより容易かつ可視的に特定できないものであると判断した場合、(2)開発ソフトウェアが、エンドユーザーにより、システム等からアンインストール及び削除することが容易にできないものである可能性があると判断した場合、(3)開発ソフトウェアが本製品を正しく作動させないものであると判断した場合、(4)開発ソフトウェアが、その時点でリコーから提供されている最新のポリシーその他の条件に合致しないコンテンツを含んでいる又は提供していると判断した場合、(5)開発ソフトウェアまたは開発ソフトウェアにより取得する画像またはコンテンツが第三者の知的財産権又は肖像権、プライバシー権、パブリシティ権その他一切の権利を侵害している、又は侵害する虞があると判断した場合、(6)開発ソフトウェアにより、本製品を公序良俗に反する方法にて利用することができるようになる場合、又は、(7)その他、開発ソフトウェアがエンドユーザーに対して悪影響を与えると合理的に判断した場合、リコーは、お客様に対して、開発ソフトウェアの頒布を中止するよう要求し、お客様は、直ちにその要求に従うものとします。 + +第7条(修正・アップデート) +本ソフトウェアのアップグレード版、アップデート版又はバクを修正する等何等かの修正が為されたバージョンが、リコーが適切と判断した方法で、公開される場合があります。かかる本ソフトウェアが公開された場合、お客様は、修正後の本ソフトウェアを使用し、お客様の費用で開発ソフトウェアを修正するものとします。 + +第8条(販促活動) +1. リコー、リコーの関連会社及び各々の代理店は、(1)それぞれのウェブサイト、販促資料や展示等を通じて、本製品に関連して開発ソフトウェアを紹介又は宣伝したり、(2)本製品の販促資料及び梱包にお客様のマークを掲載して、使用、展示又は頒布することができるものとします(以下、これらの活動を「販促活動」といいます)。 +2. お客様は、リコー及びリコーの関連会社に対して、本製品の広告、宣伝、梱包に関連して、お客様のマークを使用し、表示し、頒布する、非独占的且つ譲渡不可能な権利を無償で許諾します。当該権利には、リコー又はリコーの関連会社が、自己の代理店に対して、お客様のマークを使用させる権利を含むものとします。 +3. お客様は、リコー又はリコーの関連会社が権利を保有する商標、商号、ロゴ及びそれらに類する表示を使用してはならないものとします。 + +第9条(知的財産権) +1. リコー及びお客様は、(1)本ソフトウェアに関する権利がリコーまたはリコーのライセンサーに帰属し、本契約において明示的に規定されている場合を除き、お客様が本ソフトウェアに関して何等の権利も有しないこと、(2)お客様のマーク及び開発ソフトウェアに関する権利はお客様に帰属し、本契約において明示的に規定されている場合を除き、リコーがお客様のマーク及び開発ソフトウェアに関して何等の権利も有しないことを確認します。 +2. 本ソフトウェアには、オープンソフトウェア等の第三者の知的財産権の対象となるもの(以下、第三者権利物)が含まれることがあります。第三者権利物については、本契約の対象とならず、第三者権利物の権利者から使用許諾されます。当該使用条件については、本ソフトウェアの所定ファイルまたはリコーのウェブサイトをご確認ください。 + +第10条(無保証) +リコーは、本ソフトウェアを現状有姿でお客様に対して提供するものとします。リコーは、お客様に対して、本ソフトウェア及び開発ソフトウェアに関し、エラー・バグ等の不具合がないこと、中断なく稼動すること、安全、有効、正確であること、お客様の使用目的に合致していること、第三者の権利を侵害していないこと等を含め、明示・黙示を問わず何らの保証も行わないものとします。本ソフトウェアを使用したこと及び使用できなかったこと、及び開発ソフトウェアを開発したこと及びできなかったことに関して、お客様又は第三者に生じた損害については、全てお客様が負担するものとし、リコーに対して一切の責任及び損害も及ぼさないものとします。 + +第11条(補償) +(1)お客様が本ソフトウェアを利用したこと、(2)お客様が本契約に定める条項に違反したこと、または(3)お客様のマーク、開発ソフトウェア、又は開発ソフトウェアを通じて頒布又は入手可能となる画像又はコンテンツ等が第三者の知的財産権又は肖像権、プライバシー権、パブリシティ権その他一切の権利を侵害することに、直接的又は間接的に起因して、リコー及びリコーの関連会社に対する紛争が生じ、リコー及びリコーの関連会社に損害が生じた場合は、お客様は、リコー及びリコーの関連会社に対して、当該損害の一切を補償し、リコー及びリコーの関連会社に一切迷惑をかけないものとします。 + +第12条(責任制限) +リコー、リコーの関連会社の故意又は重過失による場合を除き、リコー、リコーの関連会社及び原権利者は、お客様に対して、本ソフトウェアに関して、如何なる損害賠償責任も負わないものとします。 + +第13条(契約の解約) +リコーは、お客様が本契約に定める条項に違反した場合、本契約を解約することができるものとします。この場合、お客様は、自らの費用で、開発ソフトウェアの頒布及び本ソフトウェアの使用を直ちに中止し、本ソフトウェア及びその複製物を廃棄するものとします。 + +第14条(その他) +1. リコーはお客様が登録した電子メールアドレスへの電子メールの発信、リコー所定のサイトでの告知又はその他リコーが適切と判断する方法をもってお客様に事前に通知することにより、本契約の条件を改訂することがあります。お客様はかかる改訂に同意しない場合は、本契約の条件改定の発効日前までに、リコーにその旨を連絡するとともに直ちに本ソフトウェアの使用を中止するものとします。本契約の条件改訂の発効日以降のお客様による本ソフトウェアの使用をもって、お客様は改訂されたソフトウェア使用許諾契約に同意したものとします。 +2. 本契約(改訂版を含む)は、本ソフトウェアに関して、リコーとお客様との間での合意事項を定めたものです。リコーが本契約上の権利を行使しない場合又は本契約上の規定に基づき該当する義務の履行を請求しない場合であっても、それらのことをもって、リコーが当該権利や義務の履行の請求を放棄したとは見なされないものとします。本契約の一部が法律上又は裁判所の判断によって無効とされた場合でも、無効であるとされた当該条項以外の規定は引き続き、リコーとお客様との間で有効に存続するものとします。 +3. 国際物品売買契約に関する国際連合条約は、本契約には適用されないものとします。本契約は、日本国法に準拠するものとします。本契約の規定の解釈又はこれらに規定なき事項について、リコーとお客様との間で疑義又は紛争が生じたときは、リコー及びお客様は、東京地方裁判所を第一審の専属的合意管轄裁判所とするものとします。 +4. 本契約は、本契約に基づく権利および義務に関する両当事者間の完全なる合意および了解事項を構成するものとし、本契約に関連する事前の合意、約束、協定、表示、および了解事項はすべて、明示的か黙示的、口頭か書面によるかにかかわらず、本契約が優先するものとします。 +5. リコーから書面による事前の承諾を得た場合を除き、本契約に基づく権利および義務の一部または全部をいかなる第三者に対しても譲渡することはできないものとします。 diff --git a/README.txt b/README.txt index 3e13ee6..19b42e8 100755 --- a/README.txt +++ b/README.txt @@ -1,114 +1,115 @@ -================================================== - README for "RICOH THETA v2 SDK for iOS" - - Version :0.1.0 -================================================== - -This file is an explanation document for RICOH THETA v2 SDK for iOS. -However, this document assumes that you have already registered as an iOS developer and that you are able to develop apps for iOS. - ----------------------------------------- - -* Contents of this Document - - * Terms of Service - * Files included in the archive - * Required environment for development - * How to Use - * Latest information - * Troubleshooting - * Trademarks - * Update History - ----------------------------------------- - -* Terms of Service - - Terms of service are included in the LICENSE.txt (LICENSE_ja.txt) file. - It is assumed that you have agreed to these terms of service when you start using RICOH THETA v2 SDK. - ----------------------------------------- - -* Files included in the archive - - README.txt: This file (English) - README_ja.txt: This file (Japanese) - LICENSE.txt: Terms of service file (English) - LICENSE_ja.txt: Terms of service file (Japanese) - ricoh-theta-sample-for-iosv2 - ┣ ricoh-theta-sample-for-iosv2: Sample application source - ┣ ricoh-theta-sample-for-iosv2.xcodeproj: Sample application project - ┗ doc: Sample application appledoc - ----------------------------------------- - -* Required environment for development - - [About RICOH THETA S] - Dedicated sample applications for the RICOH THETA S that meet the following conditions. - - * Hardware - RICOH THETA S - * Firmware - Version 1.11 or higher - (Method for checking and updating the firmware: https://theta360.com/en/support/manual/s/content/pc/pc_09.html) - - - [About the Development Environment for Sample Application] - Operation of the sample application has been verified under the following conditions. - - * Verified operating environment - iPhone 5s - * Development/Build Environment - Xcode 7.0.1 - SDK9 - ----------------------------------------- - -* How to Use - - [Operating the Sample Application] - 1. Open and execute ricoh-theta-sample-for-iosv2 from Xcode. The sample application is registered in the iOS device. - 2. Connect the RICOH THETA S to the iOS device using Wi-Fi. - (Usage instructions, connecting the camera to a smartphone: https://theta360.com/en/support/manual/s/content/prepare/prepare_06.html) - 3. The sample application can be operated - - [More detailed information] - See the contents of the provided sample program and documents, as well as documents on the Internet for further information. - - https://developers.theta360.com/en/docs/ - ----------------------------------------- - -* Latest information - - The latest information is released on the "RICOH THETA Developers" website. - - https://developers.theta360.com/ - ----------------------------------------- - -* Troubleshooting - - FAQs are available on the forums. - - https://developers.theta360.com/en/forums/viewforum.php?f=6 - ----------------------------------------- - -* Trademarks - - The products and services described in this document are the trademarks or registered trademarks of their respective owners. - - * iPhone and Xcode are trademarks of Apple Inc. - * IOS is a registered trademark of Cisco in the USA and other countries, and is used by Apple Inc. according to the license. - * iPhone is a registered trademark of Aiphone Co., Ltd., and is used by Apple Inc. according to the license. - * Wi-Fi is the trademark of Wi-Fi Alliance. - - All other trademarks belong to their respective owners. - ----------------------------------------- - -* Update History - - 12/22/2015 0.1.0 Initial release +================================================== + README for "RICOH THETA v2 SDK for iOS" + + Version :0.1.1 +================================================== + +This file is an explanation document for RICOH THETA v2 SDK for iOS. +However, this document assumes that you have already registered as an iOS developer and that you are able to develop apps for iOS. + +---------------------------------------- + +* Contents of this Document + + * Terms of Service + * Files included in the archive + * Required environment for development + * How to Use + * Latest information + * Troubleshooting + * Trademarks + * Update History + +---------------------------------------- + +* Terms of Service + + Terms of service are included in the LICENSE.txt (LICENSE_ja.txt) file. + It is assumed that you have agreed to these terms of service when you start using RICOH THETA v2 SDK. + +---------------------------------------- + +* Files included in the archive + + README.txt: This file (English) + README_ja.txt: This file (Japanese) + LICENSE.txt: Terms of service file (English) + LICENSE_ja.txt: Terms of service file (Japanese) + ricoh-theta-sample-for-iosv2 + ┣ ricoh-theta-sample-for-iosv2: Sample application source + ┣ ricoh-theta-sample-for-iosv2.xcodeproj: Sample application project + ┗ doc: Sample application appledoc + +---------------------------------------- + +* Required environment for development + + [About RICOH THETA S] + Dedicated sample applications for the RICOH THETA S that meet the following conditions. + + * Hardware + RICOH THETA S + * Firmware + Version 1.11 or higher + (Method for checking and updating the firmware: https://theta360.com/en/support/manual/s/content/pc/pc_09.html) + + + [About the Development Environment for Sample Application] + Operation of the sample application has been verified under the following conditions. + + * Verified operating environment + iPhone 5s + * Development/Build Environment + Xcode 7.0.1 + SDK9 + +---------------------------------------- + +* How to Use + + [Operating the Sample Application] + 1. Open and execute ricoh-theta-sample-for-iosv2 from Xcode. The sample application is registered in the iOS device. + 2. Connect the RICOH THETA S to the iOS device using Wi-Fi. + (Usage instructions, connecting the camera to a smartphone: https://theta360.com/en/support/manual/s/content/prepare/prepare_06.html) + 3. The sample application can be operated + + [More detailed information] + See the contents of the provided sample program and documents, as well as documents on the Internet for further information. + + https://developers.theta360.com/en/docs/ + +---------------------------------------- + +* Latest information + + The latest information is released on the "RICOH THETA Developers" website. + + https://developers.theta360.com/ + +---------------------------------------- + +* Troubleshooting + + FAQs are available on the forums. + + https://developers.theta360.com/en/forums/viewforum.php?f=6 + +---------------------------------------- + +* Trademarks + + The products and services described in this document are the trademarks or registered trademarks of their respective owners. + + * iPhone and Xcode are trademarks of Apple Inc. + * IOS is a registered trademark of Cisco in the USA and other countries, and is used by Apple Inc. according to the license. + * iPhone is a registered trademark of Aiphone Co., Ltd., and is used by Apple Inc. according to the license. + * Wi-Fi is the trademark of Wi-Fi Alliance. + + All other trademarks belong to their respective owners. + +---------------------------------------- + +* Update History + + 12/22/2015 0.1.0 Initial release + 01/28/2016 0.1.1 Bug fix diff --git a/README_ja.txt b/README_ja.txt index eefa28c..1dbdc39 100755 --- a/README_ja.txt +++ b/README_ja.txt @@ -1,114 +1,115 @@ -================================================== - README for "RICOH THETA v2 SDK for iOS" - - Version :0.1.0 -================================================== - -このファイルはRICOH THETA v2 SDK for iOSに関する説明文書です。 -なお、この文書は既にiOSの開発者登録済でiOSのアプリケーションを開発することができる状態であることを前提としています。 - ----------------------------------------- - -* この文書に含まれる内容 - - * 利用規約 - * アーカイブに含まれているファイルに関して - * 開発に必要な環境に関して - * 使い方に関して - * 最新の情報に関して - * トラブルシューティング - * 商標について - * 更新履歴 - ----------------------------------------- - -* 利用規約 - - 同梱されている、LICENSE.txt(LICENSE_ja.txt)に記載されています。 - RICOH THETA v2 SDKをご使用になられた時点で、この規約に合意したものとみなします。 - ----------------------------------------- - -* アーカイブに含まれているファイルに関して - - README.txt :このファイルです(英語) - README_ja.txt :このファイルです(日本語) - LICENSE.txt :規約に関するファイルです(英語) - LICENSE_ja.txt :規約に関するファイルです(日本語) - ricoh-theta-sample-for-iosv2 - ┣ ricoh-theta-sample-for-iosv2 :サンプルアプリケーションのソースです - ┣ ricoh-theta-sample-for-iosv2.xcodeproj:サンプルアプリケーションのプロジェクトです - ┗ doc :サンプルアプリケーションに関するドキュメントです - ----------------------------------------- - -* 開発に必要な環境に関して - - [ RICOH THETA Sについて ] - 以下の条件を満たすRICOH THETA S専用のサンプルアプリケーションです。 - - * ハードウェア - RICOH THETA S - * ファームウェア - バージョン 1.11 以上 - (ファームウェアの確認およびアップデート方法はこちらです: https://theta360.com/ja/support/manual/s/content/pc/pc_09.html ) - - - [ サンプルアプリケーションの開発環境について ] - サンプルアプリケーションは以下の条件で動作確認済みです。 - - * 動作確認環境 - iPhone 5s - * 開発・ビルド環境 - Xcode 7.0.1 - SDK9 - ----------------------------------------- - -* 使い方に関して - - [ サンプルアプリケーションを動かす場合 ] - 1. ricoh-theta-sample-for-iosv2をXcodeから開いて実行してください。iOS端末にサンプルアプリケーションが登録されます。 - 2. RICOH THETA SをiOS端末とWi-Fiで接続してください - (使用説明書、カメラとスマートフォンを接続する:https://theta360.com/ja/support/manual/s/content/prepare/prepare_06.html) - 3. サンプルアプリケーションを操作する事ができます - - [ より詳しい情報に関して ] - 同梱されているサンプルアプリケーションのソースやドキュメント、およびWEB上のドキュメントをご確認ください。 - - https://developers.theta360.com/ja/docs/ - ----------------------------------------- - -* 最新の情報に関して - - 最新の情報はWEBサイト「RICOH THETA Developers」にて公開されています。 - - https://developers.theta360.com/ - ----------------------------------------- - -* トラブルシューティング - - よくある質問についてはこちらのフォーラム上にまとめてあります。 - - https://developers.theta360.com/ja/forums/viewforum.php?f=5 - ----------------------------------------- - -* 商標について - - 本文書に記載されている商品・サービス名は、各社の商標または登録商標です。 - - * iPhone、Xcodeは、Apple Inc.の商標です。 - * IOSはCiscoの米国およびその他の国の登録商標であり、Apple Inc.がライセンスに基づき使用しています。 - * iPhoneはアイホン株式会社の登録商標であり、Apple Inc.がライセンスに基づき使用しています。 - * Wi-Fiは、Wi-Fi Allianceの商標です。 - - その他商標は全て、それぞれの所有者に帰属します。 - ----------------------------------------- - -* 更新履歴 - - 2015/12/22 0.1.0 初回リリース +================================================== + README for "RICOH THETA v2 SDK for iOS" + + Version :0.1.1 +================================================== + +このファイルはRICOH THETA v2 SDK for iOSに関する説明文書です。 +なお、この文書は既にiOSの開発者登録済でiOSのアプリケーションを開発することができる状態であることを前提としています。 + +---------------------------------------- + +* この文書に含まれる内容 + + * 利用規約 + * アーカイブに含まれているファイルに関して + * 開発に必要な環境に関して + * 使い方に関して + * 最新の情報に関して + * トラブルシューティング + * 商標について + * 更新履歴 + +---------------------------------------- + +* 利用規約 + + 同梱されている、LICENSE.txt(LICENSE_ja.txt)に記載されています。 + RICOH THETA v2 SDKをご使用になられた時点で、この規約に合意したものとみなします。 + +---------------------------------------- + +* アーカイブに含まれているファイルに関して + + README.txt :このファイルです(英語) + README_ja.txt :このファイルです(日本語) + LICENSE.txt :規約に関するファイルです(英語) + LICENSE_ja.txt :規約に関するファイルです(日本語) + ricoh-theta-sample-for-iosv2 + ┣ ricoh-theta-sample-for-iosv2 :サンプルアプリケーションのソースです + ┣ ricoh-theta-sample-for-iosv2.xcodeproj:サンプルアプリケーションのプロジェクトです + ┗ doc :サンプルアプリケーションに関するドキュメントです + +---------------------------------------- + +* 開発に必要な環境に関して + + [ RICOH THETA Sについて ] + 以下の条件を満たすRICOH THETA S専用のサンプルアプリケーションです。 + + * ハードウェア + RICOH THETA S + * ファームウェア + バージョン 1.11 以上 + (ファームウェアの確認およびアップデート方法はこちらです: https://theta360.com/ja/support/manual/s/content/pc/pc_09.html ) + + + [ サンプルアプリケーションの開発環境について ] + サンプルアプリケーションは以下の条件で動作確認済みです。 + + * 動作確認環境 + iPhone 5s + * 開発・ビルド環境 + Xcode 7.0.1 + SDK9 + +---------------------------------------- + +* 使い方に関して + + [ サンプルアプリケーションを動かす場合 ] + 1. ricoh-theta-sample-for-iosv2をXcodeから開いて実行してください。iOS端末にサンプルアプリケーションが登録されます。 + 2. RICOH THETA SをiOS端末とWi-Fiで接続してください + (使用説明書、カメラとスマートフォンを接続する:https://theta360.com/ja/support/manual/s/content/prepare/prepare_06.html) + 3. サンプルアプリケーションを操作する事ができます + + [ より詳しい情報に関して ] + 同梱されているサンプルアプリケーションのソースやドキュメント、およびWEB上のドキュメントをご確認ください。 + + https://developers.theta360.com/ja/docs/ + +---------------------------------------- + +* 最新の情報に関して + + 最新の情報はWEBサイト「RICOH THETA Developers」にて公開されています。 + + https://developers.theta360.com/ + +---------------------------------------- + +* トラブルシューティング + + よくある質問についてはこちらのフォーラム上にまとめてあります。 + + https://developers.theta360.com/ja/forums/viewforum.php?f=5 + +---------------------------------------- + +* 商標について + + 本文書に記載されている商品・サービス名は、各社の商標または登録商標です。 + + * iPhone、Xcodeは、Apple Inc.の商標です。 + * IOSはCiscoの米国およびその他の国の登録商標であり、Apple Inc.がライセンスに基づき使用しています。 + * iPhoneはアイホン株式会社の登録商標であり、Apple Inc.がライセンスに基づき使用しています。 + * Wi-Fiは、Wi-Fi Allianceの商標です。 + + その他商標は全て、それぞれの所有者に帰属します。 + +---------------------------------------- + +* 更新履歴 + + 2015/12/22 0.1.0 初回リリース + 2016/01/28 0.1.1 バグ修正 diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/GLRenderView.html b/ricoh-theta-sample-for-iosv2/doc/Classes/GLRenderView.html index c8ddde1..a823149 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/GLRenderView.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/GLRenderView.html @@ -1,1282 +1,1282 @@ - - - - - - GLRenderView Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

GLRenderView Class Reference

- - -
- - - - - - - -
Inherits fromGLKView
Declared inGLRenderView.h
GLRenderView.m
- - - - -
- -

Overview

-

View class for photo spherical display

- -

Images acquired from RICOH THETA S are created by equirectangular projection, -with the images from camera #2 (left half) + camera #1 +camera#2 (right half) joined at the ends. -These images can be acquired at a resolution of up to 5376 x 2688.

- -

These images are pasted as texture onto a spherical object on OpenGL using UVSphere -from this class. As this sphere is drawn at an angle from -pi to pi on the xz plane, -the UV coordinates are generated in this orientation and attached to the image, -and are attached so that a mirror image is not generated in the x axis direction -when viewed from the inside of the sphere.

- -

Furthermore, as the camera image is from angle -pi, the center of the image captured by -camera #1 faces forward from the x axis. The camera image is slanted at the angle of elevation -and horizontal angle, the sphere is rotated at each angle, and the image displayed in the x axis -forward direction is adjusted to the horizontal direction of the image from camera#1.

- -

Pinch and pan operations support zooming in, zooming out and rotating. These are supported by -changing the camera slant and FOV angle setting value.

-
- - - - - -
- - - - -

Other Methods

- -
-
- -

– initWithFrame: -

- -
-
- -
- - -
-

Startup method

-
- - - -
- (id)initWithFrame:(CGRect)frame
- - - -
-

Parameters

- - - - - - - -
frame

Size on screen

-
- - - - - - - -
-

Discussion

-

Startup method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– draw -

- -
-
- -
- - -
-

Redraw method

-
- - - -
- (void)draw
- - - - - - - - - -
-

Discussion

-

Redraw method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– setTexture:width:height:yaw:pitch:roll: -

- -
-
- -
- - -
-

Texture registration method

-
- - - -
- (void)setTexture:(NSMutableData *)data width:(int)width height:(int)height yaw:(float)yaw pitch:(float)pitch roll:(float)roll
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
data

Image for registration

width

Image width for registration

height

Image height for registration

yaw

Camera orientation angle

pitch

Camera elevation angle

roll

Camera horizontal angle

-
- - - - - - - -
-

Discussion

-

Texture registration method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
-
- - - -

Other Methods

- -
-
- -

– registerGestures -

- -
-
- -
- - -
-

Gesture registration method

-
- - - -
- (void)registerGestures
- - - - - - - - - -
-

Discussion

-

Gesture registration method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– initOpenGLSettings: -

- -
-
- -
- - -
-

OpenGL Initial value setting method

-
- - - -
- (void)initOpenGLSettings:(EAGLContext *)context
- - - -
-

Parameters

- - - - - - - -
context

OpenGL Context

-
- - - - - - - -
-

Discussion

-

OpenGL Initial value setting method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– touchesBegan:withEvent: -

- -
-
- -
- - -
-

Handler when touch start is detected

-
- - - -
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- - - -
-

Parameters

- - - - - - - - - - - - -
touches

Touch information

event

Event

-
- - - - - - - -
-

Discussion

-

Handler when touch start is detected

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– touchesMoved:withEvent: -

- -
-
- -
- - -
-

Handler when touch is detected

-
- - - -
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
- - - -
-

Parameters

- - - - - - - - - - - - -
touches

Touch information

event

Event

-
- - - - - - - -
-

Discussion

-

Handler when touch is detected

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– touchesEnded:withEvent: -

- -
-
- -
- - -
-

Handler when touch exit is detected

-
- - - -
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
- - - -
-

Parameters

- - - - - - - - - - - - -
touches

Touch information

event

Event

-
- - - - - - - -
-

Discussion

-

Handler when touch exit is detected

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: -

- -
-
- -
- - -
-

Multiple gesture detection compatibility setting method

-
- - - -
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
- - - -
-

Parameters

- - - - - - - - - - - - -
gestureRecognizer

Gesture that sent the message to the delegate

otherGestureRecognizer

Partner gesture recognized at the same time

-
- - - - - - - -
-

Discussion

-

Multiple gesture detection compatibility setting method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– pinchGestureHandler: -

- -
-
- -
- - -
-

Pinch operation compatibility handler

-
- - - -
- (void)pinchGestureHandler:(UIPinchGestureRecognizer *)recognizer
- - - -
-

Parameters

- - - - - - - -
recognizer

Recognizer object for gesture operations

-
- - - - - - - -
-

Discussion

-

Pinch operation compatibility handler

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– panGestureHandler: -

- -
-
- -
- - -
-

Pan operation compatibility handler

-
- - - -
- (void)panGestureHandler:(UIPanGestureRecognizer *)recognizer
- - - -
-

Parameters

- - - - - - - -
recognizer

Recognizer object for gesture operations

-
- - - - - - - -
-

Discussion

-

Pan operation compatibility handler

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– timerInfo: -

- -
-
- -
- - -
-

Timer setting method

-
- - - -
- (void)timerInfo:(NSTimer *)timer
- - - -
-

Parameters

- - - - - - - -
timer

Setting target timer

-
- - - - - - - -
-

Discussion

-

Timer setting method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– scale: -

- -
-
- -
- - -
-

Zoom in/Zoom out method

-
- - - -
- (void)scale:(float)ratio
- - - -
-

Parameters

- - - - - - - -
ratio

Zoom in/zoom out ratio

-
- - - - - - - -
-

Discussion

-

Zoom in/Zoom out method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– rotate:diffy: -

- -
-
- -
- - -
-

Rotation method

-
- - - -
- (void)rotate:(int)diffx diffy:(int)diffy
- - - -
-

Parameters

- - - - - - - - - - - - -
diffx

Rotation amount (y axis)

diffy

Rotation amount (xy plane)

-
- - - - - - - -
-

Discussion

-

Rotation method

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– loadShader:shaderSrc: -

- -
-
- -
- - -
-

Method for creating OpenGL shader

-
- - - -
- (GLuint)loadShader:(GLenum)shaderType shaderSrc:(NSString *)shaderSrc
- - - -
-

Parameters

- - - - - - - - - - - - -
shaderType

Shader type

shaderSrc

Shader source

-
- - - - - - - -
-

Discussion

-

Method for creating OpenGL shader

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– loadProgram:fShaderSrc: -

- -
-
- -
- - -
-

Program creation function for OpenGL

-
- - - -
- (GLuint)loadProgram:(NSString *)vShaderSrc fShaderSrc:(NSString *)fShaderSrc
- - - -
-

Parameters

- - - - - - - - - - - - -
vShaderSrc

Vertex shader source

fShaderSrc

Fragment shader source

-
- - - - - - - -
-

Discussion

-

Program creation function for OpenGL

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– useAndAttachLocation: -

- -
-
- -
- - -
-

Program validation and various shader variable validation methods for OpenGL

-
- - - -
- (void)useAndAttachLocation:(GLuint)program
- - - -
-

Parameters

- - - - - - - -
program

OpenGL Program variable

-
- - - - - - - -
-

Discussion

-

Program validation and various shader variable validation methods for OpenGL

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
- -

– glCheckError: -

- -
-
- -
- - -
-

OpenGL Method for OpenGL error detection

-
- - - -
- (void)glCheckError:(NSString *)msg
- - - -
-

Parameters

- - - - - - - -
msg

Output character string at detection

-
- - - - - - - -
-

Discussion

-

OpenGL Method for OpenGL error detection

-
- - - - - - - -
-

Declared In

-

GLRenderView.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + GLRenderView Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

GLRenderView Class Reference

+ + +
+ + + + + + + +
Inherits fromGLKView
Declared inGLRenderView.h
GLRenderView.m
+ + + + +
+ +

Overview

+

View class for photo spherical display

+ +

Images acquired from RICOH THETA S are created by equirectangular projection, +with the images from camera #2 (left half) + camera #1 +camera#2 (right half) joined at the ends. +These images can be acquired at a resolution of up to 5376 x 2688.

+ +

These images are pasted as texture onto a spherical object on OpenGL using UVSphere +from this class. As this sphere is drawn at an angle from -pi to pi on the xz plane, +the UV coordinates are generated in this orientation and attached to the image, +and are attached so that a mirror image is not generated in the x axis direction +when viewed from the inside of the sphere.

+ +

Furthermore, as the camera image is from angle -pi, the center of the image captured by +camera #1 faces forward from the x axis. The camera image is slanted at the angle of elevation +and horizontal angle, the sphere is rotated at each angle, and the image displayed in the x axis +forward direction is adjusted to the horizontal direction of the image from camera#1.

+ +

Pinch and pan operations support zooming in, zooming out and rotating. These are supported by +changing the camera slant and FOV angle setting value.

+
+ + + + + +
+ + + + +

Other Methods

+ +
+
+ +

– initWithFrame: +

+ +
+
+ +
+ + +
+

Startup method

+
+ + + +
- (id)initWithFrame:(CGRect)frame
+ + + +
+

Parameters

+ + + + + + + +
frame

Size on screen

+
+ + + + + + + +
+

Discussion

+

Startup method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– draw +

+ +
+
+ +
+ + +
+

Redraw method

+
+ + + +
- (void)draw
+ + + + + + + + + +
+

Discussion

+

Redraw method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– setTexture:width:height:yaw:pitch:roll: +

+ +
+
+ +
+ + +
+

Texture registration method

+
+ + + +
- (void)setTexture:(NSMutableData *)data width:(int)width height:(int)height yaw:(float)yaw pitch:(float)pitch roll:(float)roll
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data

Image for registration

width

Image width for registration

height

Image height for registration

yaw

Camera orientation angle

pitch

Camera elevation angle

roll

Camera horizontal angle

+
+ + + + + + + +
+

Discussion

+

Texture registration method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+
+ + + +

Other Methods

+ +
+
+ +

– registerGestures +

+ +
+
+ +
+ + +
+

Gesture registration method

+
+ + + +
- (void)registerGestures
+ + + + + + + + + +
+

Discussion

+

Gesture registration method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– initOpenGLSettings: +

+ +
+
+ +
+ + +
+

OpenGL Initial value setting method

+
+ + + +
- (void)initOpenGLSettings:(EAGLContext *)context
+ + + +
+

Parameters

+ + + + + + + +
context

OpenGL Context

+
+ + + + + + + +
+

Discussion

+

OpenGL Initial value setting method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– touchesBegan:withEvent: +

+ +
+
+ +
+ + +
+

Handler when touch start is detected

+
+ + + +
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
+ + + +
+

Parameters

+ + + + + + + + + + + + +
touches

Touch information

event

Event

+
+ + + + + + + +
+

Discussion

+

Handler when touch start is detected

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– touchesMoved:withEvent: +

+ +
+
+ +
+ + +
+

Handler when touch is detected

+
+ + + +
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
+ + + +
+

Parameters

+ + + + + + + + + + + + +
touches

Touch information

event

Event

+
+ + + + + + + +
+

Discussion

+

Handler when touch is detected

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– touchesEnded:withEvent: +

+ +
+
+ +
+ + +
+

Handler when touch exit is detected

+
+ + + +
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
+ + + +
+

Parameters

+ + + + + + + + + + + + +
touches

Touch information

event

Event

+
+ + + + + + + +
+

Discussion

+

Handler when touch exit is detected

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: +

+ +
+
+ +
+ + +
+

Multiple gesture detection compatibility setting method

+
+ + + +
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
+ + + +
+

Parameters

+ + + + + + + + + + + + +
gestureRecognizer

Gesture that sent the message to the delegate

otherGestureRecognizer

Partner gesture recognized at the same time

+
+ + + + + + + +
+

Discussion

+

Multiple gesture detection compatibility setting method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– pinchGestureHandler: +

+ +
+
+ +
+ + +
+

Pinch operation compatibility handler

+
+ + + +
- (void)pinchGestureHandler:(UIPinchGestureRecognizer *)recognizer
+ + + +
+

Parameters

+ + + + + + + +
recognizer

Recognizer object for gesture operations

+
+ + + + + + + +
+

Discussion

+

Pinch operation compatibility handler

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– panGestureHandler: +

+ +
+
+ +
+ + +
+

Pan operation compatibility handler

+
+ + + +
- (void)panGestureHandler:(UIPanGestureRecognizer *)recognizer
+ + + +
+

Parameters

+ + + + + + + +
recognizer

Recognizer object for gesture operations

+
+ + + + + + + +
+

Discussion

+

Pan operation compatibility handler

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– timerInfo: +

+ +
+
+ +
+ + +
+

Timer setting method

+
+ + + +
- (void)timerInfo:(NSTimer *)timer
+ + + +
+

Parameters

+ + + + + + + +
timer

Setting target timer

+
+ + + + + + + +
+

Discussion

+

Timer setting method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– scale: +

+ +
+
+ +
+ + +
+

Zoom in/Zoom out method

+
+ + + +
- (void)scale:(float)ratio
+ + + +
+

Parameters

+ + + + + + + +
ratio

Zoom in/zoom out ratio

+
+ + + + + + + +
+

Discussion

+

Zoom in/Zoom out method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– rotate:diffy: +

+ +
+
+ +
+ + +
+

Rotation method

+
+ + + +
- (void)rotate:(int)diffx diffy:(int)diffy
+ + + +
+

Parameters

+ + + + + + + + + + + + +
diffx

Rotation amount (y axis)

diffy

Rotation amount (xy plane)

+
+ + + + + + + +
+

Discussion

+

Rotation method

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– loadShader:shaderSrc: +

+ +
+
+ +
+ + +
+

Method for creating OpenGL shader

+
+ + + +
- (GLuint)loadShader:(GLenum)shaderType shaderSrc:(NSString *)shaderSrc
+ + + +
+

Parameters

+ + + + + + + + + + + + +
shaderType

Shader type

shaderSrc

Shader source

+
+ + + + + + + +
+

Discussion

+

Method for creating OpenGL shader

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– loadProgram:fShaderSrc: +

+ +
+
+ +
+ + +
+

Program creation function for OpenGL

+
+ + + +
- (GLuint)loadProgram:(NSString *)vShaderSrc fShaderSrc:(NSString *)fShaderSrc
+ + + +
+

Parameters

+ + + + + + + + + + + + +
vShaderSrc

Vertex shader source

fShaderSrc

Fragment shader source

+
+ + + + + + + +
+

Discussion

+

Program creation function for OpenGL

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– useAndAttachLocation: +

+ +
+
+ +
+ + +
+

Program validation and various shader variable validation methods for OpenGL

+
+ + + +
- (void)useAndAttachLocation:(GLuint)program
+ + + +
+

Parameters

+ + + + + + + +
program

OpenGL Program variable

+
+ + + + + + + +
+

Discussion

+

Program validation and various shader variable validation methods for OpenGL

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+ +

– glCheckError: +

+ +
+
+ +
+ + +
+

OpenGL Method for OpenGL error detection

+
+ + + +
- (void)glCheckError:(NSString *)msg
+ + + +
+

Parameters

+ + + + + + + +
msg

Output character string at detection

+
+ + + + + + + +
+

Discussion

+

OpenGL Method for OpenGL error detection

+
+ + + + + + + +
+

Declared In

+

GLRenderView.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/GlkViewController.html b/ricoh-theta-sample-for-iosv2/doc/Classes/GlkViewController.html index 95273b3..de098f6 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/GlkViewController.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/GlkViewController.html @@ -1,230 +1,230 @@ - - - - - - GlkViewController Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

GlkViewController Class Reference

- - -
- - - - - - - -
Inherits fromGLKViewController
Declared inglkViewController.h
glkViewController.m
- - - - -
- -

Overview

-

Controller class for OpenGL view generation

-
- - - - - -
- - - - - - -
-
- -

– init:image:width:height:yaw:roll:pitch: -

- -
-
- -
- - -
-

gateway method for GLView settings

-
- - - -
- (id)init:(CGRect)rect image:(NSMutableData *)imageData width:(int)width height:(int)height yaw:(float)yaw roll:(float)roll pitch:(float)pitch
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rect

Rectangle of display area

imageData

Image data

width

Image width

height

Image height

yaw

Yaw of zenith correction data

roll

Roll of zenith correction data

pitch

Pitch of zenith correction data

-
- - - - - - - -
-

Discussion

-

gateway method for GLView settings

-
- - - - - - - -
-

Declared In

-

glkViewController.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + GlkViewController Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

GlkViewController Class Reference

+ + +
+ + + + + + + +
Inherits fromGLKViewController
Declared inglkViewController.h
glkViewController.m
+ + + + +
+ +

Overview

+

Controller class for OpenGL view generation

+
+ + + + + +
+ + + + + + +
+
+ +

– init:image:width:height:yaw:roll:pitch: +

+ +
+
+ +
+ + +
+

gateway method for GLView settings

+
+ + + +
- (id)init:(CGRect)rect image:(NSMutableData *)imageData width:(int)width height:(int)height yaw:(float)yaw roll:(float)roll pitch:(float)pitch
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
rect

Rectangle of display area

imageData

Image data

width

Image width

height

Image height

yaw

Yaw of zenith correction data

roll

Roll of zenith correction data

pitch

Pitch of zenith correction data

+
+ + + + + + + +
+

Discussion

+

gateway method for GLView settings

+
+ + + + + + + +
+

Declared In

+

glkViewController.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpConnection.html b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpConnection.html index 35ea49c..9e18c60 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpConnection.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpConnection.html @@ -1,1302 +1,1302 @@ - - - - - - HttpConnection Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

HttpConnection Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inHttpConnection.h
HttpConnection.m
- - - - -
- -

Overview

-

HTTP connection to device

-
- - - - - -
- - - - -

Other Methods

- -
-
- -

– setTargetIp: -

- -
-
- -
- - -
-

Specify address of connection destination

-
- - - -
- (void)setTargetIp:(NSString *const)address
- - - -
-

Parameters

- - - - - - - -
address

Address

-
- - - - - - - -
-

Discussion

-

Specify address of connection destination

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– connected -

- -
-
- -
- - -
-

Status of connection to device

-
- - - -
- (BOOL)connected
- - - - - -
-

Return Value

-

YES:Connect, NO:Disconnect

-
- - - - - -
-

Discussion

-

Status of connection to device

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– connect: -

- -
-
- -
- - -
-

Connect to device

-
- - - -
- (void)connect:(void ( ^ const ) ( BOOL connected ))block
- - - -
-

Parameters

- - - - - - - -
block

Block to be called after connection process

-
- - - - - - - -
-

Discussion

-

Connect to device

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– update -

- -
-
- -
- - -
-

Notify device of continuation of session

-
- - - -
- (void)update
- - - - - - - - - -
-

Discussion

-

Notify device of continuation of session

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– close: -

- -
-
- -
- - -
-

Disconnect from device

-
- - - -
- (void)close:(void ( ^ const ) ( ))block
- - - -
-

Parameters

- - - - - - - -
block

Block called after disconnection process

-
- - - - - - - -
-

Discussion

-

Disconnect from device

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– getDeviceInfo: -

- -
-
- -
- - -
-

Acquire device information

-
- - - -
- (void)getDeviceInfo:(void ( ^ const ) ( const HttpDeviceInfo *const info ))block
- - - -
-

Parameters

- - - - - - - -
block

Block to be called after acquisition process

-
- - - - - - - -
-

Discussion

-

Acquire device information

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– getImageInfoes -

- -
-
- -
- - -
-

Acquire list of media files on device

-
- - - -
- (NSArray *)getImageInfoes
- - - - - -
-

Return Value

-

Media file list

-
- - - - - -
-

Discussion

-

Acquire list of media files on device

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– getThumb: -

- -
-
- -
- - -
-

Acquire thumbnail image

-
- - - -
- (NSData *)getThumb:(NSString *)fileId
- - - -
-

Parameters

- - - - - - - -
fileId

File ID

-
- - - -
-

Return Value

-

Thumbnail

-
- - - - - -
-

Discussion

-

Acquire thumbnail image

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– getStorageInfo -

- -
-
- -
- - -
-

Acquire storage information of device

-
- - - -
- (HttpStorageInfo *)getStorageInfo
- - - - - -
-

Return Value

-

Storage information

-
- - - - - -
-

Discussion

-

Acquire storage information of device

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– getBatteryLevel -

- -
-
- -
- - -
-

Acquire battery information of device

-
- - - -
- (NSNumber *)getBatteryLevel
- - - - - -
-

Return Value

-

Battery level (4 levels: 0.0, 0.33, 0.67 and 1.0)

-
- - - - - -
-

Discussion

-

Acquire battery information of device

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– setImageFormat:height: -

- -
-
- -
- - -
-

Specify shooting size

-
- - - -
- (void)setImageFormat:(NSUInteger)width height:(NSUInteger)height
- - - -
-

Parameters

- - - - - - - - - - - - -
width

Width of shot image

height

Height of shot image

-
- - - - - - - -
-

Discussion

-

Specify shooting size

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– startLiveView: -

- -
-
- -
- - -
-

Start live view

-
- - - -
- (void)startLiveView:(void ( ^ const ) ( NSData *frameData ))block
- - - -
-

Parameters

- - - - - - - -
block

Block called on drawing. Used to perform the drawing process of the image.

-
- - - - - - - -
-

Discussion

-

Start live view

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– restartLiveView -

- -
-
- -
- - -
-

Resume live view

-
- - - -
- (void)restartLiveView
- - - - - - - - - -
-

Discussion

-

Resume live view

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– takePicture -

- -
-
- -
- - -
-

Take photo

-After shooting, the status is checked by the timer and the file information is acquired when the status indicates that the process is complete.

-
- - - -
- (HttpImageInfo *)takePicture
- - - - - -
-

Return Value

-

Information on shot media files

-
- - - - - -
-

Discussion

-

Take photo

-After shooting, the status is checked by the timer and the file information is acquired when the status indicates that the process is complete.

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– deleteImage: -

- -
-
- -
- - -
-

Delete specified file

-
- - - -
- (BOOL)deleteImage:(HttpImageInfo *)info
- - - -
-

Parameters

- - - - - - - -
info

Information of file to be deleted

-
- - - -
-

Return Value

-

Delete process successful?

-
- - - - - -
-

Discussion

-

Delete specified file

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– createExecuteRequest -

- -
-
- -
- - -
-

Create HTTP request class instance for executing command

-
- - - -
- (NSMutableURLRequest *)createExecuteRequest
- - - - - -
-

Return Value

-

HTTP request class instance for executing command

-
- - - - - -
-

Discussion

-

Create HTTP request class instance for executing command

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
-
- - - -

Other Methods

- -
-
- -

– init -

- -
-
- -
- - -
-

Initializer

-
- - - -
- (id)init
- - - - - -
-

Return Value

-

Instance

-
- - - - - -
-

Discussion

-

Initializer

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– waitCommandComplete: -

- -
-
- -
- - -
-

Check status of specified command and acquire information

-
- - - -
- (HttpImageInfo *)waitCommandComplete:(NSString *)commandId
- - - -
-

Parameters

- - - - - - - -
commandId

ID of command to be checked

-
- - - - - - - -
-

Discussion

-

Check status of specified command and acquire information

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– setOptions: -

- -
-
- -
- - -
-

Send option setting request

-
- - - -
- (void)setOptions:(NSDictionary *)options
- - - -
-

Parameters

- - - - - - - -
options

Dictionary in which the option name and settings were configured for the key and value

-
- - - - - - - -
-

Discussion

-

Send option setting request

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
- -

– createRequest:method: -

- -
-
- -
- - -
-

Create HTTP request

-
- - - -
- (NSMutableURLRequest *)createRequest:(NSString *const)protocol method:(NSString *const)method
- - - -
-

Parameters

- - - - - - - - - - - - -
protocol

Path

method

Protocol

-
- - - -
-

Return Value

-

HTTP request instance

-
- - - - - -
-

Discussion

-

Create HTTP request

-
- - - - - - - -
-

Declared In

-

HttpConnection.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + HttpConnection Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

HttpConnection Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inHttpConnection.h
HttpConnection.m
+ + + + +
+ +

Overview

+

HTTP connection to device

+
+ + + + + +
+ + + + +

Other Methods

+ +
+
+ +

– setTargetIp: +

+ +
+
+ +
+ + +
+

Specify address of connection destination

+
+ + + +
- (void)setTargetIp:(NSString *const)address
+ + + +
+

Parameters

+ + + + + + + +
address

Address

+
+ + + + + + + +
+

Discussion

+

Specify address of connection destination

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– connected +

+ +
+
+ +
+ + +
+

Status of connection to device

+
+ + + +
- (BOOL)connected
+ + + + + +
+

Return Value

+

YES:Connect, NO:Disconnect

+
+ + + + + +
+

Discussion

+

Status of connection to device

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– connect: +

+ +
+
+ +
+ + +
+

Connect to device

+
+ + + +
- (void)connect:(void ( ^ const ) ( BOOL connected ))block
+ + + +
+

Parameters

+ + + + + + + +
block

Block to be called after connection process

+
+ + + + + + + +
+

Discussion

+

Connect to device

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– update +

+ +
+
+ +
+ + +
+

Notify device of continuation of session

+
+ + + +
- (void)update
+ + + + + + + + + +
+

Discussion

+

Notify device of continuation of session

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– close: +

+ +
+
+ +
+ + +
+

Disconnect from device

+
+ + + +
- (void)close:(void ( ^ const ) ( ))block
+ + + +
+

Parameters

+ + + + + + + +
block

Block called after disconnection process

+
+ + + + + + + +
+

Discussion

+

Disconnect from device

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– getDeviceInfo: +

+ +
+
+ +
+ + +
+

Acquire device information

+
+ + + +
- (void)getDeviceInfo:(void ( ^ const ) ( const HttpDeviceInfo *const info ))block
+ + + +
+

Parameters

+ + + + + + + +
block

Block to be called after acquisition process

+
+ + + + + + + +
+

Discussion

+

Acquire device information

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– getImageInfoes +

+ +
+
+ +
+ + +
+

Acquire list of media files on device

+
+ + + +
- (NSArray *)getImageInfoes
+ + + + + +
+

Return Value

+

Media file list

+
+ + + + + +
+

Discussion

+

Acquire list of media files on device

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– getThumb: +

+ +
+
+ +
+ + +
+

Acquire thumbnail image

+
+ + + +
- (NSData *)getThumb:(NSString *)fileId
+ + + +
+

Parameters

+ + + + + + + +
fileId

File ID

+
+ + + +
+

Return Value

+

Thumbnail

+
+ + + + + +
+

Discussion

+

Acquire thumbnail image

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– getStorageInfo +

+ +
+
+ +
+ + +
+

Acquire storage information of device

+
+ + + +
- (HttpStorageInfo *)getStorageInfo
+ + + + + +
+

Return Value

+

Storage information

+
+ + + + + +
+

Discussion

+

Acquire storage information of device

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– getBatteryLevel +

+ +
+
+ +
+ + +
+

Acquire battery information of device

+
+ + + +
- (NSNumber *)getBatteryLevel
+ + + + + +
+

Return Value

+

Battery level (4 levels: 0.0, 0.33, 0.67 and 1.0)

+
+ + + + + +
+

Discussion

+

Acquire battery information of device

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– setImageFormat:height: +

+ +
+
+ +
+ + +
+

Specify shooting size

+
+ + + +
- (void)setImageFormat:(NSUInteger)width height:(NSUInteger)height
+ + + +
+

Parameters

+ + + + + + + + + + + + +
width

Width of shot image

height

Height of shot image

+
+ + + + + + + +
+

Discussion

+

Specify shooting size

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– startLiveView: +

+ +
+
+ +
+ + +
+

Start live view

+
+ + + +
- (void)startLiveView:(void ( ^ const ) ( NSData *frameData ))block
+ + + +
+

Parameters

+ + + + + + + +
block

Block called on drawing. Used to perform the drawing process of the image.

+
+ + + + + + + +
+

Discussion

+

Start live view

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– restartLiveView +

+ +
+
+ +
+ + +
+

Resume live view

+
+ + + +
- (void)restartLiveView
+ + + + + + + + + +
+

Discussion

+

Resume live view

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– takePicture +

+ +
+
+ +
+ + +
+

Take photo

+After shooting, the status is checked by the timer and the file information is acquired when the status indicates that the process is complete.

+
+ + + +
- (HttpImageInfo *)takePicture
+ + + + + +
+

Return Value

+

Information on shot media files

+
+ + + + + +
+

Discussion

+

Take photo

+After shooting, the status is checked by the timer and the file information is acquired when the status indicates that the process is complete.

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– deleteImage: +

+ +
+
+ +
+ + +
+

Delete specified file

+
+ + + +
- (BOOL)deleteImage:(HttpImageInfo *)info
+ + + +
+

Parameters

+ + + + + + + +
info

Information of file to be deleted

+
+ + + +
+

Return Value

+

Delete process successful?

+
+ + + + + +
+

Discussion

+

Delete specified file

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– createExecuteRequest +

+ +
+
+ +
+ + +
+

Create HTTP request class instance for executing command

+
+ + + +
- (NSMutableURLRequest *)createExecuteRequest
+ + + + + +
+

Return Value

+

HTTP request class instance for executing command

+
+ + + + + +
+

Discussion

+

Create HTTP request class instance for executing command

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+
+ + + +

Other Methods

+ +
+
+ +

– init +

+ +
+
+ +
+ + +
+

Initializer

+
+ + + +
- (id)init
+ + + + + +
+

Return Value

+

Instance

+
+ + + + + +
+

Discussion

+

Initializer

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– waitCommandComplete: +

+ +
+
+ +
+ + +
+

Check status of specified command and acquire information

+
+ + + +
- (HttpImageInfo *)waitCommandComplete:(NSString *)commandId
+ + + +
+

Parameters

+ + + + + + + +
commandId

ID of command to be checked

+
+ + + + + + + +
+

Discussion

+

Check status of specified command and acquire information

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– setOptions: +

+ +
+
+ +
+ + +
+

Send option setting request

+
+ + + +
- (void)setOptions:(NSDictionary *)options
+ + + +
+

Parameters

+ + + + + + + +
options

Dictionary in which the option name and settings were configured for the key and value

+
+ + + + + + + +
+

Discussion

+

Send option setting request

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+ +

– createRequest:method: +

+ +
+
+ +
+ + +
+

Create HTTP request

+
+ + + +
- (NSMutableURLRequest *)createRequest:(NSString *const)protocol method:(NSString *const)method
+ + + +
+

Parameters

+ + + + + + + + + + + + +
protocol

Path

method

Protocol

+
+ + + +
+

Return Value

+

HTTP request instance

+
+ + + + + +
+

Discussion

+

Create HTTP request

+
+ + + + + + + +
+

Declared In

+

HttpConnection.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpDeviceInfo.html b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpDeviceInfo.html index 0625ab2..c85bcb7 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpDeviceInfo.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpDeviceInfo.html @@ -1,336 +1,336 @@ - - - - - - HttpDeviceInfo Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

HttpDeviceInfo Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inHttpDeviceInfo.h
HttpDeviceInfo.m
- - - - -
- -

Overview

-

Device information class

-
- - - - - -
- - - - - - -
-
- -

  model -

- -
-
- -
- - -
-

Model name

-
- - - -
@property (nonatomic) NSString *model
- - - - - - - - - -
-

Discussion

-

Model name

-
- - - - - - - -
-

Declared In

-

HttpDeviceInfo.h

-
- - -
-
-
- -

  firmware_version -

- -
-
- -
- - -
-

Firmware version

-
- - - -
@property (nonatomic) NSString *firmware_version
- - - - - - - - - -
-

Discussion

-

Firmware version

-
- - - - - - - -
-

Declared In

-

HttpDeviceInfo.h

-
- - -
-
-
- -

  serial_number -

- -
-
- -
- - -
-

Serial number

-
- - - -
@property (nonatomic) NSString *serial_number
- - - - - - - - - -
-

Discussion

-

Serial number

-
- - - - - - - -
-

Declared In

-

HttpDeviceInfo.h

-
- - -
-
-
- -

– description -

- -
-
- -
- - -
-

Device information represented as character string

-
- - - -
- (NSString *)description
- - - - - - - - - -
-

Discussion

-

Device information represented as character string

-
- - - - - - - -
-

Declared In

-

HttpDeviceInfo.h

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + HttpDeviceInfo Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

HttpDeviceInfo Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inHttpDeviceInfo.h
HttpDeviceInfo.m
+ + + + +
+ +

Overview

+

Device information class

+
+ + + + + +
+ + + + + + +
+
+ +

  model +

+ +
+
+ +
+ + +
+

Model name

+
+ + + +
@property (nonatomic) NSString *model
+ + + + + + + + + +
+

Discussion

+

Model name

+
+ + + + + + + +
+

Declared In

+

HttpDeviceInfo.h

+
+ + +
+
+
+ +

  firmware_version +

+ +
+
+ +
+ + +
+

Firmware version

+
+ + + +
@property (nonatomic) NSString *firmware_version
+ + + + + + + + + +
+

Discussion

+

Firmware version

+
+ + + + + + + +
+

Declared In

+

HttpDeviceInfo.h

+
+ + +
+
+
+ +

  serial_number +

+ +
+
+ +
+ + +
+

Serial number

+
+ + + +
@property (nonatomic) NSString *serial_number
+ + + + + + + + + +
+

Discussion

+

Serial number

+
+ + + + + + + +
+

Declared In

+

HttpDeviceInfo.h

+
+ + +
+
+
+ +

– description +

+ +
+
+ +
+ + +
+

Device information represented as character string

+
+ + + +
- (NSString *)description
+ + + + + + + + + +
+

Discussion

+

Device information represented as character string

+
+ + + + + + + +
+

Declared In

+

HttpDeviceInfo.h

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpFileList.html b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpFileList.html index 56ce468..4017921 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpFileList.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpFileList.html @@ -1,272 +1,272 @@ - - - - - - HttpFileList Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

HttpFileList Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inHttpFileList.h
HttpFileList.m
- - - - -
- -

Overview

-

Acquisition class of media file information

-If an acquisition method is called after an instance is generated, acquisition begins from the start of the list. Subsequent acquisitions begin from the token position that has been kept

-Nil is returned by the acquisition method when acquisition of the information reaches the end of the list. This value is therefore used to judge whether acquisition has reached the end.

-
- - - - - -
- - - - - - -
-
- -

– initWithRequest: -

- -
-
- -
- - -
-

Specified initializer

-
- - - -
- (id)initWithRequest:(NSMutableURLRequest *)request
- - - -
-

Parameters

- - - - - - - -
request

HTTP request

-
- - - -
-

Return Value

-

Instance

-
- - - - - -
-

Discussion

-

Specified initializer

-
- - - - - - - -
-

Declared In

-

HttpFileList.m

-
- - -
-
-
- -

– getList: -

- -
-
- -
- - -
-

Acquire information on multiple files together

-
- - - -
- (NSString *)getList:(NSUInteger)numItems
- - - -
-

Parameters

- - - - - - - -
numItems

Number of files for which to acquire information

-
- - - -
-

Return Value

-

Newly acquired token. Nil returned when acquisition reaches end of list

-
- - - - - -
-

Discussion

-

Acquire information on multiple files together

-
- - - - - - - -
-

Declared In

-

HttpFileList.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + HttpFileList Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

HttpFileList Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inHttpFileList.h
HttpFileList.m
+ + + + +
+ +

Overview

+

Acquisition class of media file information

+If an acquisition method is called after an instance is generated, acquisition begins from the start of the list. Subsequent acquisitions begin from the token position that has been kept

+Nil is returned by the acquisition method when acquisition of the information reaches the end of the list. This value is therefore used to judge whether acquisition has reached the end.

+
+ + + + + +
+ + + + + + +
+
+ +

– initWithRequest: +

+ +
+
+ +
+ + +
+

Specified initializer

+
+ + + +
- (id)initWithRequest:(NSMutableURLRequest *)request
+ + + +
+

Parameters

+ + + + + + + +
request

HTTP request

+
+ + + +
+

Return Value

+

Instance

+
+ + + + + +
+

Discussion

+

Specified initializer

+
+ + + + + + + +
+

Declared In

+

HttpFileList.m

+
+ + +
+
+
+ +

– getList: +

+ +
+
+ +
+ + +
+

Acquire information on multiple files together

+
+ + + +
- (NSString *)getList:(NSUInteger)numItems
+ + + +
+

Parameters

+ + + + + + + +
numItems

Number of files for which to acquire information

+
+ + + +
+

Return Value

+

Newly acquired token. Nil returned when acquisition reaches end of list

+
+ + + + + +
+

Discussion

+

Acquire information on multiple files together

+
+ + + + + + + +
+

Declared In

+

HttpFileList.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpObjectInfo.html b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpObjectInfo.html index f9b861c..a7f1f4d 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpObjectInfo.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpObjectInfo.html @@ -1,476 +1,476 @@ - - - - - - HttpObjectInfo Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

HttpObjectInfo Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inHttpObjectInfo.h
HttpObjectInfo.m
- - - - -
- -

Overview

-

メディアファイルの情報クラス

-
- - - - - -
- - - - - - -
-
- -

  object_format -

- -
-
- -
- - -
-

メディアフォーマット

-
- - - -
@property (nonatomic) enum OBJECT_FORMAT object_format
- - - - - - - - - -
-

Discussion

-

メディアフォーマット

-
- - - - - - - -
-

Declared In

-

HttpObjectInfo.h

-
- - -
-
-
- -

  object_compressed_size -

- -
-
- -
- - -
-

ファイルサイズ

-
- - - -
@property (nonatomic) NSUInteger object_compressed_size
- - - - - - - - - -
-

Discussion

-

ファイルサイズ

-
- - - - - - - -
-

Declared In

-

HttpObjectInfo.h

-
- - -
-
-
- -

  image_pix_width -

- -
-
- -
- - -
-

画像幅

-
- - - -
@property (nonatomic) NSUInteger image_pix_width
- - - - - - - - - -
-

Discussion

-

画像幅

-
- - - - - - - -
-

Declared In

-

HttpObjectInfo.h

-
- - -
-
-
- -

  image_pix_height -

- -
-
- -
- - -
-

画像高さ

-
- - - -
@property (nonatomic) NSUInteger image_pix_height
- - - - - - - - - -
-

Discussion

-

画像高さ

-
- - - - - - - -
-

Declared In

-

HttpObjectInfo.h

-
- - -
-
-
- -

  filename -

- -
-
- -
- - -
-

ファイル名

-
- - - -
@property (nonatomic) NSString *filename
- - - - - - - - - -
-

Discussion

-

ファイル名

-
- - - - - - - -
-

Declared In

-

HttpObjectInfo.h

-
- - -
-
-
- -

  capture_date -

- -
-
- -
- - -
-

ファイルの作成時刻または更新時刻

-
- - - -
@property (nonatomic) NSDate *capture_date
- - - - - - - - - -
-

Discussion

-

ファイルの作成時刻または更新時刻

-
- - - - - - - -
-

Declared In

-

HttpObjectInfo.h

-
- - -
-
-
- -

  uuid -

- -
-
- -
- - -
-

ファイルID

-
- - - -
@property (nonatomic) NSString *uuid
- - - - - - - - - -
-

Discussion

-

ファイルID

-
- - - - - - - -
-

Declared In

-

HttpObjectInfo.h

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + HttpObjectInfo Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

HttpObjectInfo Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inHttpObjectInfo.h
HttpObjectInfo.m
+ + + + +
+ +

Overview

+

メディアファイルの情報クラス

+
+ + + + + +
+ + + + + + +
+
+ +

  object_format +

+ +
+
+ +
+ + +
+

メディアフォーマット

+
+ + + +
@property (nonatomic) enum OBJECT_FORMAT object_format
+ + + + + + + + + +
+

Discussion

+

メディアフォーマット

+
+ + + + + + + +
+

Declared In

+

HttpObjectInfo.h

+
+ + +
+
+
+ +

  object_compressed_size +

+ +
+
+ +
+ + +
+

ファイルサイズ

+
+ + + +
@property (nonatomic) NSUInteger object_compressed_size
+ + + + + + + + + +
+

Discussion

+

ファイルサイズ

+
+ + + + + + + +
+

Declared In

+

HttpObjectInfo.h

+
+ + +
+
+
+ +

  image_pix_width +

+ +
+
+ +
+ + +
+

画像幅

+
+ + + +
@property (nonatomic) NSUInteger image_pix_width
+ + + + + + + + + +
+

Discussion

+

画像幅

+
+ + + + + + + +
+

Declared In

+

HttpObjectInfo.h

+
+ + +
+
+
+ +

  image_pix_height +

+ +
+
+ +
+ + +
+

画像高さ

+
+ + + +
@property (nonatomic) NSUInteger image_pix_height
+ + + + + + + + + +
+

Discussion

+

画像高さ

+
+ + + + + + + +
+

Declared In

+

HttpObjectInfo.h

+
+ + +
+
+
+ +

  filename +

+ +
+
+ +
+ + +
+

ファイル名

+
+ + + +
@property (nonatomic) NSString *filename
+ + + + + + + + + +
+

Discussion

+

ファイル名

+
+ + + + + + + +
+

Declared In

+

HttpObjectInfo.h

+
+ + +
+
+
+ +

  capture_date +

+ +
+
+ +
+ + +
+

ファイルの作成時刻または更新時刻

+
+ + + +
@property (nonatomic) NSDate *capture_date
+ + + + + + + + + +
+

Discussion

+

ファイルの作成時刻または更新時刻

+
+ + + + + + + +
+

Declared In

+

HttpObjectInfo.h

+
+ + +
+
+
+ +

  uuid +

+ +
+
+ +
+ + +
+

ファイルID

+
+ + + +
@property (nonatomic) NSString *uuid
+ + + + + + + + + +
+

Discussion

+

ファイルID

+
+ + + + + + + +
+

Declared In

+

HttpObjectInfo.h

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpSession.html b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpSession.html index f01276d..ed1ec21 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpSession.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpSession.html @@ -1,515 +1,515 @@ - - - - - - HttpSession Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

HttpSession Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inHttpSession.h
HttpSession.m
- - - - -
- -

Overview

-

Class for downloading files via HTTP

- -

File download class

-
- - - - - -
- - - - -

Other Methods

- -
-
- -

– initWithRequest: -

- -
-
- -
- - -
-

Specified initializer

-
- - - -
- (id)initWithRequest:(NSMutableURLRequest *)request
- - - -
-

Parameters

- - - - - - - -
request

HTTP request

-
- - - -
-

Return Value

-

Instance

-
- - - - - -
-

Discussion

-

Specified initializer

-
- - - - - - - -
-

Declared In

-

HttpSession.m

-
- - -
-
-
- -

– getResizedImageObject:onStart:onWrite:onFinish: -

- -
-
- -
- - -
-

Download file with specified file ID

-
- - - -
- (void)getResizedImageObject:(NSString *)fileUri onStart:(void ( ^ ) ( int64_t expectedTotalBytes ))startBlock onWrite:(void ( ^ ) ( int64_t totalBytesWritten , int64_t totalBytesExpectedToWrite ))writeBlock onFinish:(void ( ^ ) ( NSURL *location ))finishBlock
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - -
fileUri

ID of file to be downloaded

startBlock

Block to be called on start of download

writeBlock

Blocks to be called successively during download

finishBlock

Block to be called at end of download

-
- - - - - - - -
-

Discussion

-

Download file with specified file ID

-
- - - - - - - -
-

Declared In

-

HttpSession.m

-
- - -
-
-
-
- - - -

Other Methods

- -
-
- -

– URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes: -

- -
-
- -
- - -
-

Delegate to be called on start of download

-
- - - -
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didResumeAtOffset:(int64_t)fileOffset expectedTotalBytes:(int64_t)expectedTotalBytes
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - -
session

Session

downloadTask

Task

fileOffset

Acquired byte count on disk

expectedTotalBytes

Predicted byte count of entire acquired file

-
- - - - - - - -
-

Discussion

-

Delegate to be called on start of download

-
- - - - - - - -
-

Declared In

-

HttpSession.m

-
- - -
-
-
- -

– URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite: -

- -
-
- -
- - -
-

Delegates to be called successively during download

-
- - - -
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
session

Session

downloadTask

Task

bytesWritten

Byte count transferred each time a delegate method is called

totalBytesWritten

Current total transferred byte count

totalBytesExpectedToWrite

Predicted byte count of acquired file

-
- - - - - - - -
-

Discussion

-

Delegates to be called successively during download

-
- - - - - - - -
-

Declared In

-

HttpSession.m

-
- - -
-
-
- -

– URLSession:downloadTask:didFinishDownloadingToURL: -

- -
-
- -
- - -
-

Delegate to be called at end of download

-
- - - -
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - -
session

Session

downloadTask

Task

location

File URL of acquired temporary file

-
- - - - - - - -
-

Discussion

-

Delegate to be called at end of download

-
- - - - - - - -
-

Declared In

-

HttpSession.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + HttpSession Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

HttpSession Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inHttpSession.h
HttpSession.m
+ + + + +
+ +

Overview

+

Class for downloading files via HTTP

+ +

File download class

+
+ + + + + +
+ + + + +

Other Methods

+ +
+
+ +

– initWithRequest: +

+ +
+
+ +
+ + +
+

Specified initializer

+
+ + + +
- (id)initWithRequest:(NSMutableURLRequest *)request
+ + + +
+

Parameters

+ + + + + + + +
request

HTTP request

+
+ + + +
+

Return Value

+

Instance

+
+ + + + + +
+

Discussion

+

Specified initializer

+
+ + + + + + + +
+

Declared In

+

HttpSession.m

+
+ + +
+
+
+ +

– getResizedImageObject:onStart:onWrite:onFinish: +

+ +
+
+ +
+ + +
+

Download file with specified file ID

+
+ + + +
- (void)getResizedImageObject:(NSString *)fileUri onStart:(void ( ^ ) ( int64_t expectedTotalBytes ))startBlock onWrite:(void ( ^ ) ( int64_t totalBytesWritten , int64_t totalBytesExpectedToWrite ))writeBlock onFinish:(void ( ^ ) ( NSURL *location ))finishBlock
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + +
fileUri

ID of file to be downloaded

startBlock

Block to be called on start of download

writeBlock

Blocks to be called successively during download

finishBlock

Block to be called at end of download

+
+ + + + + + + +
+

Discussion

+

Download file with specified file ID

+
+ + + + + + + +
+

Declared In

+

HttpSession.m

+
+ + +
+
+
+
+ + + +

Other Methods

+ +
+
+ +

– URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes: +

+ +
+
+ +
+ + +
+

Delegate to be called on start of download

+
+ + + +
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didResumeAtOffset:(int64_t)fileOffset expectedTotalBytes:(int64_t)expectedTotalBytes
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + +
session

Session

downloadTask

Task

fileOffset

Acquired byte count on disk

expectedTotalBytes

Predicted byte count of entire acquired file

+
+ + + + + + + +
+

Discussion

+

Delegate to be called on start of download

+
+ + + + + + + +
+

Declared In

+

HttpSession.m

+
+ + +
+
+
+ +

– URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite: +

+ +
+
+ +
+ + +
+

Delegates to be called successively during download

+
+ + + +
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
session

Session

downloadTask

Task

bytesWritten

Byte count transferred each time a delegate method is called

totalBytesWritten

Current total transferred byte count

totalBytesExpectedToWrite

Predicted byte count of acquired file

+
+ + + + + + + +
+

Discussion

+

Delegates to be called successively during download

+
+ + + + + + + +
+

Declared In

+

HttpSession.m

+
+ + +
+
+
+ +

– URLSession:downloadTask:didFinishDownloadingToURL: +

+ +
+
+ +
+ + +
+

Delegate to be called at end of download

+
+ + + +
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + +
session

Session

downloadTask

Task

location

File URL of acquired temporary file

+
+ + + + + + + +
+

Discussion

+

Delegate to be called at end of download

+
+ + + + + + + +
+

Declared In

+

HttpSession.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStatusTimer.html b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStatusTimer.html index db8313e..9412a81 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStatusTimer.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStatusTimer.html @@ -1,338 +1,338 @@ - - - - - - HttpStatusTimer Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

HttpStatusTimer Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inHttpStatusTimer.h
HttpStatusTimer.m
- - - - -
- -

Overview

-

Class for periodic monitoring of command status

-
- - - - - -
- - - - -

Other Methods

- -
-
- -

– initWithRequest: -

- -
-
- -
- - -
-

Specified initializer

-
- - - -
- (id)initWithRequest:(NSMutableURLRequest *)request
- - - -
-

Parameters

- - - - - - - -
request

HTTP request

-
- - - -
-

Return Value

-

Instance

-
- - - - - -
-

Discussion

-

Specified initializer

-
- - - - - - - -
-

Declared In

-

HttpStatusTimer.m

-
- - -
-
-
- -

– run: -

- -
-
- -
- - -
-

Start status monitoring

-
- - - -
- (NSString *)run:(NSString *)command
- - - -
-

Parameters

- - - - - - - -
command

ID of command to be monitored

-
- - - -
-

Return Value

-

Status indicating completion or error

-
- - - - - -
-

Discussion

-

Start status monitoring

-
- - - - - - - -
-

Declared In

-

HttpStatusTimer.m

-
- - -
-
-
-
- - - -

Other Methods

- -
-
- -

– getState: -

- -
-
- -
- - -
-

Delegate called during each set period of time

-
- - - -
- (void)getState:(NSTimer *)timer
- - - -
-

Parameters

- - - - - - - -
timer

Timer

-
- - - - - - - -
-

Discussion

-

Delegate called during each set period of time

-
- - - - - - - -
-

Declared In

-

HttpStatusTimer.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + HttpStatusTimer Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

HttpStatusTimer Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inHttpStatusTimer.h
HttpStatusTimer.m
+ + + + +
+ +

Overview

+

Class for periodic monitoring of command status

+
+ + + + + +
+ + + + +

Other Methods

+ +
+
+ +

– initWithRequest: +

+ +
+
+ +
+ + +
+

Specified initializer

+
+ + + +
- (id)initWithRequest:(NSMutableURLRequest *)request
+ + + +
+

Parameters

+ + + + + + + +
request

HTTP request

+
+ + + +
+

Return Value

+

Instance

+
+ + + + + +
+

Discussion

+

Specified initializer

+
+ + + + + + + +
+

Declared In

+

HttpStatusTimer.m

+
+ + +
+
+
+ +

– run: +

+ +
+
+ +
+ + +
+

Start status monitoring

+
+ + + +
- (NSString *)run:(NSString *)command
+ + + +
+

Parameters

+ + + + + + + +
command

ID of command to be monitored

+
+ + + +
+

Return Value

+

Status indicating completion or error

+
+ + + + + +
+

Discussion

+

Start status monitoring

+
+ + + + + + + +
+

Declared In

+

HttpStatusTimer.m

+
+ + +
+
+
+
+ + + +

Other Methods

+ +
+
+ +

– getState: +

+ +
+
+ +
+ + +
+

Delegate called during each set period of time

+
+ + + +
- (void)getState:(NSTimer *)timer
+ + + +
+

Parameters

+ + + + + + + +
timer

Timer

+
+ + + + + + + +
+

Discussion

+

Delegate called during each set period of time

+
+ + + + + + + +
+

Declared In

+

HttpStatusTimer.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStorageInfo.html b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStorageInfo.html index 84cfdb2..3c04728 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStorageInfo.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStorageInfo.html @@ -1,380 +1,380 @@ - - - - - - HttpStorageInfo Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

HttpStorageInfo Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inHttpStorageInfo.h
HttpStorageInfo.m
- - - - -
- -

Overview

-

Device storage information and size of shot image

-
- - - - - -
- - - - - - -
-
- -

  max_capacity -

- -
-
- -
- - -
-

Total storage capacity

-
- - - -
@property (nonatomic) unsigned long max_capacity
- - - - - - - - - -
-

Discussion

-

Total storage capacity

-
- - - - - - - -
-

Declared In

-

HttpStorageInfo.h

-
- - -
-
-
- -

  free_space_in_bytes -

- -
-
- -
- - -
-

Remaining capacity

-
- - - -
@property (nonatomic) unsigned long free_space_in_bytes
- - - - - - - - - -
-

Discussion

-

Remaining capacity

-
- - - - - - - -
-

Declared In

-

HttpStorageInfo.h

-
- - -
-
-
- -

  free_space_in_images -

- -
-
- -
- - -
-

Remaining number of photos

-
- - - -
@property (nonatomic) unsigned long free_space_in_images
- - - - - - - - - -
-

Discussion

-

Remaining number of photos

-
- - - - - - - -
-

Declared In

-

HttpStorageInfo.h

-
- - -
-
-
- -

  image_width -

- -
-
- -
- - -
-

Image width for shooting still images

-
- - - -
@property (nonatomic) unsigned long image_width
- - - - - - - - - -
-

Discussion

-

Image width for shooting still images

-
- - - - - - - -
-

Declared In

-

HttpStorageInfo.h

-
- - -
-
-
- -

  image_height -

- -
-
- -
- - -
-

Image height for shooting still images

-
- - - -
@property (nonatomic) unsigned long image_height
- - - - - - - - - -
-

Discussion

-

Image height for shooting still images

-
- - - - - - - -
-

Declared In

-

HttpStorageInfo.h

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + HttpStorageInfo Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

HttpStorageInfo Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inHttpStorageInfo.h
HttpStorageInfo.m
+ + + + +
+ +

Overview

+

Device storage information and size of shot image

+
+ + + + + +
+ + + + + + +
+
+ +

  max_capacity +

+ +
+
+ +
+ + +
+

Total storage capacity

+
+ + + +
@property (nonatomic) unsigned long max_capacity
+ + + + + + + + + +
+

Discussion

+

Total storage capacity

+
+ + + + + + + +
+

Declared In

+

HttpStorageInfo.h

+
+ + +
+
+
+ +

  free_space_in_bytes +

+ +
+
+ +
+ + +
+

Remaining capacity

+
+ + + +
@property (nonatomic) unsigned long free_space_in_bytes
+ + + + + + + + + +
+

Discussion

+

Remaining capacity

+
+ + + + + + + +
+

Declared In

+

HttpStorageInfo.h

+
+ + +
+
+
+ +

  free_space_in_images +

+ +
+
+ +
+ + +
+

Remaining number of photos

+
+ + + +
@property (nonatomic) unsigned long free_space_in_images
+ + + + + + + + + +
+

Discussion

+

Remaining number of photos

+
+ + + + + + + +
+

Declared In

+

HttpStorageInfo.h

+
+ + +
+
+
+ +

  image_width +

+ +
+
+ +
+ + +
+

Image width for shooting still images

+
+ + + +
@property (nonatomic) unsigned long image_width
+ + + + + + + + + +
+

Discussion

+

Image width for shooting still images

+
+ + + + + + + +
+

Declared In

+

HttpStorageInfo.h

+
+ + +
+
+
+ +

  image_height +

+ +
+
+ +
+ + +
+

Image height for shooting still images

+
+ + + +
@property (nonatomic) unsigned long image_height
+ + + + + + + + + +
+

Discussion

+

Image height for shooting still images

+
+ + + + + + + +
+

Declared In

+

HttpStorageInfo.h

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStream.html b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStream.html index 4994aa4..ea284da 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStream.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/HttpStream.html @@ -1,521 +1,521 @@ - - - - - - HttpStream Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

HttpStream Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inHttpStream.h
HttpStream.m
- - - - -
- -

Overview

-

Live view data acquisition class

-
- - - - - -
- - - - -

Other Methods

- -
-
- -

– setDelegate: -

- -
-
- -
- - -
-

Set block to be executed when receiving data

-
- - - -
- (void)setDelegate:(void ( ^ ) ( NSData *frameData ))bufferBlock
- - - -
-

Parameters

- - - - - - - -
bufferBlock

Block to be executed when receiving data

-
- - - - - - - -
-

Discussion

-

Set block to be executed when receiving data

-
- - - - - - - -
-

Declared In

-

HttpStream.m

-
- - -
-
-
- -

– initWithRequest: -

- -
-
- -
- - -
-

Specified initializer

-
- - - -
- (id)initWithRequest:(NSMutableURLRequest *)request
- - - -
-

Parameters

- - - - - - - -
request

HTTP request

-
- - - -
-

Return Value

-

Instance

-
- - - - - -
-

Discussion

-

Specified initializer

-
- - - - - - - -
-

Declared In

-

HttpStream.m

-
- - -
-
-
- -

– getData: -

- -
-
- -
- - -
-

Start data acquisition

-
- - - -
- (void)getData:(NSString *)sessionId
- - - -
-

Parameters

- - - - - - - -
sessionId

Session ID

-
- - - - - - - -
-

Discussion

-

Start data acquisition

-
- - - - - - - -
-

Declared In

-

HttpStream.m

-
- - -
-
-
- -

– cancel -

- -
-
- -
- - -
-

Stop data acquisition task

-
- - - -
- (void)cancel
- - - - - - - - - -
-

Discussion

-

Stop data acquisition task

-
- - - - - - - -
-

Declared In

-

HttpStream.m

-
- - -
-
-
-
- - - -

Other Methods

- -
-
- -

– URLSession:dataTask:didReceiveData: -

- -
-
- -
- - -
-

Delegate for notification that part of the data has been received by the data acquisition task

-
- - - -
- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - -
session

Session

dataTask

Task

data

Received data

-
- - - - - - - -
-

Discussion

-

Delegate for notification that part of the data has been received by the data acquisition task

-
- - - - - - - -
-

Declared In

-

HttpStream.m

-
- - -
-
-
- -

– URLSession:task:didCompleteWithError: -

- -
-
- -
- - -
-

Delegate for notification that the data task has finished receiving data

-
- - - -
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - -
session

Session

task

Task

error

Error information

-
- - - - - - - -
-

Discussion

-

Delegate for notification that the data task has finished receiving data

-
- - - - - - - -
-

Declared In

-

HttpStream.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + HttpStream Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

HttpStream Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inHttpStream.h
HttpStream.m
+ + + + +
+ +

Overview

+

Live view data acquisition class

+
+ + + + + +
+ + + + +

Other Methods

+ +
+
+ +

– setDelegate: +

+ +
+
+ +
+ + +
+

Set block to be executed when receiving data

+
+ + + +
- (void)setDelegate:(void ( ^ ) ( NSData *frameData ))bufferBlock
+ + + +
+

Parameters

+ + + + + + + +
bufferBlock

Block to be executed when receiving data

+
+ + + + + + + +
+

Discussion

+

Set block to be executed when receiving data

+
+ + + + + + + +
+

Declared In

+

HttpStream.m

+
+ + +
+
+
+ +

– initWithRequest: +

+ +
+
+ +
+ + +
+

Specified initializer

+
+ + + +
- (id)initWithRequest:(NSMutableURLRequest *)request
+ + + +
+

Parameters

+ + + + + + + +
request

HTTP request

+
+ + + +
+

Return Value

+

Instance

+
+ + + + + +
+

Discussion

+

Specified initializer

+
+ + + + + + + +
+

Declared In

+

HttpStream.m

+
+ + +
+
+
+ +

– getData: +

+ +
+
+ +
+ + +
+

Start data acquisition

+
+ + + +
- (void)getData:(NSString *)sessionId
+ + + +
+

Parameters

+ + + + + + + +
sessionId

Session ID

+
+ + + + + + + +
+

Discussion

+

Start data acquisition

+
+ + + + + + + +
+

Declared In

+

HttpStream.m

+
+ + +
+
+
+ +

– cancel +

+ +
+
+ +
+ + +
+

Stop data acquisition task

+
+ + + +
- (void)cancel
+ + + + + + + + + +
+

Discussion

+

Stop data acquisition task

+
+ + + + + + + +
+

Declared In

+

HttpStream.m

+
+ + +
+
+
+
+ + + +

Other Methods

+ +
+
+ +

– URLSession:dataTask:didReceiveData: +

+ +
+
+ +
+ + +
+

Delegate for notification that part of the data has been received by the data acquisition task

+
+ + + +
- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + +
session

Session

dataTask

Task

data

Received data

+
+ + + + + + + +
+

Discussion

+

Delegate for notification that part of the data has been received by the data acquisition task

+
+ + + + + + + +
+

Declared In

+

HttpStream.m

+
+ + +
+
+
+ +

– URLSession:task:didCompleteWithError: +

+ +
+
+ +
+ + +
+

Delegate for notification that the data task has finished receiving data

+
+ + + +
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + +
session

Session

task

Task

error

Error information

+
+ + + + + + + +
+

Discussion

+

Delegate for notification that the data task has finished receiving data

+
+ + + + + + + +
+

Declared In

+

HttpStream.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/SphereXmp.html b/ricoh-theta-sample-for-iosv2/doc/Classes/SphereXmp.html index 505ddce..2f632f4 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/SphereXmp.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/SphereXmp.html @@ -1,559 +1,559 @@ - - - - - - SphereXmp Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

SphereXmp Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inSphereXmp.h
SphereXmp.m
- - - - -
- -

Overview

-

XMP information class included in image data -The read information is kept in the properties.

-
- - - - - -
- - - - -

Other Methods

- -
-
- -

– parse: -

- -
-
- -
- - -
-

Start analysis

-
- - - -
- (BOOL)parse:(NSData *)original
- - - -
-

Parameters

- - - - - - - -
original

Image data

-
- - - -
-

Return Value

-

Analysis successful?

-
- - - - - -
-

Discussion

-

Start analysis

-
- - - - - - - -
-

Declared In

-

SphereXmp.m

-
- - -
-
-
-
- - - -

Other Methods

- -
-
- -

– parser:didStartElement:namespaceURI:qualifiedName:attributes: -

- -
-
- -
- - -
-

Delegates called when XML tags are read during successive processes

-
- - - -
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
parser

XML parser

elementName

Element name

namespaceURI

Name space URI

qName

Modified name

attributeDict

Attribute dictionary

-
- - - - - - - -
-

Discussion

-

Delegates called when XML tags are read during successive processes

-
- - - - - - - -
-

Declared In

-

SphereXmp.m

-
- - -
-
-
- -

– parser:foundCharacters: -

- -
-
- -
- - -
-

Delegates called when character strings other than XML tags are read during successive processes

-
- - - -
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
- - - -
-

Parameters

- - - - - - - - - - - - -
parser

XML parser

string

Read character string

-
- - - - - - - -
-

Discussion

-

Delegates called when character strings other than XML tags are read during successive processes

-
- - - - - - - -
-

Declared In

-

SphereXmp.m

-
- - -
-
-
- -

– parserDidEndDocument: -

- -
-
- -
- - -
-

Delegate called when XML analysis is successful

-
- - - -
- (void)parserDidEndDocument:(NSXMLParser *)parser
- - - -
-

Parameters

- - - - - - - -
parser

XML parser

-
- - - - - - - -
-

Discussion

-

Delegate called when XML analysis is successful

-
- - - - - - - -
-

Declared In

-

SphereXmp.m

-
- - -
-
-
- -

– parser:parseErrorOccurred: -

- -
-
- -
- - -
-

Delegate called when XML analysis fails

-
- - - -
- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError
- - - -
-

Parameters

- - - - - - - - - - - - -
parser

XML parser

parseError

Error information

-
- - - - - - - -
-

Discussion

-

Delegate called when XML analysis fails

-
- - - - - - - -
-

Declared In

-

SphereXmp.m

-
- - -
-
-
- -

– indexOf:in:from: -

- -
-
- -
- - -
-

Search position of specific data pattern

-
- - - -
- (NSUInteger)indexOf:(NSData *)sub in:(NSData *)original from:(NSUInteger)startIndex
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - -
sub

Searched data

original

Searched data

startIndex

Search start position

-
- - - -
-

Return Value

-

The position where the searched data starts. “0” is returned if there are no hits.

-
- - - - - -
-

Discussion

-

Search position of specific data pattern

-
- - - - - - - -
-

Declared In

-

SphereXmp.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + SphereXmp Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

SphereXmp Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inSphereXmp.h
SphereXmp.m
+ + + + +
+ +

Overview

+

XMP information class included in image data +The read information is kept in the properties.

+
+ + + + + +
+ + + + +

Other Methods

+ +
+
+ +

– parse: +

+ +
+
+ +
+ + +
+

Start analysis

+
+ + + +
- (BOOL)parse:(NSData *)original
+ + + +
+

Parameters

+ + + + + + + +
original

Image data

+
+ + + +
+

Return Value

+

Analysis successful?

+
+ + + + + +
+

Discussion

+

Start analysis

+
+ + + + + + + +
+

Declared In

+

SphereXmp.m

+
+ + +
+
+
+
+ + + +

Other Methods

+ +
+
+ +

– parser:didStartElement:namespaceURI:qualifiedName:attributes: +

+ +
+
+ +
+ + +
+

Delegates called when XML tags are read during successive processes

+
+ + + +
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
parser

XML parser

elementName

Element name

namespaceURI

Name space URI

qName

Modified name

attributeDict

Attribute dictionary

+
+ + + + + + + +
+

Discussion

+

Delegates called when XML tags are read during successive processes

+
+ + + + + + + +
+

Declared In

+

SphereXmp.m

+
+ + +
+
+
+ +

– parser:foundCharacters: +

+ +
+
+ +
+ + +
+

Delegates called when character strings other than XML tags are read during successive processes

+
+ + + +
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
+ + + +
+

Parameters

+ + + + + + + + + + + + +
parser

XML parser

string

Read character string

+
+ + + + + + + +
+

Discussion

+

Delegates called when character strings other than XML tags are read during successive processes

+
+ + + + + + + +
+

Declared In

+

SphereXmp.m

+
+ + +
+
+
+ +

– parserDidEndDocument: +

+ +
+
+ +
+ + +
+

Delegate called when XML analysis is successful

+
+ + + +
- (void)parserDidEndDocument:(NSXMLParser *)parser
+ + + +
+

Parameters

+ + + + + + + +
parser

XML parser

+
+ + + + + + + +
+

Discussion

+

Delegate called when XML analysis is successful

+
+ + + + + + + +
+

Declared In

+

SphereXmp.m

+
+ + +
+
+
+ +

– parser:parseErrorOccurred: +

+ +
+
+ +
+ + +
+

Delegate called when XML analysis fails

+
+ + + +
- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError
+ + + +
+

Parameters

+ + + + + + + + + + + + +
parser

XML parser

parseError

Error information

+
+ + + + + + + +
+

Discussion

+

Delegate called when XML analysis fails

+
+ + + + + + + +
+

Declared In

+

SphereXmp.m

+
+ + +
+
+
+ +

– indexOf:in:from: +

+ +
+
+ +
+ + +
+

Search position of specific data pattern

+
+ + + +
- (NSUInteger)indexOf:(NSData *)sub in:(NSData *)original from:(NSUInteger)startIndex
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + +
sub

Searched data

original

Searched data

startIndex

Search start position

+
+ + + +
+

Return Value

+

The position where the searched data starts. “0” is returned if there are no hits.

+
+ + + + + +
+

Discussion

+

Search position of specific data pattern

+
+ + + + + + + +
+

Declared In

+

SphereXmp.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/TableCellObject.html b/ricoh-theta-sample-for-iosv2/doc/Classes/TableCellObject.html index 1bc1d57..0530c53 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/TableCellObject.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/TableCellObject.html @@ -1,180 +1,180 @@ - - - - - - TableCellObject Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

TableCellObject Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inTableCellObject.h
TableCellObject.m
- - - - - - -
- - - - - - -
-
- -

+ objectWithInfo: -

- -
-
- -
- - -
-

Function for object creation -@param info

-
- - - -
+ (id)objectWithInfo:(HttpImageInfo *)info
- - - - - - - - - -
-

Discussion

-

Function for object creation -@param info

-
- - - - - - - -
-

Declared In

-

TableCellObject.h

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + TableCellObject Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

TableCellObject Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inTableCellObject.h
TableCellObject.m
+ + + + + + +
+ + + + + + +
+
+ +

+ objectWithInfo: +

+ +
+
+ +
+ + +
+

Function for object creation +@param info

+
+ + + +
+ (id)objectWithInfo:(HttpImageInfo *)info
+ + + + + + + + + +
+

Discussion

+

Function for object creation +@param info

+
+ + + + + + + +
+

Declared In

+

TableCellObject.h

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/Classes/UVSphere.html b/ricoh-theta-sample-for-iosv2/doc/Classes/UVSphere.html index 5855811..2bec656 100755 --- a/ricoh-theta-sample-for-iosv2/doc/Classes/UVSphere.html +++ b/ricoh-theta-sample-for-iosv2/doc/Classes/UVSphere.html @@ -1,285 +1,285 @@ - - - - - - UVSphere Class Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

UVSphere Class Reference

- - -
- - - - - - - -
Inherits fromNSObject
Declared inUVSphere.h
UVSphere.m
- - - - -
- -

Overview

-

UV sphere creation class

-
- - - - - -
- - - - - - -
-
- -

– init:divide:rotate: -

- -
-
- -
- - -
-

Method for UV sphere creation -Sphere is created at the specified radius centered on the origin. -UV sphere and corresponding texture UV coordinates are created by creating a divide/2 band -in the longitudinal direction and dividing the band by the divide number.

-
- - - -
- (id)init:(GLfloat)radius divide:(int)divide rotate:(double)rotate
- - - -
-

Parameters

- - - - - - - - - - - - - - - - - -
radius

Radius

divide

Polygon partition parameter

rotate

Rotation angle (radian) in horizontal direction (yaw)

-
- - - - - - - -
-

Discussion

-

Method for UV sphere creation -Sphere is created at the specified radius centered on the origin. -UV sphere and corresponding texture UV coordinates are created by creating a divide/2 band -in the longitudinal direction and dividing the band by the divide number.

-
- - - - - - - -
-

Declared In

-

UVSphere.m

-
- - -
-
-
- -

– draw:uv: -

- -
-
- -
- - -
-

Method for drawing spheres -Variables connected to the shader are used for drawing. -It is assumed that shader variables are activated.

-
- - - -
- (void)draw:(GLint)posLocation uv:(GLint)uvLocation
- - - -
-

Parameters

- - - - - - - - - - - - -
posLocation

Attribute compatibility variable for shader connected to the position

uvLocation

Attribute compatibility variable for shader connected to the UV space

-
- - - - - - - -
-

Discussion

-

Method for drawing spheres -Variables connected to the shader are used for drawing. -It is assumed that shader variables are activated.

-
- - - - - - - -
-

Declared In

-

UVSphere.m

-
- - -
-
-
-
- -
- - - - - - -
- - -
-
-
- - - + + + + + + UVSphere Class Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

UVSphere Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inUVSphere.h
UVSphere.m
+ + + + +
+ +

Overview

+

UV sphere creation class

+
+ + + + + +
+ + + + + + +
+
+ +

– init:divide:rotate: +

+ +
+
+ +
+ + +
+

Method for UV sphere creation +Sphere is created at the specified radius centered on the origin. +UV sphere and corresponding texture UV coordinates are created by creating a divide/2 band +in the longitudinal direction and dividing the band by the divide number.

+
+ + + +
- (id)init:(GLfloat)radius divide:(int)divide rotate:(double)rotate
+ + + +
+

Parameters

+ + + + + + + + + + + + + + + + + +
radius

Radius

divide

Polygon partition parameter

rotate

Rotation angle (radian) in horizontal direction (yaw)

+
+ + + + + + + +
+

Discussion

+

Method for UV sphere creation +Sphere is created at the specified radius centered on the origin. +UV sphere and corresponding texture UV coordinates are created by creating a divide/2 band +in the longitudinal direction and dividing the band by the divide number.

+
+ + + + + + + +
+

Declared In

+

UVSphere.m

+
+ + +
+
+
+ +

– draw:uv: +

+ +
+
+ +
+ + +
+

Method for drawing spheres +Variables connected to the shader are used for drawing. +It is assumed that shader variables are activated.

+
+ + + +
- (void)draw:(GLint)posLocation uv:(GLint)uvLocation
+ + + +
+

Parameters

+ + + + + + + + + + + + +
posLocation

Attribute compatibility variable for shader connected to the position

uvLocation

Attribute compatibility variable for shader connected to the UV space

+
+ + + + + + + +
+

Discussion

+

Method for drawing spheres +Variables connected to the shader are used for drawing. +It is assumed that shader variables are activated.

+
+ + + + + + + +
+

Declared In

+

UVSphere.m

+
+ + +
+
+
+
+ +
+ + + + + + +
+ + +
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/css/scss/_index.scss b/ricoh-theta-sample-for-iosv2/doc/css/scss/_index.scss index 6a57ec5..af829ae 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/scss/_index.scss +++ b/ricoh-theta-sample-for-iosv2/doc/css/scss/_index.scss @@ -1,17 +1,17 @@ -.index-container { - -webkit-flex-direction: column; - flex-direction: column; - - @media (min-width: $desktop-min-width) { - display: flex; - -webkit-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: wrap; - flex-wrap: wrap; - } - - .index-column { - -webkit-flex: 1 1 33%; - flex: 1 1 33%; - } -} +.index-container { + -webkit-flex-direction: column; + flex-direction: column; + + @media (min-width: $desktop-min-width) { + display: flex; + -webkit-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + } + + .index-column { + -webkit-flex: 1 1 33%; + flex: 1 1 33%; + } +} diff --git a/ricoh-theta-sample-for-iosv2/doc/css/scss/_layout.scss b/ricoh-theta-sample-for-iosv2/doc/css/scss/_layout.scss index da46aef..15d6ba5 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/scss/_layout.scss +++ b/ricoh-theta-sample-for-iosv2/doc/css/scss/_layout.scss @@ -1,302 +1,302 @@ -* { - box-sizing: border-box; -} - -.clear { - clear: both; -} - -.clearfix { - &:before, &:after { - clear: both; - display: table; - content: ""; - } -} - -.xcode .hide-in-xcode { - display: none; -} - -body { - font: 62.5% $body-font; - background: $body-background; - - @media (max-width: $mobile-max-width) { - background-color: $content-background; - } -} - -h1, h2, h3 { - font-weight: 300; - color: #808080; -} - -h1 { - font-size: 2em; - color: #000; -} - -h4 { - font-size: 13px; - line-height: 1.5; - margin: 21px 0 0 0; -} - -a { - color: $tint-color; - text-decoration: none; -} - -pre, code { - font-family: $code-font; - word-wrap: break-word; -} - -pre > code, .method-declaration code { - display: inline-block; - font-size: .85em; - padding: 4px 0 4px 10px; - border-left: 5px solid rgba(0, 155, 51, .2); - - &:before { - content: "Objective-C"; - display: block; - - font: 9px/1 $body-font; - color: #009b33; - text-transform: uppercase; - letter-spacing: 2px; - padding-bottom: 6px; - } -} - -pre > code { - font-size: inherit; -} - -table, th, td { - border: 1px solid #e9e9e9; -} - -table { - width: 100%; -} - -th, td { - padding: 7px; - - > :first-child { - margin-top: 0; - } - - > :last-child { - margin-bottom: 0; - } -} - -.container { - @extend .clearfix; - - max-width: 980px; - padding: 0 10px; - margin: 0 auto; - - @media (max-width: $mobile-max-width) { - padding: 0; - } -} - -header { - position: fixed; - top: 0; - left: 0; - width: 100%; - z-index: 2; - - background: #414141; - color: #fff; - font-size: 1.1em; - line-height: 25px; - letter-spacing: .05em; - - #library-title { - float: left; - } - - #developer-home { - float: right; - } - - h1 { - font-size: inherit; - font-weight: inherit; - margin: 0; - } - - p { - margin: 0; - } - - h1, a { - color: inherit; - } - - @media (max-width: $mobile-max-width) { - .container { - padding: 0 10px; - } - } -} - -aside { - position: fixed; - top: 25px; - left: 0; - width: 100%; - height: 25px; - z-index: 2; - - font-size: 1.1em; - - #header-buttons { - background: rgba(255, 255, 255, .8); - margin: 0 1px; - padding: 0; - list-style: none; - text-align: right; - line-height: 32px; - - li { - display: inline-block; - cursor: pointer; - padding: 0 10px; - } - - label, select { - cursor: inherit; - } - - #on-this-page { - position: relative; - - .chevron { - display: inline-block; - width: 14px; - height: 4px; - position: relative; - - .chevy { - background: #878787; - height: 2px; - position: absolute; - width: 10px; - - &.chevron-left { - left: 0; - transform: rotateZ(45deg) scale(0.6); - } - - &.chevron-right { - right: 0; - transform: rotateZ(-45deg) scale(0.6); - } - } - } - - #jump-to { - opacity: 0; - font-size: 16px; - - position: absolute; - top: 5px; - left: 0; - width: 100%; - height: 100%; - } - } - } -} - -article { - margin-top: 25px; - - #content { - @extend .clearfix; - - background: $content-background; - border: 1px solid $content-border; - padding: 15px 25px 30px 25px; - - font-size: 1.4em; - line-height: 1.45; - - position: relative; - - @media (max-width: $mobile-max-width) { - padding: 15px 10px 20px 10px; - border: none; - } - - .navigation-top { - position: absolute; - top: 15px; - right: 25px; - } - - .title { - margin: 21px 0 0 0; - padding: 15px 0; - } - - p { - color: #414141; - margin: 0 0 15px 0; - } - - th, td { - p:last-child { - margin-bottom: 0; - } - } - - main { - ul { - list-style: none; - margin-left: 24px; - margin-bottom: 12px; - padding: 0; - - li { - position: relative; - padding-left: 1.3em; - - &:before { - content: "\02022"; - - color: #414141; - font-size: 1.08em; - line-height: 1; - - position: absolute; - left: 0; - padding-top: 2px; - } - } - } - } - - footer { - @extend .clearfix; - - .footer-copyright { - margin: 70px 25px 10px 0; - } - - p { - font-size: .71em; - color: #a0a0a0; - } - } - } -} +* { + box-sizing: border-box; +} + +.clear { + clear: both; +} + +.clearfix { + &:before, &:after { + clear: both; + display: table; + content: ""; + } +} + +.xcode .hide-in-xcode { + display: none; +} + +body { + font: 62.5% $body-font; + background: $body-background; + + @media (max-width: $mobile-max-width) { + background-color: $content-background; + } +} + +h1, h2, h3 { + font-weight: 300; + color: #808080; +} + +h1 { + font-size: 2em; + color: #000; +} + +h4 { + font-size: 13px; + line-height: 1.5; + margin: 21px 0 0 0; +} + +a { + color: $tint-color; + text-decoration: none; +} + +pre, code { + font-family: $code-font; + word-wrap: break-word; +} + +pre > code, .method-declaration code { + display: inline-block; + font-size: .85em; + padding: 4px 0 4px 10px; + border-left: 5px solid rgba(0, 155, 51, .2); + + &:before { + content: "Objective-C"; + display: block; + + font: 9px/1 $body-font; + color: #009b33; + text-transform: uppercase; + letter-spacing: 2px; + padding-bottom: 6px; + } +} + +pre > code { + font-size: inherit; +} + +table, th, td { + border: 1px solid #e9e9e9; +} + +table { + width: 100%; +} + +th, td { + padding: 7px; + + > :first-child { + margin-top: 0; + } + + > :last-child { + margin-bottom: 0; + } +} + +.container { + @extend .clearfix; + + max-width: 980px; + padding: 0 10px; + margin: 0 auto; + + @media (max-width: $mobile-max-width) { + padding: 0; + } +} + +header { + position: fixed; + top: 0; + left: 0; + width: 100%; + z-index: 2; + + background: #414141; + color: #fff; + font-size: 1.1em; + line-height: 25px; + letter-spacing: .05em; + + #library-title { + float: left; + } + + #developer-home { + float: right; + } + + h1 { + font-size: inherit; + font-weight: inherit; + margin: 0; + } + + p { + margin: 0; + } + + h1, a { + color: inherit; + } + + @media (max-width: $mobile-max-width) { + .container { + padding: 0 10px; + } + } +} + +aside { + position: fixed; + top: 25px; + left: 0; + width: 100%; + height: 25px; + z-index: 2; + + font-size: 1.1em; + + #header-buttons { + background: rgba(255, 255, 255, .8); + margin: 0 1px; + padding: 0; + list-style: none; + text-align: right; + line-height: 32px; + + li { + display: inline-block; + cursor: pointer; + padding: 0 10px; + } + + label, select { + cursor: inherit; + } + + #on-this-page { + position: relative; + + .chevron { + display: inline-block; + width: 14px; + height: 4px; + position: relative; + + .chevy { + background: #878787; + height: 2px; + position: absolute; + width: 10px; + + &.chevron-left { + left: 0; + transform: rotateZ(45deg) scale(0.6); + } + + &.chevron-right { + right: 0; + transform: rotateZ(-45deg) scale(0.6); + } + } + } + + #jump-to { + opacity: 0; + font-size: 16px; + + position: absolute; + top: 5px; + left: 0; + width: 100%; + height: 100%; + } + } + } +} + +article { + margin-top: 25px; + + #content { + @extend .clearfix; + + background: $content-background; + border: 1px solid $content-border; + padding: 15px 25px 30px 25px; + + font-size: 1.4em; + line-height: 1.45; + + position: relative; + + @media (max-width: $mobile-max-width) { + padding: 15px 10px 20px 10px; + border: none; + } + + .navigation-top { + position: absolute; + top: 15px; + right: 25px; + } + + .title { + margin: 21px 0 0 0; + padding: 15px 0; + } + + p { + color: #414141; + margin: 0 0 15px 0; + } + + th, td { + p:last-child { + margin-bottom: 0; + } + } + + main { + ul { + list-style: none; + margin-left: 24px; + margin-bottom: 12px; + padding: 0; + + li { + position: relative; + padding-left: 1.3em; + + &:before { + content: "\02022"; + + color: #414141; + font-size: 1.08em; + line-height: 1; + + position: absolute; + left: 0; + padding-top: 2px; + } + } + } + } + + footer { + @extend .clearfix; + + .footer-copyright { + margin: 70px 25px 10px 0; + } + + p { + font-size: .71em; + color: #a0a0a0; + } + } + } +} diff --git a/ricoh-theta-sample-for-iosv2/doc/css/scss/_normalize.scss b/ricoh-theta-sample-for-iosv2/doc/css/scss/_normalize.scss index 9b8848a..ba933ad 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/scss/_normalize.scss +++ b/ricoh-theta-sample-for-iosv2/doc/css/scss/_normalize.scss @@ -1,581 +1,581 @@ -/* ========================================================================== - Normalize.scss settings - ========================================================================== */ -/** - * Includes legacy browser support IE6/7 - * - * Set to false if you want to drop support for IE6 and IE7 - */ - -$legacy_browser_support: false !default; - -/* Base - ========================================================================== */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - * 3. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using - * `em` units. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ - @if $legacy_browser_support { - *font-size: 100%; /* 3 */ - } -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ - @if $legacy_browser_support { - *display: inline; - *zoom: 1; - } -} - -/** - * Prevents modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a { - &:active, &:hover { - outline: 0; - }; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -@if $legacy_browser_support { - blockquote { - margin: 1em 40px; - } -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -@if $legacy_browser_support { - h2 { - font-size: 1.5em; - margin: 0.83em 0; - } - - h3 { - font-size: 1.17em; - margin: 1em 0; - } - - h4 { - font-size: 1em; - margin: 1.33em 0; - } - - h5 { - font-size: 0.83em; - margin: 1.67em 0; - } - - h6 { - font-size: 0.67em; - margin: 2.33em 0; - } -} - -/** - * Addresses styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -@if $legacy_browser_support { - - /** - * Addresses margins set differently in IE 6/7. - */ - - p, - pre { - *margin: 1em 0; - } - - /* - * Addresses CSS quotes not supported in IE 6/7. - */ - - q { - *quotes: none; - } - - /* - * Addresses `quotes` property not supported in Safari 4. - */ - - q:before, - q:after { - content: ''; - content: none; - } -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -@if $legacy_browser_support { - - /* ========================================================================== - Lists - ========================================================================== */ - - /* - * Addresses margins set differently in IE 6/7. - */ - - dl, - menu, - ol, - ul { - *margin: 1em 0; - } - - dd { - *margin: 0 0 0 40px; - } - - /* - * Addresses paddings set differently in IE 6/7. - */ - - menu, - ol, - ul { - *padding: 0 0 0 40px; - } - - /* - * Corrects list images handled incorrectly in IE 7. - */ - - nav ul, - nav ol { - *list-style: none; - *list-style-image: none; - } - -} - -/* Embedded content - ========================================================================== */ - -/** - * 1. Remove border when inside `a` element in IE 8/9/10. - * 2. Improves image quality when scaled in IE 7. - */ - -img { - border: 0; - @if $legacy_browser_support { - *-ms-interpolation-mode: bicubic; /* 2 */ - } -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - @if $legacy_browser_support { - _font-family: 'courier new', monospace; - } - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - * 4. Improves appearance and consistency in all browsers. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ - @if $legacy_browser_support { - vertical-align: baseline; /* 3 */ - *vertical-align: middle; /* 3 */ - } -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - * 4. Removes inner spacing in IE 7 without affecting normal text inputs. - * Known issue: inner spacing remains in IE 6. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ - @if $legacy_browser_support { - *overflow: visible; /* 4 */ - } -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - * Known issue: excess padding remains in IE 6. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ - @if $legacy_browser_support { - *height: 13px; /* 3 */ - *width: 13px; /* 3 */ - } -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - * 3. Corrects text not wrapping in Firefox 3. - * 4. Corrects alignment displayed oddly in IE 6/7. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ - @if $legacy_browser_support { - white-space: normal; /* 3 */ - *margin-left: -7px; /* 4 */ - } -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} +/* ========================================================================== + Normalize.scss settings + ========================================================================== */ +/** + * Includes legacy browser support IE6/7 + * + * Set to false if you want to drop support for IE6 and IE7 + */ + +$legacy_browser_support: false !default; + +/* Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + * 3. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using + * `em` units. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ + @if $legacy_browser_support { + *font-size: 100%; /* 3 */ + } +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ + @if $legacy_browser_support { + *display: inline; + *zoom: 1; + } +} + +/** + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a { + &:active, &:hover { + outline: 0; + }; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +@if $legacy_browser_support { + blockquote { + margin: 1em 40px; + } +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +@if $legacy_browser_support { + h2 { + font-size: 1.5em; + margin: 0.83em 0; + } + + h3 { + font-size: 1.17em; + margin: 1em 0; + } + + h4 { + font-size: 1em; + margin: 1.33em 0; + } + + h5 { + font-size: 0.83em; + margin: 1.67em 0; + } + + h6 { + font-size: 0.67em; + margin: 2.33em 0; + } +} + +/** + * Addresses styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +@if $legacy_browser_support { + + /** + * Addresses margins set differently in IE 6/7. + */ + + p, + pre { + *margin: 1em 0; + } + + /* + * Addresses CSS quotes not supported in IE 6/7. + */ + + q { + *quotes: none; + } + + /* + * Addresses `quotes` property not supported in Safari 4. + */ + + q:before, + q:after { + content: ''; + content: none; + } +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +@if $legacy_browser_support { + + /* ========================================================================== + Lists + ========================================================================== */ + + /* + * Addresses margins set differently in IE 6/7. + */ + + dl, + menu, + ol, + ul { + *margin: 1em 0; + } + + dd { + *margin: 0 0 0 40px; + } + + /* + * Addresses paddings set differently in IE 6/7. + */ + + menu, + ol, + ul { + *padding: 0 0 0 40px; + } + + /* + * Corrects list images handled incorrectly in IE 7. + */ + + nav ul, + nav ol { + *list-style: none; + *list-style-image: none; + } + +} + +/* Embedded content + ========================================================================== */ + +/** + * 1. Remove border when inside `a` element in IE 8/9/10. + * 2. Improves image quality when scaled in IE 7. + */ + +img { + border: 0; + @if $legacy_browser_support { + *-ms-interpolation-mode: bicubic; /* 2 */ + } +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + @if $legacy_browser_support { + _font-family: 'courier new', monospace; + } + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + * 4. Improves appearance and consistency in all browsers. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ + @if $legacy_browser_support { + vertical-align: baseline; /* 3 */ + *vertical-align: middle; /* 3 */ + } +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + * 4. Removes inner spacing in IE 7 without affecting normal text inputs. + * Known issue: inner spacing remains in IE 6. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ + @if $legacy_browser_support { + *overflow: visible; /* 4 */ + } +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + * Known issue: excess padding remains in IE 6. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ + @if $legacy_browser_support { + *height: 13px; /* 3 */ + *width: 13px; /* 3 */ + } +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + * 3. Corrects text not wrapping in Firefox 3. + * 4. Corrects alignment displayed oddly in IE 6/7. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ + @if $legacy_browser_support { + white-space: normal; /* 3 */ + *margin-left: -7px; /* 4 */ + } +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/ricoh-theta-sample-for-iosv2/doc/css/scss/_object.scss b/ricoh-theta-sample-for-iosv2/doc/css/scss/_object.scss index 22eebd8..284728a 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/scss/_object.scss +++ b/ricoh-theta-sample-for-iosv2/doc/css/scss/_object.scss @@ -1,89 +1,89 @@ -.section-specification { - table { - width: auto; - - th { - text-align: left; - } - } -} - -.method-title { - margin-left: -15px; - margin-bottom: 8px; - transition: margin-left .3s ease-out; - - .section-method.hide & { - margin-left: 0; - } - - code { - font-weight: 400; - font-size: .85em; - } -} - -.method-info { - background: $object-background; - border-bottom: 1px solid $object-border; - margin: 0 -25px; - padding: 20px 25px 0 25px; - transition: height .3s ease-out; - - position: relative; - - .pointy-thing { - background: $content-background; - height: 10px; - border-bottom: 1px solid $object-border; - margin: -20px -25px 16px -25px; - - &:before { - display: inline-block; - content: ""; - - background: $object-background; - border: 1px solid $object-border; - border-bottom: 0; - border-right: 0; - - position: absolute; - left: 21px; - top: 3px; - width: 12px; - height: 12px; - transform: rotate(45deg); - } - } - - .method-subsection { - margin-bottom: 15px; - - .argument-name { - width: 1px; - text-align: right; - - code { - color: #808080; - font-style: italic; - font-weight: 400; - } - } - } -} - -.section-method { - &.hide .method-info { - height: 0 !important; - overflow: hidden; - display: none; - } - - &.hide.animating .method-info { - display: block; - } - - &.animating .method-info { - overflow: hidden; - } -} +.section-specification { + table { + width: auto; + + th { + text-align: left; + } + } +} + +.method-title { + margin-left: -15px; + margin-bottom: 8px; + transition: margin-left .3s ease-out; + + .section-method.hide & { + margin-left: 0; + } + + code { + font-weight: 400; + font-size: .85em; + } +} + +.method-info { + background: $object-background; + border-bottom: 1px solid $object-border; + margin: 0 -25px; + padding: 20px 25px 0 25px; + transition: height .3s ease-out; + + position: relative; + + .pointy-thing { + background: $content-background; + height: 10px; + border-bottom: 1px solid $object-border; + margin: -20px -25px 16px -25px; + + &:before { + display: inline-block; + content: ""; + + background: $object-background; + border: 1px solid $object-border; + border-bottom: 0; + border-right: 0; + + position: absolute; + left: 21px; + top: 3px; + width: 12px; + height: 12px; + transform: rotate(45deg); + } + } + + .method-subsection { + margin-bottom: 15px; + + .argument-name { + width: 1px; + text-align: right; + + code { + color: #808080; + font-style: italic; + font-weight: 400; + } + } + } +} + +.section-method { + &.hide .method-info { + height: 0 !important; + overflow: hidden; + display: none; + } + + &.hide.animating .method-info { + display: block; + } + + &.animating .method-info { + overflow: hidden; + } +} diff --git a/ricoh-theta-sample-for-iosv2/doc/css/scss/_print.scss b/ricoh-theta-sample-for-iosv2/doc/css/scss/_print.scss index 61bdf99..47762e4 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/scss/_print.scss +++ b/ricoh-theta-sample-for-iosv2/doc/css/scss/_print.scss @@ -1,42 +1,42 @@ -@media print { - body { - background: #fff; - padding: 8px; - } - - header { - position: static; - background: #fff; - color: #000; - } - - aside { - display: none; - } - - .container { - max-width: none; - padding: 0; - } - - article { - margin-top: 0; - - #content { - border: 0; - background: #fff; - padding: 15px 0 0 0; - - .title { - margin-top: 0; - padding-top: 0; - } - } - } - - .method-info { - &, & .pointy-thing { - background: #fff; - } - } -} +@media print { + body { + background: #fff; + padding: 8px; + } + + header { + position: static; + background: #fff; + color: #000; + } + + aside { + display: none; + } + + .container { + max-width: none; + padding: 0; + } + + article { + margin-top: 0; + + #content { + border: 0; + background: #fff; + padding: 15px 0 0 0; + + .title { + margin-top: 0; + padding-top: 0; + } + } + } + + .method-info { + &, & .pointy-thing { + background: #fff; + } + } +} diff --git a/ricoh-theta-sample-for-iosv2/doc/css/scss/_variables.scss b/ricoh-theta-sample-for-iosv2/doc/css/scss/_variables.scss index 38e072d..995f580 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/scss/_variables.scss +++ b/ricoh-theta-sample-for-iosv2/doc/css/scss/_variables.scss @@ -1,12 +1,12 @@ -$body-font: -apple-system-font, "Helvetica Neue", Helvetica, sans-serif; -$code-font: "Source Code Pro", Monaco, Menlo, Consolas, monospace; - -$body-background: #f2f2f2; -$content-background: #fff; -$content-border: #e9e9e9; -$tint-color: #08c; -$object-background: #f9f9f9; -$object-border: #e9e9e9; - -$mobile-max-width: 650px; +$body-font: -apple-system-font, "Helvetica Neue", Helvetica, sans-serif; +$code-font: "Source Code Pro", Monaco, Menlo, Consolas, monospace; + +$body-background: #f2f2f2; +$content-background: #fff; +$content-border: #e9e9e9; +$tint-color: #08c; +$object-background: #f9f9f9; +$object-border: #e9e9e9; + +$mobile-max-width: 650px; $desktop-min-width: 768px; \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/css/scss/_xcode.scss b/ricoh-theta-sample-for-iosv2/doc/css/scss/_xcode.scss index 340b1f6..76943ec 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/scss/_xcode.scss +++ b/ricoh-theta-sample-for-iosv2/doc/css/scss/_xcode.scss @@ -1,29 +1,29 @@ -.xcode { - header, aside { - display: none; - } - - .container { - padding: 0; - } - - article { - margin-top: 0; - - #content { - border: 0; - margin: 0; - } - } - - .method-info { - &, .section-method.hide & { - max-height: auto; - overflow: visible; - - &.hiding { - display: block; - } - } - } -} +.xcode { + header, aside { + display: none; + } + + .container { + padding: 0; + } + + article { + margin-top: 0; + + #content { + border: 0; + margin: 0; + } + } + + .method-info { + &, .section-method.hide & { + max-height: auto; + overflow: visible; + + &.hiding { + display: block; + } + } + } +} diff --git a/ricoh-theta-sample-for-iosv2/doc/css/scss/style.scss b/ricoh-theta-sample-for-iosv2/doc/css/scss/style.scss index 648a608..4c6547c 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/scss/style.scss +++ b/ricoh-theta-sample-for-iosv2/doc/css/scss/style.scss @@ -1 +1 @@ -@import "variables", "normalize", "layout", "index", "object", "print", "xcode"; +@import "variables", "normalize", "layout", "index", "object", "print", "xcode"; diff --git a/ricoh-theta-sample-for-iosv2/doc/css/style.css b/ricoh-theta-sample-for-iosv2/doc/css/style.css index 0581a2a..5eae1de 100755 --- a/ricoh-theta-sample-for-iosv2/doc/css/style.css +++ b/ricoh-theta-sample-for-iosv2/doc/css/style.css @@ -1,2 +1,2 @@ -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{box-sizing:border-box}.clear{clear:both}.clearfix:before,.container:before,article #content:before,article #content footer:before,.clearfix:after,.container:after,article #content:after,article #content footer:after{clear:both;display:table;content:""}.xcode .hide-in-xcode{display:none}body{font:62.5% -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;background:#f2f2f2}@media (max-width: 650px){body{background-color:#fff}}h1,h2,h3{font-weight:300;color:#808080}h1{font-size:2em;color:#000}h4{font-size:13px;line-height:1.5;margin:21px 0 0 0}a{color:#08c;text-decoration:none}pre,code{font-family:"Source Code Pro",Monaco,Menlo,Consolas,monospace;word-wrap:break-word}pre>code,.method-declaration code{display:inline-block;font-size:.85em;padding:4px 0 4px 10px;border-left:5px solid rgba(0,155,51,0.2)}pre>code:before,.method-declaration code:before{content:"Objective-C";display:block;font:9px/1 -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;color:#009b33;text-transform:uppercase;letter-spacing:2px;padding-bottom:6px}pre>code{font-size:inherit}table,th,td{border:1px solid #e9e9e9}table{width:100%}th,td{padding:7px}th>:first-child,td>:first-child{margin-top:0}th>:last-child,td>:last-child{margin-bottom:0}.container{max-width:980px;padding:0 10px;margin:0 auto}@media (max-width: 650px){.container{padding:0}}header{position:fixed;top:0;left:0;width:100%;z-index:2;background:#414141;color:#fff;font-size:1.1em;line-height:25px;letter-spacing:.05em}header #library-title{float:left}header #developer-home{float:right}header h1{font-size:inherit;font-weight:inherit;margin:0}header p{margin:0}header h1,header a{color:inherit}@media (max-width: 650px){header .container{padding:0 10px}}aside{position:fixed;top:25px;left:0;width:100%;height:25px;z-index:2;font-size:1.1em}aside #header-buttons{background:rgba(255,255,255,0.8);margin:0 1px;padding:0;list-style:none;text-align:right;line-height:32px}aside #header-buttons li{display:inline-block;cursor:pointer;padding:0 10px}aside #header-buttons label,aside #header-buttons select{cursor:inherit}aside #header-buttons #on-this-page{position:relative}aside #header-buttons #on-this-page .chevron{display:inline-block;width:14px;height:4px;position:relative}aside #header-buttons #on-this-page .chevron .chevy{background:#878787;height:2px;position:absolute;width:10px}aside #header-buttons #on-this-page .chevron .chevy.chevron-left{left:0;transform:rotateZ(45deg) scale(0.6)}aside #header-buttons #on-this-page .chevron .chevy.chevron-right{right:0;transform:rotateZ(-45deg) scale(0.6)}aside #header-buttons #on-this-page #jump-to{opacity:0;font-size:16px;position:absolute;top:5px;left:0;width:100%;height:100%}article{margin-top:25px}article #content{background:#fff;border:1px solid #e9e9e9;padding:15px 25px 30px 25px;font-size:1.4em;line-height:1.45;position:relative}@media (max-width: 650px){article #content{padding:15px 10px 20px 10px;border:none}}article #content .navigation-top{position:absolute;top:15px;right:25px}article #content .title{margin:21px 0 0 0;padding:15px 0}article #content p{color:#414141;margin:0 0 15px 0}article #content th p:last-child,article #content td p:last-child{margin-bottom:0}article #content main ul{list-style:none;margin-left:24px;margin-bottom:12px;padding:0}article #content main ul li{position:relative;padding-left:1.3em}article #content main ul li:before{content:"\02022";color:#414141;font-size:1.08em;line-height:1;position:absolute;left:0;padding-top:2px}article #content footer .footer-copyright{margin:70px 25px 10px 0}article #content footer p{font-size:.71em;color:#a0a0a0}.index-container{-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.index-container{display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap}}.index-container .index-column{-webkit-flex:1 1 33%;flex:1 1 33%}.section-specification table{width:auto}.section-specification table th{text-align:left}.method-title{margin-left:-15px;margin-bottom:8px;transition:margin-left .3s ease-out}.section-method.hide .method-title{margin-left:0}.method-title code{font-weight:400;font-size:.85em}.method-info{background:#f9f9f9;border-bottom:1px solid #e9e9e9;margin:0 -25px;padding:20px 25px 0 25px;transition:height .3s ease-out;position:relative}.method-info .pointy-thing{background:#fff;height:10px;border-bottom:1px solid #e9e9e9;margin:-20px -25px 16px -25px}.method-info .pointy-thing:before{display:inline-block;content:"";background:#f9f9f9;border:1px solid #e9e9e9;border-bottom:0;border-right:0;position:absolute;left:21px;top:3px;width:12px;height:12px;transform:rotate(45deg)}.method-info .method-subsection{margin-bottom:15px}.method-info .method-subsection .argument-name{width:1px;text-align:right}.method-info .method-subsection .argument-name code{color:#808080;font-style:italic;font-weight:400}.section-method.hide .method-info{height:0 !important;overflow:hidden;display:none}.section-method.hide.animating .method-info{display:block}.section-method.animating .method-info{overflow:hidden}@media print{body{background:#fff;padding:8px}header{position:static;background:#fff;color:#000}aside{display:none}.container{max-width:none;padding:0}article{margin-top:0}article #content{border:0;background:#fff;padding:15px 0 0 0}article #content .title{margin-top:0;padding-top:0}.method-info,.method-info .pointy-thing{background:#fff}}.xcode header,.xcode aside{display:none}.xcode .container{padding:0}.xcode article{margin-top:0}.xcode article #content{border:0;margin:0}.xcode .method-info,.section-method.hide .xcode .method-info{max-height:auto;overflow:visible}.xcode .method-info.hiding,.section-method.hide .xcode .method-info.hiding{display:block} - +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{box-sizing:border-box}.clear{clear:both}.clearfix:before,.container:before,article #content:before,article #content footer:before,.clearfix:after,.container:after,article #content:after,article #content footer:after{clear:both;display:table;content:""}.xcode .hide-in-xcode{display:none}body{font:62.5% -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;background:#f2f2f2}@media (max-width: 650px){body{background-color:#fff}}h1,h2,h3{font-weight:300;color:#808080}h1{font-size:2em;color:#000}h4{font-size:13px;line-height:1.5;margin:21px 0 0 0}a{color:#08c;text-decoration:none}pre,code{font-family:"Source Code Pro",Monaco,Menlo,Consolas,monospace;word-wrap:break-word}pre>code,.method-declaration code{display:inline-block;font-size:.85em;padding:4px 0 4px 10px;border-left:5px solid rgba(0,155,51,0.2)}pre>code:before,.method-declaration code:before{content:"Objective-C";display:block;font:9px/1 -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;color:#009b33;text-transform:uppercase;letter-spacing:2px;padding-bottom:6px}pre>code{font-size:inherit}table,th,td{border:1px solid #e9e9e9}table{width:100%}th,td{padding:7px}th>:first-child,td>:first-child{margin-top:0}th>:last-child,td>:last-child{margin-bottom:0}.container{max-width:980px;padding:0 10px;margin:0 auto}@media (max-width: 650px){.container{padding:0}}header{position:fixed;top:0;left:0;width:100%;z-index:2;background:#414141;color:#fff;font-size:1.1em;line-height:25px;letter-spacing:.05em}header #library-title{float:left}header #developer-home{float:right}header h1{font-size:inherit;font-weight:inherit;margin:0}header p{margin:0}header h1,header a{color:inherit}@media (max-width: 650px){header .container{padding:0 10px}}aside{position:fixed;top:25px;left:0;width:100%;height:25px;z-index:2;font-size:1.1em}aside #header-buttons{background:rgba(255,255,255,0.8);margin:0 1px;padding:0;list-style:none;text-align:right;line-height:32px}aside #header-buttons li{display:inline-block;cursor:pointer;padding:0 10px}aside #header-buttons label,aside #header-buttons select{cursor:inherit}aside #header-buttons #on-this-page{position:relative}aside #header-buttons #on-this-page .chevron{display:inline-block;width:14px;height:4px;position:relative}aside #header-buttons #on-this-page .chevron .chevy{background:#878787;height:2px;position:absolute;width:10px}aside #header-buttons #on-this-page .chevron .chevy.chevron-left{left:0;transform:rotateZ(45deg) scale(0.6)}aside #header-buttons #on-this-page .chevron .chevy.chevron-right{right:0;transform:rotateZ(-45deg) scale(0.6)}aside #header-buttons #on-this-page #jump-to{opacity:0;font-size:16px;position:absolute;top:5px;left:0;width:100%;height:100%}article{margin-top:25px}article #content{background:#fff;border:1px solid #e9e9e9;padding:15px 25px 30px 25px;font-size:1.4em;line-height:1.45;position:relative}@media (max-width: 650px){article #content{padding:15px 10px 20px 10px;border:none}}article #content .navigation-top{position:absolute;top:15px;right:25px}article #content .title{margin:21px 0 0 0;padding:15px 0}article #content p{color:#414141;margin:0 0 15px 0}article #content th p:last-child,article #content td p:last-child{margin-bottom:0}article #content main ul{list-style:none;margin-left:24px;margin-bottom:12px;padding:0}article #content main ul li{position:relative;padding-left:1.3em}article #content main ul li:before{content:"\02022";color:#414141;font-size:1.08em;line-height:1;position:absolute;left:0;padding-top:2px}article #content footer .footer-copyright{margin:70px 25px 10px 0}article #content footer p{font-size:.71em;color:#a0a0a0}.index-container{-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.index-container{display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap}}.index-container .index-column{-webkit-flex:1 1 33%;flex:1 1 33%}.section-specification table{width:auto}.section-specification table th{text-align:left}.method-title{margin-left:-15px;margin-bottom:8px;transition:margin-left .3s ease-out}.section-method.hide .method-title{margin-left:0}.method-title code{font-weight:400;font-size:.85em}.method-info{background:#f9f9f9;border-bottom:1px solid #e9e9e9;margin:0 -25px;padding:20px 25px 0 25px;transition:height .3s ease-out;position:relative}.method-info .pointy-thing{background:#fff;height:10px;border-bottom:1px solid #e9e9e9;margin:-20px -25px 16px -25px}.method-info .pointy-thing:before{display:inline-block;content:"";background:#f9f9f9;border:1px solid #e9e9e9;border-bottom:0;border-right:0;position:absolute;left:21px;top:3px;width:12px;height:12px;transform:rotate(45deg)}.method-info .method-subsection{margin-bottom:15px}.method-info .method-subsection .argument-name{width:1px;text-align:right}.method-info .method-subsection .argument-name code{color:#808080;font-style:italic;font-weight:400}.section-method.hide .method-info{height:0 !important;overflow:hidden;display:none}.section-method.hide.animating .method-info{display:block}.section-method.animating .method-info{overflow:hidden}@media print{body{background:#fff;padding:8px}header{position:static;background:#fff;color:#000}aside{display:none}.container{max-width:none;padding:0}article{margin-top:0}article #content{border:0;background:#fff;padding:15px 0 0 0}article #content .title{margin-top:0;padding-top:0}.method-info,.method-info .pointy-thing{background:#fff}}.xcode header,.xcode aside{display:none}.xcode .container{padding:0}.xcode article{margin-top:0}.xcode article #content{border:0;margin:0}.xcode .method-info,.section-method.hide .xcode .method-info{max-height:auto;overflow:visible}.xcode .method-info.hiding,.section-method.hide .xcode .method-info.hiding{display:block} + diff --git a/ricoh-theta-sample-for-iosv2/doc/hierarchy.html b/ricoh-theta-sample-for-iosv2/doc/hierarchy.html index 5e36835..2e5b586 100755 --- a/ricoh-theta-sample-for-iosv2/doc/hierarchy.html +++ b/ricoh-theta-sample-for-iosv2/doc/hierarchy.html @@ -1,117 +1,117 @@ - - - - - - RICOH THETA SDK Sample Code Hierarchy - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

RICOH THETA SDK Sample Code Hierarchy

- - -
-

Class Hierarchy

- - - -
- - - - - -
-
-
-
- - - + + + + + + RICOH THETA SDK Sample Code Hierarchy + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

RICOH THETA SDK Sample Code Hierarchy

+ + +
+

Class Hierarchy

+ + + +
+ + + + + +
+
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/index.html b/ricoh-theta-sample-for-iosv2/doc/index.html index 5a8eb2e..0247e8b 100755 --- a/ricoh-theta-sample-for-iosv2/doc/index.html +++ b/ricoh-theta-sample-for-iosv2/doc/index.html @@ -1,103 +1,103 @@ - - - - - - RICOH THETA SDK Sample Code Reference - - - - - - -
-
- -

- RICOH THETA SDK Sample Code -

- -

- RICOH -

- -
-
- - - -
-
-
-
-

RICOH THETA SDK Sample Code Reference

- - - - - - -
-
-
-
- - - + + + + + + RICOH THETA SDK Sample Code Reference + + + + + + +
+
+ +

+ RICOH THETA SDK Sample Code +

+ +

+ RICOH +

+ +
+
+ + + +
+
+
+
+

RICOH THETA SDK Sample Code Reference

+ + + + + + +
+
+
+
+ + + \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/doc/js/script.js b/ricoh-theta-sample-for-iosv2/doc/js/script.js index 4074361..9652bbe 100755 --- a/ricoh-theta-sample-for-iosv2/doc/js/script.js +++ b/ricoh-theta-sample-for-iosv2/doc/js/script.js @@ -1,59 +1,59 @@ -function $() { - return document.querySelector.apply(document, arguments); -} - -if (navigator.userAgent.indexOf("Xcode") != -1) { - document.documentElement.classList.add("xcode"); -} - -var jumpTo = $("#jump-to"); - -if (jumpTo) { - jumpTo.addEventListener("change", function(e) { - location.hash = this.options[this.selectedIndex].value; - }); -} - -function hashChanged() { - if (/^#\/\/api\//.test(location.hash)) { - var element = document.querySelector("a[name='" + location.hash.substring(1) + "']"); - - if (!element) { - return; - } - - element = element.parentNode; - - element.classList.remove("hide"); - fixScrollPosition(element); - } -} - -function fixScrollPosition(element) { - var scrollTop = element.offsetTop - 150; - document.documentElement.scrollTop = scrollTop; - document.body.scrollTop = scrollTop; -} - -[].forEach.call(document.querySelectorAll(".section-method"), function(element) { - element.classList.add("hide"); - - element.querySelector(".method-title a").addEventListener("click", function(e) { - var info = element.querySelector(".method-info"), - infoContainer = element.querySelector(".method-info-container"); - - element.classList.add("animating"); - info.style.height = (infoContainer.clientHeight + 40) + "px"; - fixScrollPosition(element); - element.classList.toggle("hide"); - if (element.classList.contains("hide")) { - e.preventDefault(); - } - setTimeout(function() { - element.classList.remove("animating"); - }, 300); - }); -}); - -window.addEventListener("hashchange", hashChanged); -hashChanged(); +function $() { + return document.querySelector.apply(document, arguments); +} + +if (navigator.userAgent.indexOf("Xcode") != -1) { + document.documentElement.classList.add("xcode"); +} + +var jumpTo = $("#jump-to"); + +if (jumpTo) { + jumpTo.addEventListener("change", function(e) { + location.hash = this.options[this.selectedIndex].value; + }); +} + +function hashChanged() { + if (/^#\/\/api\//.test(location.hash)) { + var element = document.querySelector("a[name='" + location.hash.substring(1) + "']"); + + if (!element) { + return; + } + + element = element.parentNode; + + element.classList.remove("hide"); + fixScrollPosition(element); + } +} + +function fixScrollPosition(element) { + var scrollTop = element.offsetTop - 150; + document.documentElement.scrollTop = scrollTop; + document.body.scrollTop = scrollTop; +} + +[].forEach.call(document.querySelectorAll(".section-method"), function(element) { + element.classList.add("hide"); + + element.querySelector(".method-title a").addEventListener("click", function(e) { + var info = element.querySelector(".method-info"), + infoContainer = element.querySelector(".method-info-container"); + + element.classList.add("animating"); + info.style.height = (infoContainer.clientHeight + 40) + "px"; + fixScrollPosition(element); + element.classList.toggle("hide"); + if (element.classList.contains("hide")) { + e.preventDefault(); + } + setTimeout(function() { + element.classList.remove("animating"); + }, 300); + }); +}); + +window.addEventListener("hashchange", hashChanged); +hashChanged(); diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.pbxproj b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.pbxproj index 31aa8ce..99889e2 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.pbxproj +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.pbxproj @@ -1,434 +1,434 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 2269A62416D74D9600A1D342 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2269A62316D74D9600A1D342 /* ImageIO.framework */; }; - 22CA6B4916DB32CC001EB1FF /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22CA6B4816DB32CC001EB1FF /* Accelerate.framework */; }; - 22F963A616D746850007DF95 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22F963A516D746850007DF95 /* UIKit.framework */; }; - 22F963A816D746850007DF95 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22F963A716D746850007DF95 /* Foundation.framework */; }; - 22F963AA16D746850007DF95 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22F963A916D746850007DF95 /* CoreGraphics.framework */; }; - 3E437EFD1A1B9597003FA39E /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E437EFC1A1B9597003FA39E /* GLKit.framework */; }; - 3E437EFF1A1B95A6003FA39E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E437EFE1A1B95A6003FA39E /* OpenGLES.framework */; }; - FAA82EB71BFCABE5000C0F87 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FAA82EB51BFCABE5000C0F87 /* MainStoryboard.storyboard */; }; - FAA82EBA1BFCABF7000C0F87 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = FAA82EB81BFCABF7000C0F87 /* InfoPlist.strings */; }; - FABFAFDA1BFCA10500937B1D /* HttpConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFCB1BFCA10500937B1D /* HttpConnection.m */; }; - FABFAFDB1BFCA10500937B1D /* HttpDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFCD1BFCA10500937B1D /* HttpDeviceInfo.m */; }; - FABFAFDC1BFCA10500937B1D /* HttpFileList.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFCF1BFCA10500937B1D /* HttpFileList.m */; }; - FABFAFDD1BFCA10500937B1D /* HttpImageInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD11BFCA10500937B1D /* HttpImageInfo.m */; }; - FABFAFDE1BFCA10500937B1D /* HttpSession.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD31BFCA10500937B1D /* HttpSession.m */; }; - FABFAFDF1BFCA10500937B1D /* HttpStatusTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD51BFCA10500937B1D /* HttpStatusTimer.m */; }; - FABFAFE01BFCA10500937B1D /* HttpStorageInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD71BFCA10500937B1D /* HttpStorageInfo.m */; }; - FABFAFE11BFCA10500937B1D /* HttpStream.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD91BFCA10500937B1D /* HttpStream.m */; }; - FABFAFE81BFCA16C00937B1D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FABFAFE21BFCA16C00937B1D /* Default-568h@2x.png */; }; - FABFAFE91BFCA16C00937B1D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FABFAFE31BFCA16C00937B1D /* Default.png */; }; - FABFAFEA1BFCA16C00937B1D /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FABFAFE41BFCA16C00937B1D /* Default@2x.png */; }; - FABFAFEB1BFCA16C00937B1D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFE51BFCA16C00937B1D /* main.m */; }; - FABFAFEC1BFCA16C00937B1D /* nothumb.png in Resources */ = {isa = PBXBuildFile; fileRef = FABFAFE61BFCA16C00937B1D /* nothumb.png */; }; - FABFB0011BFCA36200937B1D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFEF1BFCA36200937B1D /* AppDelegate.m */; }; - FABFB0021BFCA36200937B1D /* glkViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFF21BFCA36200937B1D /* glkViewController.m */; }; - FABFB0031BFCA36200937B1D /* GLRenderView.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFF41BFCA36200937B1D /* GLRenderView.m */; }; - FABFB0041BFCA36200937B1D /* ImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFF61BFCA36200937B1D /* ImageViewController.m */; }; - FABFB0051BFCA36200937B1D /* SphereXmp.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFF81BFCA36200937B1D /* SphereXmp.m */; }; - FABFB0061BFCA36200937B1D /* TableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFFA1BFCA36200937B1D /* TableCell.m */; }; - FABFB0071BFCA36200937B1D /* TableCellObject.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFFC1BFCA36200937B1D /* TableCellObject.m */; }; - FABFB0081BFCA36200937B1D /* UVSphere.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFFE1BFCA36200937B1D /* UVSphere.m */; }; - FABFB0091BFCA36200937B1D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFB0001BFCA36200937B1D /* ViewController.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 2269A62316D74D9600A1D342 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; - 22CA6B4816DB32CC001EB1FF /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; - 22F963A216D746850007DF95 /* ricoh-theta-sample-for-iosv2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ricoh-theta-sample-for-iosv2.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 22F963A516D746850007DF95 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 22F963A716D746850007DF95 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 22F963A916D746850007DF95 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 3E437EFC1A1B9597003FA39E /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; - 3E437EFE1A1B95A6003FA39E /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - FAA82EB61BFCABE5000C0F87 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; - FAA82EB91BFCABF7000C0F87 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - FABFAFCA1BFCA10500937B1D /* HttpConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpConnection.h; path = "ricoh-theta-sample-for-iosv2/http/HttpConnection.h"; sourceTree = SOURCE_ROOT; }; - FABFAFCB1BFCA10500937B1D /* HttpConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpConnection.m; path = "ricoh-theta-sample-for-iosv2/http/HttpConnection.m"; sourceTree = SOURCE_ROOT; }; - FABFAFCC1BFCA10500937B1D /* HttpDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpDeviceInfo.h; path = "ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.h"; sourceTree = SOURCE_ROOT; }; - FABFAFCD1BFCA10500937B1D /* HttpDeviceInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpDeviceInfo.m; path = "ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.m"; sourceTree = SOURCE_ROOT; }; - FABFAFCE1BFCA10500937B1D /* HttpFileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpFileList.h; path = "ricoh-theta-sample-for-iosv2/http/HttpFileList.h"; sourceTree = SOURCE_ROOT; }; - FABFAFCF1BFCA10500937B1D /* HttpFileList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpFileList.m; path = "ricoh-theta-sample-for-iosv2/http/HttpFileList.m"; sourceTree = SOURCE_ROOT; }; - FABFAFD01BFCA10500937B1D /* HttpImageInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpImageInfo.h; path = "ricoh-theta-sample-for-iosv2/http/HttpImageInfo.h"; sourceTree = SOURCE_ROOT; }; - FABFAFD11BFCA10500937B1D /* HttpImageInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpImageInfo.m; path = "ricoh-theta-sample-for-iosv2/http/HttpImageInfo.m"; sourceTree = SOURCE_ROOT; }; - FABFAFD21BFCA10500937B1D /* HttpSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpSession.h; path = "ricoh-theta-sample-for-iosv2/http/HttpSession.h"; sourceTree = SOURCE_ROOT; }; - FABFAFD31BFCA10500937B1D /* HttpSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpSession.m; path = "ricoh-theta-sample-for-iosv2/http/HttpSession.m"; sourceTree = SOURCE_ROOT; }; - FABFAFD41BFCA10500937B1D /* HttpStatusTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpStatusTimer.h; path = "ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.h"; sourceTree = SOURCE_ROOT; }; - FABFAFD51BFCA10500937B1D /* HttpStatusTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpStatusTimer.m; path = "ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.m"; sourceTree = SOURCE_ROOT; }; - FABFAFD61BFCA10500937B1D /* HttpStorageInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpStorageInfo.h; path = "ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.h"; sourceTree = SOURCE_ROOT; }; - FABFAFD71BFCA10500937B1D /* HttpStorageInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpStorageInfo.m; path = "ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.m"; sourceTree = SOURCE_ROOT; }; - FABFAFD81BFCA10500937B1D /* HttpStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpStream.h; path = "ricoh-theta-sample-for-iosv2/http/HttpStream.h"; sourceTree = SOURCE_ROOT; }; - FABFAFD91BFCA10500937B1D /* HttpStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpStream.m; path = "ricoh-theta-sample-for-iosv2/http/HttpStream.m"; sourceTree = SOURCE_ROOT; }; - FABFAFE21BFCA16C00937B1D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "ricoh-theta-sample-for-iosv2/Default-568h@2x.png"; sourceTree = SOURCE_ROOT; }; - FABFAFE31BFCA16C00937B1D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = "ricoh-theta-sample-for-iosv2/Default.png"; sourceTree = SOURCE_ROOT; }; - FABFAFE41BFCA16C00937B1D /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "ricoh-theta-sample-for-iosv2/Default@2x.png"; sourceTree = SOURCE_ROOT; }; - FABFAFE51BFCA16C00937B1D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "ricoh-theta-sample-for-iosv2/main.m"; sourceTree = SOURCE_ROOT; }; - FABFAFE61BFCA16C00937B1D /* nothumb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = nothumb.png; path = "ricoh-theta-sample-for-iosv2/nothumb.png"; sourceTree = SOURCE_ROOT; }; - FABFAFE71BFCA16C00937B1D /* ricoh-theta-sample-for-iosv2-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "ricoh-theta-sample-for-iosv2-Info.plist"; path = "ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist"; sourceTree = SOURCE_ROOT; }; - FABFAFEE1BFCA36200937B1D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "ricoh-theta-sample-for-iosv2/AppDelegate.h"; sourceTree = SOURCE_ROOT; }; - FABFAFEF1BFCA36200937B1D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "ricoh-theta-sample-for-iosv2/AppDelegate.m"; sourceTree = SOURCE_ROOT; }; - FABFAFF01BFCA36200937B1D /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Constants.h; path = "ricoh-theta-sample-for-iosv2/Constants.h"; sourceTree = SOURCE_ROOT; }; - FABFAFF11BFCA36200937B1D /* glkViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glkViewController.h; path = "ricoh-theta-sample-for-iosv2/glkViewController.h"; sourceTree = SOURCE_ROOT; }; - FABFAFF21BFCA36200937B1D /* glkViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = glkViewController.m; path = "ricoh-theta-sample-for-iosv2/glkViewController.m"; sourceTree = SOURCE_ROOT; }; - FABFAFF31BFCA36200937B1D /* GLRenderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLRenderView.h; path = "ricoh-theta-sample-for-iosv2/GLRenderView.h"; sourceTree = SOURCE_ROOT; }; - FABFAFF41BFCA36200937B1D /* GLRenderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GLRenderView.m; path = "ricoh-theta-sample-for-iosv2/GLRenderView.m"; sourceTree = SOURCE_ROOT; }; - FABFAFF51BFCA36200937B1D /* ImageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ImageViewController.h; path = "ricoh-theta-sample-for-iosv2/ImageViewController.h"; sourceTree = SOURCE_ROOT; }; - FABFAFF61BFCA36200937B1D /* ImageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImageViewController.m; path = "ricoh-theta-sample-for-iosv2/ImageViewController.m"; sourceTree = SOURCE_ROOT; }; - FABFAFF71BFCA36200937B1D /* SphereXmp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SphereXmp.h; path = "ricoh-theta-sample-for-iosv2/SphereXmp.h"; sourceTree = SOURCE_ROOT; }; - FABFAFF81BFCA36200937B1D /* SphereXmp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SphereXmp.m; path = "ricoh-theta-sample-for-iosv2/SphereXmp.m"; sourceTree = SOURCE_ROOT; }; - FABFAFF91BFCA36200937B1D /* TableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableCell.h; path = "ricoh-theta-sample-for-iosv2/TableCell.h"; sourceTree = SOURCE_ROOT; }; - FABFAFFA1BFCA36200937B1D /* TableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TableCell.m; path = "ricoh-theta-sample-for-iosv2/TableCell.m"; sourceTree = SOURCE_ROOT; }; - FABFAFFB1BFCA36200937B1D /* TableCellObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableCellObject.h; path = "ricoh-theta-sample-for-iosv2/TableCellObject.h"; sourceTree = SOURCE_ROOT; }; - FABFAFFC1BFCA36200937B1D /* TableCellObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TableCellObject.m; path = "ricoh-theta-sample-for-iosv2/TableCellObject.m"; sourceTree = SOURCE_ROOT; }; - FABFAFFD1BFCA36200937B1D /* UVSphere.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UVSphere.h; path = "ricoh-theta-sample-for-iosv2/UVSphere.h"; sourceTree = SOURCE_ROOT; }; - FABFAFFE1BFCA36200937B1D /* UVSphere.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UVSphere.m; path = "ricoh-theta-sample-for-iosv2/UVSphere.m"; sourceTree = SOURCE_ROOT; }; - FABFAFFF1BFCA36200937B1D /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewController.h; path = "ricoh-theta-sample-for-iosv2/ViewController.h"; sourceTree = SOURCE_ROOT; }; - FABFB0001BFCA36200937B1D /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ViewController.m; path = "ricoh-theta-sample-for-iosv2/ViewController.m"; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 22F9639F16D746850007DF95 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E437EFF1A1B95A6003FA39E /* OpenGLES.framework in Frameworks */, - 3E437EFD1A1B9597003FA39E /* GLKit.framework in Frameworks */, - 22CA6B4916DB32CC001EB1FF /* Accelerate.framework in Frameworks */, - 22F963AA16D746850007DF95 /* CoreGraphics.framework in Frameworks */, - 22F963A816D746850007DF95 /* Foundation.framework in Frameworks */, - 2269A62416D74D9600A1D342 /* ImageIO.framework in Frameworks */, - 22F963A616D746850007DF95 /* UIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 22F9639916D746850007DF95 = { - isa = PBXGroup; - children = ( - 22F963AB16D746850007DF95 /* ricoh-theta-sample-for-iosv2 */, - 22F963A416D746850007DF95 /* Frameworks */, - 22F963A316D746850007DF95 /* Products */, - ); - sourceTree = ""; - }; - 22F963A316D746850007DF95 /* Products */ = { - isa = PBXGroup; - children = ( - 22F963A216D746850007DF95 /* ricoh-theta-sample-for-iosv2.app */, - ); - name = Products; - sourceTree = ""; - }; - 22F963A416D746850007DF95 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3E437EFE1A1B95A6003FA39E /* OpenGLES.framework */, - 3E437EFC1A1B9597003FA39E /* GLKit.framework */, - 22CA6B4816DB32CC001EB1FF /* Accelerate.framework */, - 22F963A916D746850007DF95 /* CoreGraphics.framework */, - 2269A62316D74D9600A1D342 /* ImageIO.framework */, - 22F963A716D746850007DF95 /* Foundation.framework */, - 22F963A516D746850007DF95 /* UIKit.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 22F963AB16D746850007DF95 /* ricoh-theta-sample-for-iosv2 */ = { - isa = PBXGroup; - children = ( - FAA82EB51BFCABE5000C0F87 /* MainStoryboard.storyboard */, - FABFAFEE1BFCA36200937B1D /* AppDelegate.h */, - FABFAFEF1BFCA36200937B1D /* AppDelegate.m */, - FABFAFF01BFCA36200937B1D /* Constants.h */, - FABFAFF11BFCA36200937B1D /* glkViewController.h */, - FABFAFF21BFCA36200937B1D /* glkViewController.m */, - FABFAFF31BFCA36200937B1D /* GLRenderView.h */, - FABFAFF41BFCA36200937B1D /* GLRenderView.m */, - FABFAFF51BFCA36200937B1D /* ImageViewController.h */, - FABFAFF61BFCA36200937B1D /* ImageViewController.m */, - FABFAFF71BFCA36200937B1D /* SphereXmp.h */, - FABFAFF81BFCA36200937B1D /* SphereXmp.m */, - FABFAFF91BFCA36200937B1D /* TableCell.h */, - FABFAFFA1BFCA36200937B1D /* TableCell.m */, - FABFAFFB1BFCA36200937B1D /* TableCellObject.h */, - FABFAFFC1BFCA36200937B1D /* TableCellObject.m */, - FABFAFFD1BFCA36200937B1D /* UVSphere.h */, - FABFAFFE1BFCA36200937B1D /* UVSphere.m */, - FABFAFFF1BFCA36200937B1D /* ViewController.h */, - FABFB0001BFCA36200937B1D /* ViewController.m */, - FA8DADBB1BFC1ECE003C5EA2 /* http */, - 22F963AC16D746850007DF95 /* Supporting Files */, - ); - path = "ricoh-theta-sample-for-iosv2"; - sourceTree = ""; - }; - 22F963AC16D746850007DF95 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - FAA82EB81BFCABF7000C0F87 /* InfoPlist.strings */, - FABFAFE21BFCA16C00937B1D /* Default-568h@2x.png */, - FABFAFE31BFCA16C00937B1D /* Default.png */, - FABFAFE41BFCA16C00937B1D /* Default@2x.png */, - FABFAFE51BFCA16C00937B1D /* main.m */, - FABFAFE61BFCA16C00937B1D /* nothumb.png */, - FABFAFE71BFCA16C00937B1D /* ricoh-theta-sample-for-iosv2-Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - FA8DADBB1BFC1ECE003C5EA2 /* http */ = { - isa = PBXGroup; - children = ( - FABFAFCA1BFCA10500937B1D /* HttpConnection.h */, - FABFAFCB1BFCA10500937B1D /* HttpConnection.m */, - FABFAFCC1BFCA10500937B1D /* HttpDeviceInfo.h */, - FABFAFCD1BFCA10500937B1D /* HttpDeviceInfo.m */, - FABFAFCE1BFCA10500937B1D /* HttpFileList.h */, - FABFAFCF1BFCA10500937B1D /* HttpFileList.m */, - FABFAFD01BFCA10500937B1D /* HttpImageInfo.h */, - FABFAFD11BFCA10500937B1D /* HttpImageInfo.m */, - FABFAFD21BFCA10500937B1D /* HttpSession.h */, - FABFAFD31BFCA10500937B1D /* HttpSession.m */, - FABFAFD41BFCA10500937B1D /* HttpStatusTimer.h */, - FABFAFD51BFCA10500937B1D /* HttpStatusTimer.m */, - FABFAFD61BFCA10500937B1D /* HttpStorageInfo.h */, - FABFAFD71BFCA10500937B1D /* HttpStorageInfo.m */, - FABFAFD81BFCA10500937B1D /* HttpStream.h */, - FABFAFD91BFCA10500937B1D /* HttpStream.m */, - ); - name = http; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 22F963A116D746850007DF95 /* ricoh-theta-sample-for-iosv2 */ = { - isa = PBXNativeTarget; - buildConfigurationList = 22F963C516D746860007DF95 /* Build configuration list for PBXNativeTarget "ricoh-theta-sample-for-iosv2" */; - buildPhases = ( - 22F9639E16D746850007DF95 /* Sources */, - 22F9639F16D746850007DF95 /* Frameworks */, - 22F963A016D746850007DF95 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "ricoh-theta-sample-for-iosv2"; - productName = "ricoh-theta-sample-for-ios"; - productReference = 22F963A216D746850007DF95 /* ricoh-theta-sample-for-iosv2.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 22F9639A16D746850007DF95 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0700; - }; - buildConfigurationList = 22F9639D16D746850007DF95 /* Build configuration list for PBXProject "ricoh-theta-sample-for-iosv2" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 22F9639916D746850007DF95; - productRefGroup = 22F963A316D746850007DF95 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 22F963A116D746850007DF95 /* ricoh-theta-sample-for-iosv2 */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 22F963A016D746850007DF95 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FAA82EBA1BFCABF7000C0F87 /* InfoPlist.strings in Resources */, - FABFAFEC1BFCA16C00937B1D /* nothumb.png in Resources */, - FABFAFE91BFCA16C00937B1D /* Default.png in Resources */, - FABFAFEA1BFCA16C00937B1D /* Default@2x.png in Resources */, - FAA82EB71BFCABE5000C0F87 /* MainStoryboard.storyboard in Resources */, - FABFAFE81BFCA16C00937B1D /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 22F9639E16D746850007DF95 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FABFB0011BFCA36200937B1D /* AppDelegate.m in Sources */, - FABFB0031BFCA36200937B1D /* GLRenderView.m in Sources */, - FABFAFDA1BFCA10500937B1D /* HttpConnection.m in Sources */, - FABFB0041BFCA36200937B1D /* ImageViewController.m in Sources */, - FABFAFDB1BFCA10500937B1D /* HttpDeviceInfo.m in Sources */, - FABFB0071BFCA36200937B1D /* TableCellObject.m in Sources */, - FABFB0061BFCA36200937B1D /* TableCell.m in Sources */, - FABFB0091BFCA36200937B1D /* ViewController.m in Sources */, - FABFB0021BFCA36200937B1D /* glkViewController.m in Sources */, - FABFAFDE1BFCA10500937B1D /* HttpSession.m in Sources */, - FABFAFEB1BFCA16C00937B1D /* main.m in Sources */, - FABFAFDD1BFCA10500937B1D /* HttpImageInfo.m in Sources */, - FABFB0081BFCA36200937B1D /* UVSphere.m in Sources */, - FABFAFDF1BFCA10500937B1D /* HttpStatusTimer.m in Sources */, - FABFAFE11BFCA10500937B1D /* HttpStream.m in Sources */, - FABFAFE01BFCA10500937B1D /* HttpStorageInfo.m in Sources */, - FABFAFDC1BFCA10500937B1D /* HttpFileList.m in Sources */, - FABFB0051BFCA36200937B1D /* SphereXmp.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - FAA82EB51BFCABE5000C0F87 /* MainStoryboard.storyboard */ = { - isa = PBXVariantGroup; - children = ( - FAA82EB61BFCABE5000C0F87 /* en */, - ); - name = MainStoryboard.storyboard; - sourceTree = ""; - }; - FAA82EB81BFCABF7000C0F87 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - FAA82EB91BFCABF7000C0F87 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 22F963C316D746860007DF95 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 22F963C416D746860007DF95 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 22F963C616D746860007DF95 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - INFOPLIST_FILE = "$(SRCROOT)/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - PRODUCT_BUNDLE_IDENTIFIER = "com.theta360.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "ricoh-theta-sample-for-iosv2"; - PROVISIONING_PROFILE = ""; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 22F963C716D746860007DF95 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - INFOPLIST_FILE = "$(SRCROOT)/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - PRODUCT_BUNDLE_IDENTIFIER = "com.theta360.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "ricoh-theta-sample-for-iosv2"; - PROVISIONING_PROFILE = ""; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 22F9639D16D746850007DF95 /* Build configuration list for PBXProject "ricoh-theta-sample-for-iosv2" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 22F963C316D746860007DF95 /* Debug */, - 22F963C416D746860007DF95 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 22F963C516D746860007DF95 /* Build configuration list for PBXNativeTarget "ricoh-theta-sample-for-iosv2" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 22F963C616D746860007DF95 /* Debug */, - 22F963C716D746860007DF95 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 22F9639A16D746850007DF95 /* Project object */; -} +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2269A62416D74D9600A1D342 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2269A62316D74D9600A1D342 /* ImageIO.framework */; }; + 22CA6B4916DB32CC001EB1FF /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22CA6B4816DB32CC001EB1FF /* Accelerate.framework */; }; + 22F963A616D746850007DF95 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22F963A516D746850007DF95 /* UIKit.framework */; }; + 22F963A816D746850007DF95 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22F963A716D746850007DF95 /* Foundation.framework */; }; + 22F963AA16D746850007DF95 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22F963A916D746850007DF95 /* CoreGraphics.framework */; }; + 3E437EFD1A1B9597003FA39E /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E437EFC1A1B9597003FA39E /* GLKit.framework */; }; + 3E437EFF1A1B95A6003FA39E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E437EFE1A1B95A6003FA39E /* OpenGLES.framework */; }; + FAA82EB71BFCABE5000C0F87 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FAA82EB51BFCABE5000C0F87 /* MainStoryboard.storyboard */; }; + FAA82EBA1BFCABF7000C0F87 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = FAA82EB81BFCABF7000C0F87 /* InfoPlist.strings */; }; + FABFAFDA1BFCA10500937B1D /* HttpConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFCB1BFCA10500937B1D /* HttpConnection.m */; }; + FABFAFDB1BFCA10500937B1D /* HttpDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFCD1BFCA10500937B1D /* HttpDeviceInfo.m */; }; + FABFAFDC1BFCA10500937B1D /* HttpFileList.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFCF1BFCA10500937B1D /* HttpFileList.m */; }; + FABFAFDD1BFCA10500937B1D /* HttpImageInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD11BFCA10500937B1D /* HttpImageInfo.m */; }; + FABFAFDE1BFCA10500937B1D /* HttpSession.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD31BFCA10500937B1D /* HttpSession.m */; }; + FABFAFDF1BFCA10500937B1D /* HttpStatusTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD51BFCA10500937B1D /* HttpStatusTimer.m */; }; + FABFAFE01BFCA10500937B1D /* HttpStorageInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD71BFCA10500937B1D /* HttpStorageInfo.m */; }; + FABFAFE11BFCA10500937B1D /* HttpStream.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFD91BFCA10500937B1D /* HttpStream.m */; }; + FABFAFE81BFCA16C00937B1D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FABFAFE21BFCA16C00937B1D /* Default-568h@2x.png */; }; + FABFAFE91BFCA16C00937B1D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FABFAFE31BFCA16C00937B1D /* Default.png */; }; + FABFAFEA1BFCA16C00937B1D /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FABFAFE41BFCA16C00937B1D /* Default@2x.png */; }; + FABFAFEB1BFCA16C00937B1D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFE51BFCA16C00937B1D /* main.m */; }; + FABFAFEC1BFCA16C00937B1D /* nothumb.png in Resources */ = {isa = PBXBuildFile; fileRef = FABFAFE61BFCA16C00937B1D /* nothumb.png */; }; + FABFB0011BFCA36200937B1D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFEF1BFCA36200937B1D /* AppDelegate.m */; }; + FABFB0021BFCA36200937B1D /* glkViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFF21BFCA36200937B1D /* glkViewController.m */; }; + FABFB0031BFCA36200937B1D /* GLRenderView.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFF41BFCA36200937B1D /* GLRenderView.m */; }; + FABFB0041BFCA36200937B1D /* ImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFF61BFCA36200937B1D /* ImageViewController.m */; }; + FABFB0051BFCA36200937B1D /* SphereXmp.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFF81BFCA36200937B1D /* SphereXmp.m */; }; + FABFB0061BFCA36200937B1D /* TableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFFA1BFCA36200937B1D /* TableCell.m */; }; + FABFB0071BFCA36200937B1D /* TableCellObject.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFFC1BFCA36200937B1D /* TableCellObject.m */; }; + FABFB0081BFCA36200937B1D /* UVSphere.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFAFFE1BFCA36200937B1D /* UVSphere.m */; }; + FABFB0091BFCA36200937B1D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FABFB0001BFCA36200937B1D /* ViewController.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2269A62316D74D9600A1D342 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; + 22CA6B4816DB32CC001EB1FF /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 22F963A216D746850007DF95 /* ricoh-theta-sample-for-iosv2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ricoh-theta-sample-for-iosv2.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 22F963A516D746850007DF95 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 22F963A716D746850007DF95 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 22F963A916D746850007DF95 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 3E437EFC1A1B9597003FA39E /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; + 3E437EFE1A1B95A6003FA39E /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + FAA82EB61BFCABE5000C0F87 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; + FAA82EB91BFCABF7000C0F87 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + FABFAFCA1BFCA10500937B1D /* HttpConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpConnection.h; path = "ricoh-theta-sample-for-iosv2/http/HttpConnection.h"; sourceTree = SOURCE_ROOT; }; + FABFAFCB1BFCA10500937B1D /* HttpConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpConnection.m; path = "ricoh-theta-sample-for-iosv2/http/HttpConnection.m"; sourceTree = SOURCE_ROOT; }; + FABFAFCC1BFCA10500937B1D /* HttpDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpDeviceInfo.h; path = "ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.h"; sourceTree = SOURCE_ROOT; }; + FABFAFCD1BFCA10500937B1D /* HttpDeviceInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpDeviceInfo.m; path = "ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.m"; sourceTree = SOURCE_ROOT; }; + FABFAFCE1BFCA10500937B1D /* HttpFileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpFileList.h; path = "ricoh-theta-sample-for-iosv2/http/HttpFileList.h"; sourceTree = SOURCE_ROOT; }; + FABFAFCF1BFCA10500937B1D /* HttpFileList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpFileList.m; path = "ricoh-theta-sample-for-iosv2/http/HttpFileList.m"; sourceTree = SOURCE_ROOT; }; + FABFAFD01BFCA10500937B1D /* HttpImageInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpImageInfo.h; path = "ricoh-theta-sample-for-iosv2/http/HttpImageInfo.h"; sourceTree = SOURCE_ROOT; }; + FABFAFD11BFCA10500937B1D /* HttpImageInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpImageInfo.m; path = "ricoh-theta-sample-for-iosv2/http/HttpImageInfo.m"; sourceTree = SOURCE_ROOT; }; + FABFAFD21BFCA10500937B1D /* HttpSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpSession.h; path = "ricoh-theta-sample-for-iosv2/http/HttpSession.h"; sourceTree = SOURCE_ROOT; }; + FABFAFD31BFCA10500937B1D /* HttpSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpSession.m; path = "ricoh-theta-sample-for-iosv2/http/HttpSession.m"; sourceTree = SOURCE_ROOT; }; + FABFAFD41BFCA10500937B1D /* HttpStatusTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpStatusTimer.h; path = "ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.h"; sourceTree = SOURCE_ROOT; }; + FABFAFD51BFCA10500937B1D /* HttpStatusTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpStatusTimer.m; path = "ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.m"; sourceTree = SOURCE_ROOT; }; + FABFAFD61BFCA10500937B1D /* HttpStorageInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpStorageInfo.h; path = "ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.h"; sourceTree = SOURCE_ROOT; }; + FABFAFD71BFCA10500937B1D /* HttpStorageInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpStorageInfo.m; path = "ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.m"; sourceTree = SOURCE_ROOT; }; + FABFAFD81BFCA10500937B1D /* HttpStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HttpStream.h; path = "ricoh-theta-sample-for-iosv2/http/HttpStream.h"; sourceTree = SOURCE_ROOT; }; + FABFAFD91BFCA10500937B1D /* HttpStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HttpStream.m; path = "ricoh-theta-sample-for-iosv2/http/HttpStream.m"; sourceTree = SOURCE_ROOT; }; + FABFAFE21BFCA16C00937B1D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "ricoh-theta-sample-for-iosv2/Default-568h@2x.png"; sourceTree = SOURCE_ROOT; }; + FABFAFE31BFCA16C00937B1D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = "ricoh-theta-sample-for-iosv2/Default.png"; sourceTree = SOURCE_ROOT; }; + FABFAFE41BFCA16C00937B1D /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "ricoh-theta-sample-for-iosv2/Default@2x.png"; sourceTree = SOURCE_ROOT; }; + FABFAFE51BFCA16C00937B1D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "ricoh-theta-sample-for-iosv2/main.m"; sourceTree = SOURCE_ROOT; }; + FABFAFE61BFCA16C00937B1D /* nothumb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = nothumb.png; path = "ricoh-theta-sample-for-iosv2/nothumb.png"; sourceTree = SOURCE_ROOT; }; + FABFAFE71BFCA16C00937B1D /* ricoh-theta-sample-for-iosv2-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "ricoh-theta-sample-for-iosv2-Info.plist"; path = "ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist"; sourceTree = SOURCE_ROOT; }; + FABFAFEE1BFCA36200937B1D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "ricoh-theta-sample-for-iosv2/AppDelegate.h"; sourceTree = SOURCE_ROOT; }; + FABFAFEF1BFCA36200937B1D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "ricoh-theta-sample-for-iosv2/AppDelegate.m"; sourceTree = SOURCE_ROOT; }; + FABFAFF01BFCA36200937B1D /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Constants.h; path = "ricoh-theta-sample-for-iosv2/Constants.h"; sourceTree = SOURCE_ROOT; }; + FABFAFF11BFCA36200937B1D /* glkViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glkViewController.h; path = "ricoh-theta-sample-for-iosv2/glkViewController.h"; sourceTree = SOURCE_ROOT; }; + FABFAFF21BFCA36200937B1D /* glkViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = glkViewController.m; path = "ricoh-theta-sample-for-iosv2/glkViewController.m"; sourceTree = SOURCE_ROOT; }; + FABFAFF31BFCA36200937B1D /* GLRenderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLRenderView.h; path = "ricoh-theta-sample-for-iosv2/GLRenderView.h"; sourceTree = SOURCE_ROOT; }; + FABFAFF41BFCA36200937B1D /* GLRenderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GLRenderView.m; path = "ricoh-theta-sample-for-iosv2/GLRenderView.m"; sourceTree = SOURCE_ROOT; }; + FABFAFF51BFCA36200937B1D /* ImageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ImageViewController.h; path = "ricoh-theta-sample-for-iosv2/ImageViewController.h"; sourceTree = SOURCE_ROOT; }; + FABFAFF61BFCA36200937B1D /* ImageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImageViewController.m; path = "ricoh-theta-sample-for-iosv2/ImageViewController.m"; sourceTree = SOURCE_ROOT; }; + FABFAFF71BFCA36200937B1D /* SphereXmp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SphereXmp.h; path = "ricoh-theta-sample-for-iosv2/SphereXmp.h"; sourceTree = SOURCE_ROOT; }; + FABFAFF81BFCA36200937B1D /* SphereXmp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SphereXmp.m; path = "ricoh-theta-sample-for-iosv2/SphereXmp.m"; sourceTree = SOURCE_ROOT; }; + FABFAFF91BFCA36200937B1D /* TableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableCell.h; path = "ricoh-theta-sample-for-iosv2/TableCell.h"; sourceTree = SOURCE_ROOT; }; + FABFAFFA1BFCA36200937B1D /* TableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TableCell.m; path = "ricoh-theta-sample-for-iosv2/TableCell.m"; sourceTree = SOURCE_ROOT; }; + FABFAFFB1BFCA36200937B1D /* TableCellObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableCellObject.h; path = "ricoh-theta-sample-for-iosv2/TableCellObject.h"; sourceTree = SOURCE_ROOT; }; + FABFAFFC1BFCA36200937B1D /* TableCellObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TableCellObject.m; path = "ricoh-theta-sample-for-iosv2/TableCellObject.m"; sourceTree = SOURCE_ROOT; }; + FABFAFFD1BFCA36200937B1D /* UVSphere.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UVSphere.h; path = "ricoh-theta-sample-for-iosv2/UVSphere.h"; sourceTree = SOURCE_ROOT; }; + FABFAFFE1BFCA36200937B1D /* UVSphere.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UVSphere.m; path = "ricoh-theta-sample-for-iosv2/UVSphere.m"; sourceTree = SOURCE_ROOT; }; + FABFAFFF1BFCA36200937B1D /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewController.h; path = "ricoh-theta-sample-for-iosv2/ViewController.h"; sourceTree = SOURCE_ROOT; }; + FABFB0001BFCA36200937B1D /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ViewController.m; path = "ricoh-theta-sample-for-iosv2/ViewController.m"; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 22F9639F16D746850007DF95 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3E437EFF1A1B95A6003FA39E /* OpenGLES.framework in Frameworks */, + 3E437EFD1A1B9597003FA39E /* GLKit.framework in Frameworks */, + 22CA6B4916DB32CC001EB1FF /* Accelerate.framework in Frameworks */, + 22F963AA16D746850007DF95 /* CoreGraphics.framework in Frameworks */, + 22F963A816D746850007DF95 /* Foundation.framework in Frameworks */, + 2269A62416D74D9600A1D342 /* ImageIO.framework in Frameworks */, + 22F963A616D746850007DF95 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 22F9639916D746850007DF95 = { + isa = PBXGroup; + children = ( + 22F963AB16D746850007DF95 /* ricoh-theta-sample-for-iosv2 */, + 22F963A416D746850007DF95 /* Frameworks */, + 22F963A316D746850007DF95 /* Products */, + ); + sourceTree = ""; + }; + 22F963A316D746850007DF95 /* Products */ = { + isa = PBXGroup; + children = ( + 22F963A216D746850007DF95 /* ricoh-theta-sample-for-iosv2.app */, + ); + name = Products; + sourceTree = ""; + }; + 22F963A416D746850007DF95 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 3E437EFE1A1B95A6003FA39E /* OpenGLES.framework */, + 3E437EFC1A1B9597003FA39E /* GLKit.framework */, + 22CA6B4816DB32CC001EB1FF /* Accelerate.framework */, + 22F963A916D746850007DF95 /* CoreGraphics.framework */, + 2269A62316D74D9600A1D342 /* ImageIO.framework */, + 22F963A716D746850007DF95 /* Foundation.framework */, + 22F963A516D746850007DF95 /* UIKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 22F963AB16D746850007DF95 /* ricoh-theta-sample-for-iosv2 */ = { + isa = PBXGroup; + children = ( + FAA82EB51BFCABE5000C0F87 /* MainStoryboard.storyboard */, + FABFAFEE1BFCA36200937B1D /* AppDelegate.h */, + FABFAFEF1BFCA36200937B1D /* AppDelegate.m */, + FABFAFF01BFCA36200937B1D /* Constants.h */, + FABFAFF11BFCA36200937B1D /* glkViewController.h */, + FABFAFF21BFCA36200937B1D /* glkViewController.m */, + FABFAFF31BFCA36200937B1D /* GLRenderView.h */, + FABFAFF41BFCA36200937B1D /* GLRenderView.m */, + FABFAFF51BFCA36200937B1D /* ImageViewController.h */, + FABFAFF61BFCA36200937B1D /* ImageViewController.m */, + FABFAFF71BFCA36200937B1D /* SphereXmp.h */, + FABFAFF81BFCA36200937B1D /* SphereXmp.m */, + FABFAFF91BFCA36200937B1D /* TableCell.h */, + FABFAFFA1BFCA36200937B1D /* TableCell.m */, + FABFAFFB1BFCA36200937B1D /* TableCellObject.h */, + FABFAFFC1BFCA36200937B1D /* TableCellObject.m */, + FABFAFFD1BFCA36200937B1D /* UVSphere.h */, + FABFAFFE1BFCA36200937B1D /* UVSphere.m */, + FABFAFFF1BFCA36200937B1D /* ViewController.h */, + FABFB0001BFCA36200937B1D /* ViewController.m */, + FA8DADBB1BFC1ECE003C5EA2 /* http */, + 22F963AC16D746850007DF95 /* Supporting Files */, + ); + path = "ricoh-theta-sample-for-iosv2"; + sourceTree = ""; + }; + 22F963AC16D746850007DF95 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + FAA82EB81BFCABF7000C0F87 /* InfoPlist.strings */, + FABFAFE21BFCA16C00937B1D /* Default-568h@2x.png */, + FABFAFE31BFCA16C00937B1D /* Default.png */, + FABFAFE41BFCA16C00937B1D /* Default@2x.png */, + FABFAFE51BFCA16C00937B1D /* main.m */, + FABFAFE61BFCA16C00937B1D /* nothumb.png */, + FABFAFE71BFCA16C00937B1D /* ricoh-theta-sample-for-iosv2-Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + FA8DADBB1BFC1ECE003C5EA2 /* http */ = { + isa = PBXGroup; + children = ( + FABFAFCA1BFCA10500937B1D /* HttpConnection.h */, + FABFAFCB1BFCA10500937B1D /* HttpConnection.m */, + FABFAFCC1BFCA10500937B1D /* HttpDeviceInfo.h */, + FABFAFCD1BFCA10500937B1D /* HttpDeviceInfo.m */, + FABFAFCE1BFCA10500937B1D /* HttpFileList.h */, + FABFAFCF1BFCA10500937B1D /* HttpFileList.m */, + FABFAFD01BFCA10500937B1D /* HttpImageInfo.h */, + FABFAFD11BFCA10500937B1D /* HttpImageInfo.m */, + FABFAFD21BFCA10500937B1D /* HttpSession.h */, + FABFAFD31BFCA10500937B1D /* HttpSession.m */, + FABFAFD41BFCA10500937B1D /* HttpStatusTimer.h */, + FABFAFD51BFCA10500937B1D /* HttpStatusTimer.m */, + FABFAFD61BFCA10500937B1D /* HttpStorageInfo.h */, + FABFAFD71BFCA10500937B1D /* HttpStorageInfo.m */, + FABFAFD81BFCA10500937B1D /* HttpStream.h */, + FABFAFD91BFCA10500937B1D /* HttpStream.m */, + ); + name = http; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 22F963A116D746850007DF95 /* ricoh-theta-sample-for-iosv2 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 22F963C516D746860007DF95 /* Build configuration list for PBXNativeTarget "ricoh-theta-sample-for-iosv2" */; + buildPhases = ( + 22F9639E16D746850007DF95 /* Sources */, + 22F9639F16D746850007DF95 /* Frameworks */, + 22F963A016D746850007DF95 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ricoh-theta-sample-for-iosv2"; + productName = "ricoh-theta-sample-for-ios"; + productReference = 22F963A216D746850007DF95 /* ricoh-theta-sample-for-iosv2.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 22F9639A16D746850007DF95 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 22F9639D16D746850007DF95 /* Build configuration list for PBXProject "ricoh-theta-sample-for-iosv2" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 22F9639916D746850007DF95; + productRefGroup = 22F963A316D746850007DF95 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 22F963A116D746850007DF95 /* ricoh-theta-sample-for-iosv2 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 22F963A016D746850007DF95 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FAA82EBA1BFCABF7000C0F87 /* InfoPlist.strings in Resources */, + FABFAFEC1BFCA16C00937B1D /* nothumb.png in Resources */, + FABFAFE91BFCA16C00937B1D /* Default.png in Resources */, + FABFAFEA1BFCA16C00937B1D /* Default@2x.png in Resources */, + FAA82EB71BFCABE5000C0F87 /* MainStoryboard.storyboard in Resources */, + FABFAFE81BFCA16C00937B1D /* Default-568h@2x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 22F9639E16D746850007DF95 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FABFB0011BFCA36200937B1D /* AppDelegate.m in Sources */, + FABFB0031BFCA36200937B1D /* GLRenderView.m in Sources */, + FABFAFDA1BFCA10500937B1D /* HttpConnection.m in Sources */, + FABFB0041BFCA36200937B1D /* ImageViewController.m in Sources */, + FABFAFDB1BFCA10500937B1D /* HttpDeviceInfo.m in Sources */, + FABFB0071BFCA36200937B1D /* TableCellObject.m in Sources */, + FABFB0061BFCA36200937B1D /* TableCell.m in Sources */, + FABFB0091BFCA36200937B1D /* ViewController.m in Sources */, + FABFB0021BFCA36200937B1D /* glkViewController.m in Sources */, + FABFAFDE1BFCA10500937B1D /* HttpSession.m in Sources */, + FABFAFEB1BFCA16C00937B1D /* main.m in Sources */, + FABFAFDD1BFCA10500937B1D /* HttpImageInfo.m in Sources */, + FABFB0081BFCA36200937B1D /* UVSphere.m in Sources */, + FABFAFDF1BFCA10500937B1D /* HttpStatusTimer.m in Sources */, + FABFAFE11BFCA10500937B1D /* HttpStream.m in Sources */, + FABFAFE01BFCA10500937B1D /* HttpStorageInfo.m in Sources */, + FABFAFDC1BFCA10500937B1D /* HttpFileList.m in Sources */, + FABFB0051BFCA36200937B1D /* SphereXmp.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + FAA82EB51BFCABE5000C0F87 /* MainStoryboard.storyboard */ = { + isa = PBXVariantGroup; + children = ( + FAA82EB61BFCABE5000C0F87 /* en */, + ); + name = MainStoryboard.storyboard; + sourceTree = ""; + }; + FAA82EB81BFCABF7000C0F87 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + FAA82EB91BFCABF7000C0F87 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 22F963C316D746860007DF95 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 22F963C416D746860007DF95 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 22F963C616D746860007DF95 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "$(SRCROOT)/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.theta360.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "ricoh-theta-sample-for-iosv2"; + PROVISIONING_PROFILE = ""; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 22F963C716D746860007DF95 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = "$(SRCROOT)/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.theta360.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "ricoh-theta-sample-for-iosv2"; + PROVISIONING_PROFILE = ""; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 22F9639D16D746850007DF95 /* Build configuration list for PBXProject "ricoh-theta-sample-for-iosv2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 22F963C316D746860007DF95 /* Debug */, + 22F963C416D746860007DF95 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 22F963C516D746860007DF95 /* Build configuration list for PBXNativeTarget "ricoh-theta-sample-for-iosv2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 22F963C616D746860007DF95 /* Debug */, + 22F963C716D746860007DF95 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 22F9639A16D746850007DF95 /* Project object */; +} diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100755 index 919434a..0000000 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcshareddata/ricoh-theta-sample-for-ios.xcscmblueprint b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcshareddata/ricoh-theta-sample-for-ios.xcscmblueprint deleted file mode 100755 index e55468a..0000000 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcshareddata/ricoh-theta-sample-for-ios.xcscmblueprint +++ /dev/null @@ -1,25 +0,0 @@ -{ - "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d", - "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { - "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d" : { - - } - }, - "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { - "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d" : 0 - }, - "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "92BB2C3A-9145-4819-A9A9-C6A3518D8CD9", - "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { - "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d" : "theta\/" - }, - "DVTSourceControlWorkspaceBlueprintNameKey" : "ricoh-theta-sample-for-ios", - "DVTSourceControlWorkspaceBlueprintVersion" : 204, - "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "trunk\/SDK2\/apps\/v2\/RICOH_THETA_SDK_v2_for_iOS\/ricoh-theta-sample-for-ios\/ricoh-theta-sample-for-ios.xcodeproj", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/10.45.236.157\/svn\/theta", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Subversion", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d" - } - ] -} \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcshareddata/ricoh-theta-sample-for-iosv2.xcscmblueprint b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcshareddata/ricoh-theta-sample-for-iosv2.xcscmblueprint deleted file mode 100755 index 41f7061..0000000 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcshareddata/ricoh-theta-sample-for-iosv2.xcscmblueprint +++ /dev/null @@ -1,27 +0,0 @@ -{ - "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d", - "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { - "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d" : { - "DVTSourceControlWorkingCopyRepositoryBranchesLocationKey" : "branches", - "DVTSourceControlWorkingCopyRepositoryTagsLocationKey" : "tags", - "DVTSourceControlWorkingCopyRepositoryPrimaryBranchLocationKey" : "trunk" - } - }, - "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { - "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d" : 0 - }, - "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "1B4F3FCD-C5DA-4399-98C5-ACE041A3A56D", - "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { - "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d" : "theta\/" - }, - "DVTSourceControlWorkspaceBlueprintNameKey" : "ricoh-theta-sample-for-iosv2", - "DVTSourceControlWorkspaceBlueprintVersion" : 204, - "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "trunk\/SDK2\/apps\/v2\/RICOH_THETA_SDK_v2_for_iOS\/ricoh-theta-sample-for-iosv2\/ricoh-theta-sample-for-iosv2.xcodeproj", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/10.45.236.157\/svn\/theta", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Subversion", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "78d5feb8-1d8f-3b4f-8ea2-8de6a477b74d" - } - ] -} \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcuserdata/toshi.xcuserdatad/UserInterfaceState.xcuserstate b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcuserdata/toshi.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100755 index ec5f8cc..0000000 Binary files a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/project.xcworkspace/xcuserdata/toshi.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/kobayashi.xcuserdatad/xcschemes/ricoh-theta-sample-for-ios.xcscheme b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/kobayashi.xcuserdatad/xcschemes/ricoh-theta-sample-for-ios.xcscheme deleted file mode 100755 index d21c208..0000000 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/kobayashi.xcuserdatad/xcschemes/ricoh-theta-sample-for-ios.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/toshi.xcuserdatad/xcschemes/ricoh-theta-sample-for-iosv2.xcscheme b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/toshi.xcuserdatad/xcschemes/ricoh-theta-sample-for-iosv2.xcscheme deleted file mode 100755 index eaa89be..0000000 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/toshi.xcuserdatad/xcschemes/ricoh-theta-sample-for-iosv2.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/toshi.xcuserdatad/xcschemes/xcschememanagement.plist b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/toshi.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100755 index e30a7c4..0000000 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2.xcodeproj/xcuserdata/toshi.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - ricoh-theta-sample-for-iosv2.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 22F963A116D746850007DF95 - - primary - - - - - diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/AppDelegate.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/AppDelegate.h index 12f1bba..e2e446a 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/AppDelegate.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/AppDelegate.h @@ -1,11 +1,11 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/AppDelegate.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/AppDelegate.m index ec8e304..25c7e65 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/AppDelegate.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/AppDelegate.m @@ -1,43 +1,43 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "AppDelegate.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - // Override point for customization after application launch. - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - [self.window.rootViewController viewWillAppear:NO]; -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "AppDelegate.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + [self.window.rootViewController viewWillAppear:NO]; +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/Constants.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/Constants.h index 18efb13..e839bf0 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/Constants.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/Constants.h @@ -1,47 +1,47 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#ifndef ricoh_theta_sample_for_ios_Constants_h -#define ricoh_theta_sample_for_ios_Constants_h - -/** Camera FOV initial value */ -#define CAMERA_FOV_DEGREE_INIT (45.0f) -/** Camera FOV minimum value */ -#define CAMERA_FOV_DEGREE_MIN (30.0f) -/** Camera FOV maximum value */ -#define CAMERA_FOV_DEGREE_MAX (100.0f) -/** Z/NEAR for OpenGL perspective display */ -#define Z_NEAR (0.1f) -/** Z/FA for OpenGL perspective display */ -#define Z_FAR (100.0f) - -/** Spherical radius for photo attachment */ -#define SHELL_RADIUS (2.0f) -/** Number of spherical polygon partitions for photo attachment */ -#define SHELL_DIVIDE (48) - -/** Parameter for amount of rotation control (X axis) */ -#define DIVIDE_ROTATE_X (500) -/** Parameter for amount of rotation control (Y axis) */ -#define DIVIDE_ROTATE_Y (500) - -/** Parameter for maximum width control */ -#define SCALE_RATIO_TICK_EXPANSION (1.05f) -/** Parameter for minimum width control */ -#define SCALE_RATIO_TICK_REDUCTION (0.95f) - -#define KNUM_INTERVAL_INERTIA (0.020) -#define INERTIA_1ST_SHORT_ADJUST(a) (a / 3.0) -#define INERTIA_1ST_LONG_ADJUST(a) (a / 2.0) -#define INERTIA_LONG_ADJUST(a) (1.4 + a * 0.1) -#define INERTIA_SHORT_ADJUST(a) (2.9 + a * 0.1) -#define INERTIA_NONE (1.0) -#define INERTIA_STOP_LIMT (0.000002) - -/** Amount of movement parameter for inertia (weak) */ -#define WEAK_INERTIA_RATIO (1.0) -/** Amount of movement parameter for inertia (strong) */ -#define STRONG_INERTIA_RATIO (10.0) - -#endif +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#ifndef ricoh_theta_sample_for_ios_Constants_h +#define ricoh_theta_sample_for_ios_Constants_h + +/** Camera FOV initial value */ +#define CAMERA_FOV_DEGREE_INIT (45.0f) +/** Camera FOV minimum value */ +#define CAMERA_FOV_DEGREE_MIN (30.0f) +/** Camera FOV maximum value */ +#define CAMERA_FOV_DEGREE_MAX (100.0f) +/** Z/NEAR for OpenGL perspective display */ +#define Z_NEAR (0.1f) +/** Z/FA for OpenGL perspective display */ +#define Z_FAR (100.0f) + +/** Spherical radius for photo attachment */ +#define SHELL_RADIUS (2.0f) +/** Number of spherical polygon partitions for photo attachment */ +#define SHELL_DIVIDE (48) + +/** Parameter for amount of rotation control (X axis) */ +#define DIVIDE_ROTATE_X (500) +/** Parameter for amount of rotation control (Y axis) */ +#define DIVIDE_ROTATE_Y (500) + +/** Parameter for maximum width control */ +#define SCALE_RATIO_TICK_EXPANSION (1.05f) +/** Parameter for minimum width control */ +#define SCALE_RATIO_TICK_REDUCTION (0.95f) + +#define KNUM_INTERVAL_INERTIA (0.020) +#define INERTIA_1ST_SHORT_ADJUST(a) (a / 3.0) +#define INERTIA_1ST_LONG_ADJUST(a) (a / 2.0) +#define INERTIA_LONG_ADJUST(a) (1.4 + a * 0.1) +#define INERTIA_SHORT_ADJUST(a) (2.9 + a * 0.1) +#define INERTIA_NONE (1.0) +#define INERTIA_STOP_LIMT (0.000002) + +/** Amount of movement parameter for inertia (weak) */ +#define WEAK_INERTIA_RATIO (1.0) +/** Amount of movement parameter for inertia (strong) */ +#define STRONG_INERTIA_RATIO (10.0) + +#endif diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/GLRenderView.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/GLRenderView.h index 71ff5d9..5c7bd58 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/GLRenderView.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/GLRenderView.h @@ -1,20 +1,20 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - - -@interface GLRenderView : GLKView - -@property int kindInertia; - --(id) initWithFrame:(CGRect)frame; - --(void) draw; - --(void) setTexture:(NSMutableData*)data width:(int)width height:(int)height yaw:(float)yaw pitch:(float)pitch roll:(float)roll; - -- (void)tearDown; -@end - +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + + +@interface GLRenderView : GLKView + +@property int kindInertia; + +-(id) initWithFrame:(CGRect)frame; + +-(void) draw; + +-(void) setTexture:(NSMutableData*)data width:(int)width height:(int)height yaw:(float)yaw pitch:(float)pitch roll:(float)roll; + +- (void)tearDown; +@end + diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/GLRenderView.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/GLRenderView.m index ea9d25d..955df78 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/GLRenderView.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/GLRenderView.m @@ -1,661 +1,661 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import -#import -#import -#import -#import "GLRenderView.h" -#import "UVSphere.h" -#import "ImageViewController.h" -#import "Constants.h" - - -NSString *vertexShader = @"" - "attribute vec4 aPosition;\n" - "attribute vec2 aUV;\n" - "uniform mat4 uProjection;\n" - "uniform mat4 uView;\n" - "uniform mat4 uModel;\n" - "varying vec2 vUV;\n" - "void main() {\n" - " gl_Position = uProjection * uView * uModel * aPosition;\n" - " vUV = aUV;\n" - "}\n"; -NSString *fragmentShader = @"" - "precision mediump float;\n" - "varying vec2 vUV;\n" - "uniform sampler2D uTex;\n" - "void main() {\n" - " gl_FragColor = texture2D(uTex, vUV);\n" - "}\n"; - - -/** - * View class for photo spherical display - * - * Images acquired from RICOH THETA S are created by equirectangular projection, - * with the images from camera #2 (left half) + camera #1 +camera#2 (right half) joined at the ends. - * These images can be acquired at a resolution of up to 5376 x 2688. - * - * These images are pasted as texture onto a spherical object on OpenGL using UVSphere - * from this class. As this sphere is drawn at an angle from -pi to pi on the xz plane, - * the UV coordinates are generated in this orientation and attached to the image, - * and are attached so that a mirror image is not generated in the x axis direction - * when viewed from the inside of the sphere. - * - * Furthermore, as the camera image is from angle -pi, the center of the image captured by - * camera #1 faces forward from the x axis. The camera image is slanted at the angle of elevation - * and horizontal angle, the sphere is rotated at each angle, and the image displayed in the x axis - * forward direction is adjusted to the horizontal direction of the image from camera#1. - * - * Pinch and pan operations support zooming in, zooming out and rotating. These are supported by - * changing the camera slant and FOV angle setting value. - */ -@interface GLRenderView (){ - UVSphere *half[2]; - - UIPanGestureRecognizer *panGestureRecognizer; - UIPinchGestureRecognizer *pinchGestureRecognizer; - - float _yaw; - float _roll; - float _pitch; - NSTimer *_timer; - uint _timerCount; - int _kindInertia; - float viewAspectRatio; - - GLKMatrix4 projectionMatrix; - GLKMatrix4 lookAtMatrix; - GLKMatrix4 modelMatrix; - - GLuint shaderProgram; - GLint aPosition; - GLint aUV; - - GLint uProjection; - GLint uView; - GLint uModel; - GLint uTex; - - NSDictionary *_textureInfo; - - float cameraPosX; - float cameraPosY; - float cameraPosZ; - float cameraDirectionX; - float cameraDirectionY; - float cameraDirectionZ; - float cameraUpX; - float cameraUpY; - float cameraUpZ; - - float cameraFovDegree; - - double mRotationAngleXZ; - double mRotationAngleY; - - BOOL inPanMode; - CGPoint panPrev; - int panLastDiffX; - int panLastDiffY; - double inertiaRatio; -} - -// opengl shader and program --(GLuint) loadShader:(GLenum)shaderType shaderSrc:(NSString *)shaderSrc; --(GLuint) loadProgram:(NSString*)vShaderSrc fShaderSrc:(NSString*)fShaderSrc; --(void) useAndAttachLocation:(GLuint)program; - --(void) glCheckError:(NSString *)msg; - -// gesture operations --(void) scale:(float) scale; --(void) rotate:(int) diffx diffy:(int) diffy; -@end - -@implementation GLRenderView - -/** - * Startup method - * @param frame Size on screen - */ --(id) initWithFrame:(CGRect)frame{ - - self = [super initWithFrame:frame]; - - _timerCount = 0; - _timer = nil; - _kindInertia = NoneInertia; - - projectionMatrix = GLKMatrix4Identity; - lookAtMatrix = GLKMatrix4Identity; - modelMatrix = GLKMatrix4Identity; - - // set initial camera pos and direction - cameraPosX = 0.0f; - cameraPosY = 0.0f; - cameraPosZ = 0.0f; - cameraDirectionX = 1.0f; - cameraDirectionY = 0.0f; - cameraDirectionZ = 0.0f; - cameraUpX = 0.0f; - cameraUpY = 1.0f; - cameraUpZ = 0.0f; - - cameraFovDegree = CAMERA_FOV_DEGREE_INIT; - - inPanMode = FALSE; - - mRotationAngleXZ = 0.0f; - mRotationAngleY = 0.0f; - - EAGLContext *context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; - [EAGLContext setCurrentContext:context]; - self.context = context; - - if (self) { - [self registerGestures]; - [self initOpenGLSettings:context]; - half[0] = [[UVSphere alloc] init:SHELL_RADIUS divide:SHELL_DIVIDE rotate:0.0]; - half[1] = [[UVSphere alloc] init:SHELL_RADIUS divide:SHELL_DIVIDE rotate:M_PI]; - } - - NSLog(@"initwithframe frame: x: %f y: %f width %f height %f", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); - - return self; -} - - -/** - * Gesture registration method - */ --(void) registerGestures{ - - panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureHandler:)]; - [panGestureRecognizer setMaximumNumberOfTouches:1]; - [self addGestureRecognizer:panGestureRecognizer]; - NSLog(@"add panGesture."); - - pinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinchGestureHandler:)]; - [self addGestureRecognizer:pinchGestureRecognizer]; - NSLog(@"add pinchGesture."); - - return; -} - -/** - * Texture registration method - * @param data Image for registration - * @param width Image width for registration - * @param height Image height for registration - * @param yaw Camera orientation angle - * @param pitch Camera elevation angle - * @param roll Camera horizontal angle - */ --(void) setTexture:(NSMutableData*)data width:(int)width height:(int)height yaw:(float)yaw pitch:(float) pitch roll:(float) roll { - - NSError *error; - UIImage *image = [UIImage imageWithData:data]; - CGImageRef srcImageRef = [image CGImage]; - - // Create CGRect specifying clipping position. - CGRect leftArea = CGRectMake(0.f, 0.f, image.size.width / 2.f, image.size.height); - CGRect rightArea = CGRectMake(image.size.width / 2.f, 0.f, image.size.width, image.size.height); - - // Create clipped image using CoreGraphics function. - CGImageRef leftImageRef = CGImageCreateWithImageInRect(srcImageRef, leftArea); - CGImageRef rightImageRef = CGImageCreateWithImageInRect(srcImageRef, rightArea); - - GLKTextureInfo *leftTexture = [GLKTextureLoader textureWithCGImage:leftImageRef options:nil error:&error]; - GLKTextureInfo *rightTexture = [GLKTextureLoader textureWithCGImage:rightImageRef options:nil error:&error]; - - _textureInfo = @{@GL_TEXTURE0:leftTexture, - @GL_TEXTURE1:rightTexture}; - - for (id key in _textureInfo) { - glActiveTexture([key unsignedIntValue]); - glBindTexture(GL_TEXTURE_2D, ((GLKTextureInfo*)_textureInfo[key]).name); - - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - - _yaw = yaw; - _roll = roll; - _pitch = pitch; - - return; -} - -/** - * OpenGL Initial value setting method - * @param context OpenGL Context - */ --(void) initOpenGLSettings:(EAGLContext*)context{ - - float viewWidth = self.frame.size.width; - float viewHeight = self.frame.size.height; - - shaderProgram = [self loadProgram:vertexShader fShaderSrc:fragmentShader]; - [self useAndAttachLocation: shaderProgram]; - - //NSLog(@"frame width: %d hegith: %d", (int)self.frame.size.width, (int)self.frame.size.height); - - glClearColor(0.0f, 0.0f, 1.0f, 0.0f); - - viewAspectRatio = viewWidth/viewHeight; - glViewport(0, 0, viewWidth, viewHeight); - - return; -} - -/** - * Redraw method - */ --(void) draw{ - - projectionMatrix = GLKMatrix4Identity; - lookAtMatrix = GLKMatrix4Identity; - modelMatrix = GLKMatrix4Identity; - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - cameraDirectionX = (float) (cos(mRotationAngleXZ)*cos(mRotationAngleY)); - cameraDirectionZ = (float) (sin(mRotationAngleXZ)*cos(mRotationAngleY)); - cameraDirectionY = (float) sin(mRotationAngleY); - - //NSLog(@"camera direction: %f %f %f", cameraDirectionX, cameraDirectionY, cameraDirectionZ); - - projectionMatrix = GLKMatrix4MakePerspective(GLKMathDegreesToRadians(cameraFovDegree), viewAspectRatio, Z_NEAR, Z_FAR); - lookAtMatrix = GLKMatrix4MakeLookAt(cameraPosX, cameraPosY, cameraPosZ, - cameraDirectionX, cameraDirectionY, cameraDirectionZ, - cameraUpX, cameraUpY, cameraUpZ); - - GLKMatrix4 elevetionAngleMatrix = GLKMatrix4MakeRotation(GLKMathDegreesToRadians(_pitch), 0, 0, 1); - modelMatrix = GLKMatrix4Multiply(modelMatrix, elevetionAngleMatrix); - GLKMatrix4 horizontalAngleMatrix = GLKMatrix4MakeRotation(GLKMathDegreesToRadians(_roll), 1, 0, 0); - modelMatrix = GLKMatrix4Multiply(modelMatrix, horizontalAngleMatrix); - - glEnableVertexAttribArray(aPosition); - glEnableVertexAttribArray(aUV); - - glUniformMatrix4fv(uModel, 1, GL_FALSE, modelMatrix.m); - [self glCheckError:@"glUniform4fv model"]; - glUniformMatrix4fv(uView, 1, GL_FALSE, lookAtMatrix.m); - [self glCheckError:@"glUniform4fv viewmatrix"]; - glUniformMatrix4fv(uProjection, 1, GL_FALSE, projectionMatrix.m); - [self glCheckError:@"glUniform4fv projectionmatrix"]; - - for (int i = 0; i < 2; ++i) { - glUniform1i(uTex, i); - [half[i] draw:aPosition uv:aUV]; - } - - glDisableVertexAttribArray(aPosition); - glDisableVertexAttribArray(aUV); - - return; -} - -/** - * Handler when touch start is detected - * @param touches Touch information - * @param event Event - */ --(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ - - [_timer invalidate]; - _timer = nil; - _timerCount = 0; - - inPanMode = false; - - //CGPoint startPos = [[touches anyObject] locationInView:self]; - //NSLog(@"touchesBegan:startPos x = %f, y = %f", startPos.x, startPos.y); - - return; -} - -/** - * Handler when touch is detected - * @param touches Touch information - * @param event Event - */ --(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { - //CGPoint movePos = [[touches anyObject] locationInView:self]; - //NSLog(@"touchesMoved x = %f, y = %f", movePos.x, movePos.y); - return; -} - -/** - * Handler when touch exit is detected - * @param touches Touch information - * @param event Event - */ --(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { - //NSLog(@"touchesEnded"); - return; -} - -/** - * Multiple gesture detection compatibility setting method - * @param gestureRecognizer Gesture that sent the message to the delegate - * @param otherGestureRecognizer Partner gesture recognized at the same time - */ --(BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { - - return NO; -} - -/** - * Pinch operation compatibility handler - * @param recognizer Recognizer object for gesture operations - */ --(void) pinchGestureHandler:(UIPinchGestureRecognizer*)recognizer { - - [self scale:[recognizer scale]]; - //NSLog(@"pinchHandler state = %d, zoom = %f, scale = %f", [sender state], zoom, [sender scale]); - - return; -} - -/** - * Pan operation compatibility handler - * @param recognizer Recognizer object for gesture operations - */ --(void) panGestureHandler:(UIPanGestureRecognizer*)recognizer { - - CGPoint cur = [recognizer translationInView:self]; - - switch ([recognizer state]) { - case UIGestureRecognizerStateEnded: - //NSLog(@"pan gesture ended"); - [_timer invalidate]; - _timerCount = 0; - if(_kindInertia != NoneInertia) { - _timer = [NSTimer scheduledTimerWithTimeInterval:KNUM_INTERVAL_INERTIA - target:self - selector:@selector(timerInfo:) - userInfo:nil - repeats:YES]; - } - break; - default: - if (inPanMode) { - panLastDiffX = cur.x - panPrev.x; - panLastDiffY = cur.y - panPrev.y; - - panPrev = cur; - [self rotate:-panLastDiffX diffy:panLastDiffY]; - } - else { - inPanMode = true; - panPrev = cur; - } - break; - } - - //NSLog(@"pan handler state %d pos %f %f", [recognizer state], cur.x, cur.y); - return; -} - -/** - * Timer setting method - * @param timer Setting target timer - */ --(void) timerInfo:(NSTimer *)timer -{ - int diffX = 0; - int diffY = 0; - - if (_timerCount == 0) { - inertiaRatio = 1.0; - switch (_kindInertia) { - case ShortInertia: - inertiaRatio = WEAK_INERTIA_RATIO; - break; - case LongInertia: - inertiaRatio = STRONG_INERTIA_RATIO; - break; - } - } else if(_timerCount > 150) { - [_timer invalidate]; - _timer = nil; - _timerCount = 0; - return; - } else { - diffX = panLastDiffX*(1.0/_timerCount)*inertiaRatio; - diffY = panLastDiffY*(1.0/_timerCount)*inertiaRatio; - - [self rotate:-diffX diffy:diffY]; - } - - //NSLog(@"********** timerInfo : %d lastx %d lasty %d x %d y %d ratio %f **********", - // _timerCount, panLastDiffX, panLastDiffX, diffX, diffY, inertiaRatio); - _timerCount++; - - return; -} - - -/** - * Zoom in/Zoom out method - * @param ratio Zoom in/zoom out ratio - */ --(void) scale:(float) ratio { - - if (ratio < 1.0) { - cameraFovDegree = cameraFovDegree * (SCALE_RATIO_TICK_EXPANSION); - if (cameraFovDegree > CAMERA_FOV_DEGREE_MAX) { - cameraFovDegree = CAMERA_FOV_DEGREE_MAX; - } - } - else { - cameraFovDegree = cameraFovDegree * (SCALE_RATIO_TICK_REDUCTION); - if (cameraFovDegree < CAMERA_FOV_DEGREE_MIN) { - cameraFovDegree = CAMERA_FOV_DEGREE_MIN; - } - } - - //NSLog(@"cameraFovDegree: %f", cameraFovDegree); - - return; -} - -/** - * Rotation method - * @param diffx Rotation amount (y axis) - * @param diffy Rotation amount (xy plane) - */ --(void) rotate:(int) diffx diffy:(int) diffy { - - float xz; - float y; - - xz = (float)diffx / DIVIDE_ROTATE_X; - y = (float)diffy / DIVIDE_ROTATE_Y; - mRotationAngleXZ += xz; - mRotationAngleY += y; - if (mRotationAngleY > (M_PI/2)) { - mRotationAngleY = (M_PI/2); - } - if (mRotationAngleY < -(M_PI/2)) { - mRotationAngleY = -(M_PI/2); - } - - //NSLog(@"rotation angle: %f %f", mRotationAngleXZ, mRotationAngleY); - return; -} - -/** - * Method for creating OpenGL shader - * - * @param shaderType Shader type - * @param shaderSrc Shader source - */ --(GLuint) loadShader:(GLenum)shaderType shaderSrc:(NSString *)shaderSrc { - - GLuint shader; - GLint compiled; - const char* shaderRealSrc = [shaderSrc cStringUsingEncoding:NSUTF8StringEncoding]; - - shader = glCreateShader(shaderType); - if (0 == shader) { - return 0; - } - - glShaderSource(shader, 1, &shaderRealSrc, NULL); - glCompileShader(shader); - glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled); - - if (!compiled) { - - GLint infoLen = 0; - - glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen); - - if (infoLen > 1) { - char *infoLog = malloc(sizeof(char) * infoLen); - - glGetShaderInfoLog(shader, infoLen, NULL, infoLog); - NSLog(@"Error compiling shader:\n%s\n", infoLog); - - free(infoLog); - } - - glDeleteShader(shader); - return 0; - } - - return shader; -} - - -/** - * Program creation function for OpenGL - * @param vShaderSrc Vertex shader source - * @param fShaderSrc Fragment shader source - */ --(GLuint) loadProgram:(NSString*)vShaderSrc fShaderSrc:(NSString*)fShaderSrc { - - GLuint vertexShader; - GLuint fragmentShader; - GLuint program; - GLint linked; - - // load the vertex shader - vertexShader = [self loadShader:GL_VERTEX_SHADER shaderSrc:vShaderSrc]; - if (vertexShader == 0) { - return 0; - } - // load fragment shader - fragmentShader = [self loadShader:GL_FRAGMENT_SHADER shaderSrc:fShaderSrc]; - if (fragmentShader == 0) { - glDeleteShader(vertexShader); - return 0; - } - - // create the program object - program = glCreateProgram(); - if (program == 0) { - glDeleteShader(vertexShader); - glDeleteShader(fragmentShader); - return 0; - } - - glAttachShader(program, vertexShader); - glAttachShader(program, fragmentShader); - - // link the program - glLinkProgram(program); - - // check the link status - glGetProgramiv(program, GL_LINK_STATUS, &linked); - if (!linked) { - - GLint infoLen = 0; - - glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLen); - - if (infoLen > 1) { - char *infoLog = malloc (sizeof(char) * infoLen); - - glGetProgramInfoLog(program, infoLen, NULL, infoLog); - NSLog(@"Error linking program:\n%s\n", infoLog); - - free(infoLog); - } - - glDeleteProgram(program); - return 0; - } - - glDeleteShader(vertexShader); - glDeleteShader(fragmentShader); - - return program; -} - -/** - * Program validation and various shader variable validation methods for OpenGL - * @param program OpenGL Program variable - */ --(void) useAndAttachLocation:(GLuint) program { - - glUseProgram(program); - [self glCheckError:@"glUseProgram"]; - - aPosition = glGetAttribLocation(program, "aPosition"); - [self glCheckError:@"glGetAttribLocation position"]; - aUV = glGetAttribLocation(program, "aUV"); - [self glCheckError:@"glGetAttribLocation uv"]; - - uProjection = glGetUniformLocation(program, "uProjection"); - [self glCheckError:@"glGetUniformLocation projection"]; - uView = glGetUniformLocation(program, "uView"); - [self glCheckError:@"glGetUniformLocation view"]; - uModel = glGetUniformLocation(program, "uModel"); - [self glCheckError:@"glGetUniformLocation model"]; - uTex = glGetUniformLocation(program, "uTex"); - [self glCheckError:@"glGetUniformLocation texture"]; - - return; -} - -/** - * OpenGL Method for OpenGL error detection - * @param msg Output character string at detection - */ --(void) glCheckError:(NSString *) msg { - GLenum error; - - while (GL_NO_ERROR != (error = glGetError())) { - NSLog(@"GLERR: %d %@¥n", error, msg); - } - - return; -} - -- (void)tearDown { - - GLKTextureInfo *leftTexture = [_textureInfo objectForKey:@GL_TEXTURE0]; - GLKTextureInfo *rightTexture = [_textureInfo objectForKey:@GL_TEXTURE1]; - - if (nil != leftTexture) { - glActiveTexture(GL_TEXTURE0); - glBindTexture(leftTexture.target, 0); - GLuint t[] = {leftTexture.name}; - glDeleteTextures(1, t); - } - if (nil != rightTexture) { - glActiveTexture(GL_TEXTURE1); - glBindTexture(rightTexture.target, 0); - GLuint t[] = {rightTexture.name}; - glDeleteTextures(1, t); - } - self.context = nil; -} -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import +#import +#import +#import +#import "GLRenderView.h" +#import "UVSphere.h" +#import "ImageViewController.h" +#import "Constants.h" + + +NSString *vertexShader = @"" + "attribute vec4 aPosition;\n" + "attribute vec2 aUV;\n" + "uniform mat4 uProjection;\n" + "uniform mat4 uView;\n" + "uniform mat4 uModel;\n" + "varying vec2 vUV;\n" + "void main() {\n" + " gl_Position = uProjection * uView * uModel * aPosition;\n" + " vUV = aUV;\n" + "}\n"; +NSString *fragmentShader = @"" + "precision mediump float;\n" + "varying vec2 vUV;\n" + "uniform sampler2D uTex;\n" + "void main() {\n" + " gl_FragColor = texture2D(uTex, vUV);\n" + "}\n"; + + +/** + * View class for photo spherical display + * + * Images acquired from RICOH THETA S are created by equirectangular projection, + * with the images from camera #2 (left half) + camera #1 +camera#2 (right half) joined at the ends. + * These images can be acquired at a resolution of up to 5376 x 2688. + * + * These images are pasted as texture onto a spherical object on OpenGL using UVSphere + * from this class. As this sphere is drawn at an angle from -pi to pi on the xz plane, + * the UV coordinates are generated in this orientation and attached to the image, + * and are attached so that a mirror image is not generated in the x axis direction + * when viewed from the inside of the sphere. + * + * Furthermore, as the camera image is from angle -pi, the center of the image captured by + * camera #1 faces forward from the x axis. The camera image is slanted at the angle of elevation + * and horizontal angle, the sphere is rotated at each angle, and the image displayed in the x axis + * forward direction is adjusted to the horizontal direction of the image from camera#1. + * + * Pinch and pan operations support zooming in, zooming out and rotating. These are supported by + * changing the camera slant and FOV angle setting value. + */ +@interface GLRenderView (){ + UVSphere *half[2]; + + UIPanGestureRecognizer *panGestureRecognizer; + UIPinchGestureRecognizer *pinchGestureRecognizer; + + float _yaw; + float _roll; + float _pitch; + NSTimer *_timer; + uint _timerCount; + int _kindInertia; + float viewAspectRatio; + + GLKMatrix4 projectionMatrix; + GLKMatrix4 lookAtMatrix; + GLKMatrix4 modelMatrix; + + GLuint shaderProgram; + GLint aPosition; + GLint aUV; + + GLint uProjection; + GLint uView; + GLint uModel; + GLint uTex; + + NSDictionary *_textureInfo; + + float cameraPosX; + float cameraPosY; + float cameraPosZ; + float cameraDirectionX; + float cameraDirectionY; + float cameraDirectionZ; + float cameraUpX; + float cameraUpY; + float cameraUpZ; + + float cameraFovDegree; + + double mRotationAngleXZ; + double mRotationAngleY; + + BOOL inPanMode; + CGPoint panPrev; + int panLastDiffX; + int panLastDiffY; + double inertiaRatio; +} + +// opengl shader and program +-(GLuint) loadShader:(GLenum)shaderType shaderSrc:(NSString *)shaderSrc; +-(GLuint) loadProgram:(NSString*)vShaderSrc fShaderSrc:(NSString*)fShaderSrc; +-(void) useAndAttachLocation:(GLuint)program; + +-(void) glCheckError:(NSString *)msg; + +// gesture operations +-(void) scale:(float) scale; +-(void) rotate:(int) diffx diffy:(int) diffy; +@end + +@implementation GLRenderView + +/** + * Startup method + * @param frame Size on screen + */ +-(id) initWithFrame:(CGRect)frame{ + + self = [super initWithFrame:frame]; + + _timerCount = 0; + _timer = nil; + _kindInertia = NoneInertia; + + projectionMatrix = GLKMatrix4Identity; + lookAtMatrix = GLKMatrix4Identity; + modelMatrix = GLKMatrix4Identity; + + // set initial camera pos and direction + cameraPosX = 0.0f; + cameraPosY = 0.0f; + cameraPosZ = 0.0f; + cameraDirectionX = 1.0f; + cameraDirectionY = 0.0f; + cameraDirectionZ = 0.0f; + cameraUpX = 0.0f; + cameraUpY = 1.0f; + cameraUpZ = 0.0f; + + cameraFovDegree = CAMERA_FOV_DEGREE_INIT; + + inPanMode = FALSE; + + mRotationAngleXZ = 0.0f; + mRotationAngleY = 0.0f; + + EAGLContext *context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; + [EAGLContext setCurrentContext:context]; + self.context = context; + + if (self) { + [self registerGestures]; + [self initOpenGLSettings:context]; + half[0] = [[UVSphere alloc] init:SHELL_RADIUS divide:SHELL_DIVIDE rotate:0.0]; + half[1] = [[UVSphere alloc] init:SHELL_RADIUS divide:SHELL_DIVIDE rotate:M_PI]; + } + + NSLog(@"initwithframe frame: x: %f y: %f width %f height %f", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); + + return self; +} + + +/** + * Gesture registration method + */ +-(void) registerGestures{ + + panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureHandler:)]; + [panGestureRecognizer setMaximumNumberOfTouches:1]; + [self addGestureRecognizer:panGestureRecognizer]; + NSLog(@"add panGesture."); + + pinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinchGestureHandler:)]; + [self addGestureRecognizer:pinchGestureRecognizer]; + NSLog(@"add pinchGesture."); + + return; +} + +/** + * Texture registration method + * @param data Image for registration + * @param width Image width for registration + * @param height Image height for registration + * @param yaw Camera orientation angle + * @param pitch Camera elevation angle + * @param roll Camera horizontal angle + */ +-(void) setTexture:(NSMutableData*)data width:(int)width height:(int)height yaw:(float)yaw pitch:(float) pitch roll:(float) roll { + + NSError *error; + UIImage *image = [UIImage imageWithData:data]; + CGImageRef srcImageRef = [image CGImage]; + + // Create CGRect specifying clipping position. + CGRect leftArea = CGRectMake(0.f, 0.f, image.size.width / 2.f, image.size.height); + CGRect rightArea = CGRectMake(image.size.width / 2.f, 0.f, image.size.width, image.size.height); + + // Create clipped image using CoreGraphics function. + CGImageRef leftImageRef = CGImageCreateWithImageInRect(srcImageRef, leftArea); + CGImageRef rightImageRef = CGImageCreateWithImageInRect(srcImageRef, rightArea); + + GLKTextureInfo *leftTexture = [GLKTextureLoader textureWithCGImage:leftImageRef options:nil error:&error]; + GLKTextureInfo *rightTexture = [GLKTextureLoader textureWithCGImage:rightImageRef options:nil error:&error]; + + _textureInfo = @{@GL_TEXTURE0:leftTexture, + @GL_TEXTURE1:rightTexture}; + + for (id key in _textureInfo) { + glActiveTexture([key unsignedIntValue]); + glBindTexture(GL_TEXTURE_2D, ((GLKTextureInfo*)_textureInfo[key]).name); + + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } + + _yaw = yaw; + _roll = roll; + _pitch = pitch; + + return; +} + +/** + * OpenGL Initial value setting method + * @param context OpenGL Context + */ +-(void) initOpenGLSettings:(EAGLContext*)context{ + + float viewWidth = self.frame.size.width; + float viewHeight = self.frame.size.height; + + shaderProgram = [self loadProgram:vertexShader fShaderSrc:fragmentShader]; + [self useAndAttachLocation: shaderProgram]; + + //NSLog(@"frame width: %d hegith: %d", (int)self.frame.size.width, (int)self.frame.size.height); + + glClearColor(0.0f, 0.0f, 1.0f, 0.0f); + + viewAspectRatio = viewWidth/viewHeight; + glViewport(0, 0, viewWidth, viewHeight); + + return; +} + +/** + * Redraw method + */ +-(void) draw{ + + projectionMatrix = GLKMatrix4Identity; + lookAtMatrix = GLKMatrix4Identity; + modelMatrix = GLKMatrix4Identity; + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + cameraDirectionX = (float) (cos(mRotationAngleXZ)*cos(mRotationAngleY)); + cameraDirectionZ = (float) (sin(mRotationAngleXZ)*cos(mRotationAngleY)); + cameraDirectionY = (float) sin(mRotationAngleY); + + //NSLog(@"camera direction: %f %f %f", cameraDirectionX, cameraDirectionY, cameraDirectionZ); + + projectionMatrix = GLKMatrix4MakePerspective(GLKMathDegreesToRadians(cameraFovDegree), viewAspectRatio, Z_NEAR, Z_FAR); + lookAtMatrix = GLKMatrix4MakeLookAt(cameraPosX, cameraPosY, cameraPosZ, + cameraDirectionX, cameraDirectionY, cameraDirectionZ, + cameraUpX, cameraUpY, cameraUpZ); + + GLKMatrix4 elevetionAngleMatrix = GLKMatrix4MakeRotation(GLKMathDegreesToRadians(_pitch), 0, 0, 1); + modelMatrix = GLKMatrix4Multiply(modelMatrix, elevetionAngleMatrix); + GLKMatrix4 horizontalAngleMatrix = GLKMatrix4MakeRotation(GLKMathDegreesToRadians(_roll), 1, 0, 0); + modelMatrix = GLKMatrix4Multiply(modelMatrix, horizontalAngleMatrix); + + glEnableVertexAttribArray(aPosition); + glEnableVertexAttribArray(aUV); + + glUniformMatrix4fv(uModel, 1, GL_FALSE, modelMatrix.m); + [self glCheckError:@"glUniform4fv model"]; + glUniformMatrix4fv(uView, 1, GL_FALSE, lookAtMatrix.m); + [self glCheckError:@"glUniform4fv viewmatrix"]; + glUniformMatrix4fv(uProjection, 1, GL_FALSE, projectionMatrix.m); + [self glCheckError:@"glUniform4fv projectionmatrix"]; + + for (int i = 0; i < 2; ++i) { + glUniform1i(uTex, i); + [half[i] draw:aPosition uv:aUV]; + } + + glDisableVertexAttribArray(aPosition); + glDisableVertexAttribArray(aUV); + + return; +} + +/** + * Handler when touch start is detected + * @param touches Touch information + * @param event Event + */ +-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ + + [_timer invalidate]; + _timer = nil; + _timerCount = 0; + + inPanMode = false; + + //CGPoint startPos = [[touches anyObject] locationInView:self]; + //NSLog(@"touchesBegan:startPos x = %f, y = %f", startPos.x, startPos.y); + + return; +} + +/** + * Handler when touch is detected + * @param touches Touch information + * @param event Event + */ +-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { + //CGPoint movePos = [[touches anyObject] locationInView:self]; + //NSLog(@"touchesMoved x = %f, y = %f", movePos.x, movePos.y); + return; +} + +/** + * Handler when touch exit is detected + * @param touches Touch information + * @param event Event + */ +-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { + //NSLog(@"touchesEnded"); + return; +} + +/** + * Multiple gesture detection compatibility setting method + * @param gestureRecognizer Gesture that sent the message to the delegate + * @param otherGestureRecognizer Partner gesture recognized at the same time + */ +-(BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { + + return NO; +} + +/** + * Pinch operation compatibility handler + * @param recognizer Recognizer object for gesture operations + */ +-(void) pinchGestureHandler:(UIPinchGestureRecognizer*)recognizer { + + [self scale:[recognizer scale]]; + //NSLog(@"pinchHandler state = %d, zoom = %f, scale = %f", [sender state], zoom, [sender scale]); + + return; +} + +/** + * Pan operation compatibility handler + * @param recognizer Recognizer object for gesture operations + */ +-(void) panGestureHandler:(UIPanGestureRecognizer*)recognizer { + + CGPoint cur = [recognizer translationInView:self]; + + switch ([recognizer state]) { + case UIGestureRecognizerStateEnded: + //NSLog(@"pan gesture ended"); + [_timer invalidate]; + _timerCount = 0; + if(_kindInertia != NoneInertia) { + _timer = [NSTimer scheduledTimerWithTimeInterval:KNUM_INTERVAL_INERTIA + target:self + selector:@selector(timerInfo:) + userInfo:nil + repeats:YES]; + } + break; + default: + if (inPanMode) { + panLastDiffX = cur.x - panPrev.x; + panLastDiffY = cur.y - panPrev.y; + + panPrev = cur; + [self rotate:-panLastDiffX diffy:panLastDiffY]; + } + else { + inPanMode = true; + panPrev = cur; + } + break; + } + + //NSLog(@"pan handler state %d pos %f %f", [recognizer state], cur.x, cur.y); + return; +} + +/** + * Timer setting method + * @param timer Setting target timer + */ +-(void) timerInfo:(NSTimer *)timer +{ + int diffX = 0; + int diffY = 0; + + if (_timerCount == 0) { + inertiaRatio = 1.0; + switch (_kindInertia) { + case ShortInertia: + inertiaRatio = WEAK_INERTIA_RATIO; + break; + case LongInertia: + inertiaRatio = STRONG_INERTIA_RATIO; + break; + } + } else if(_timerCount > 150) { + [_timer invalidate]; + _timer = nil; + _timerCount = 0; + return; + } else { + diffX = panLastDiffX*(1.0/_timerCount)*inertiaRatio; + diffY = panLastDiffY*(1.0/_timerCount)*inertiaRatio; + + [self rotate:-diffX diffy:diffY]; + } + + //NSLog(@"********** timerInfo : %d lastx %d lasty %d x %d y %d ratio %f **********", + // _timerCount, panLastDiffX, panLastDiffX, diffX, diffY, inertiaRatio); + _timerCount++; + + return; +} + + +/** + * Zoom in/Zoom out method + * @param ratio Zoom in/zoom out ratio + */ +-(void) scale:(float) ratio { + + if (ratio < 1.0) { + cameraFovDegree = cameraFovDegree * (SCALE_RATIO_TICK_EXPANSION); + if (cameraFovDegree > CAMERA_FOV_DEGREE_MAX) { + cameraFovDegree = CAMERA_FOV_DEGREE_MAX; + } + } + else { + cameraFovDegree = cameraFovDegree * (SCALE_RATIO_TICK_REDUCTION); + if (cameraFovDegree < CAMERA_FOV_DEGREE_MIN) { + cameraFovDegree = CAMERA_FOV_DEGREE_MIN; + } + } + + //NSLog(@"cameraFovDegree: %f", cameraFovDegree); + + return; +} + +/** + * Rotation method + * @param diffx Rotation amount (y axis) + * @param diffy Rotation amount (xy plane) + */ +-(void) rotate:(int) diffx diffy:(int) diffy { + + float xz; + float y; + + xz = (float)diffx / DIVIDE_ROTATE_X; + y = (float)diffy / DIVIDE_ROTATE_Y; + mRotationAngleXZ += xz; + mRotationAngleY += y; + if (mRotationAngleY > (M_PI/2)) { + mRotationAngleY = (M_PI/2); + } + if (mRotationAngleY < -(M_PI/2)) { + mRotationAngleY = -(M_PI/2); + } + + //NSLog(@"rotation angle: %f %f", mRotationAngleXZ, mRotationAngleY); + return; +} + +/** + * Method for creating OpenGL shader + * + * @param shaderType Shader type + * @param shaderSrc Shader source + */ +-(GLuint) loadShader:(GLenum)shaderType shaderSrc:(NSString *)shaderSrc { + + GLuint shader; + GLint compiled; + const char* shaderRealSrc = [shaderSrc cStringUsingEncoding:NSUTF8StringEncoding]; + + shader = glCreateShader(shaderType); + if (0 == shader) { + return 0; + } + + glShaderSource(shader, 1, &shaderRealSrc, NULL); + glCompileShader(shader); + glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled); + + if (!compiled) { + + GLint infoLen = 0; + + glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen); + + if (infoLen > 1) { + char *infoLog = malloc(sizeof(char) * infoLen); + + glGetShaderInfoLog(shader, infoLen, NULL, infoLog); + NSLog(@"Error compiling shader:\n%s\n", infoLog); + + free(infoLog); + } + + glDeleteShader(shader); + return 0; + } + + return shader; +} + + +/** + * Program creation function for OpenGL + * @param vShaderSrc Vertex shader source + * @param fShaderSrc Fragment shader source + */ +-(GLuint) loadProgram:(NSString*)vShaderSrc fShaderSrc:(NSString*)fShaderSrc { + + GLuint vertexShader; + GLuint fragmentShader; + GLuint program; + GLint linked; + + // load the vertex shader + vertexShader = [self loadShader:GL_VERTEX_SHADER shaderSrc:vShaderSrc]; + if (vertexShader == 0) { + return 0; + } + // load fragment shader + fragmentShader = [self loadShader:GL_FRAGMENT_SHADER shaderSrc:fShaderSrc]; + if (fragmentShader == 0) { + glDeleteShader(vertexShader); + return 0; + } + + // create the program object + program = glCreateProgram(); + if (program == 0) { + glDeleteShader(vertexShader); + glDeleteShader(fragmentShader); + return 0; + } + + glAttachShader(program, vertexShader); + glAttachShader(program, fragmentShader); + + // link the program + glLinkProgram(program); + + // check the link status + glGetProgramiv(program, GL_LINK_STATUS, &linked); + if (!linked) { + + GLint infoLen = 0; + + glGetProgramiv(program, GL_INFO_LOG_LENGTH, &infoLen); + + if (infoLen > 1) { + char *infoLog = malloc (sizeof(char) * infoLen); + + glGetProgramInfoLog(program, infoLen, NULL, infoLog); + NSLog(@"Error linking program:\n%s\n", infoLog); + + free(infoLog); + } + + glDeleteProgram(program); + return 0; + } + + glDeleteShader(vertexShader); + glDeleteShader(fragmentShader); + + return program; +} + +/** + * Program validation and various shader variable validation methods for OpenGL + * @param program OpenGL Program variable + */ +-(void) useAndAttachLocation:(GLuint) program { + + glUseProgram(program); + [self glCheckError:@"glUseProgram"]; + + aPosition = glGetAttribLocation(program, "aPosition"); + [self glCheckError:@"glGetAttribLocation position"]; + aUV = glGetAttribLocation(program, "aUV"); + [self glCheckError:@"glGetAttribLocation uv"]; + + uProjection = glGetUniformLocation(program, "uProjection"); + [self glCheckError:@"glGetUniformLocation projection"]; + uView = glGetUniformLocation(program, "uView"); + [self glCheckError:@"glGetUniformLocation view"]; + uModel = glGetUniformLocation(program, "uModel"); + [self glCheckError:@"glGetUniformLocation model"]; + uTex = glGetUniformLocation(program, "uTex"); + [self glCheckError:@"glGetUniformLocation texture"]; + + return; +} + +/** + * OpenGL Method for OpenGL error detection + * @param msg Output character string at detection + */ +-(void) glCheckError:(NSString *) msg { + GLenum error; + + while (GL_NO_ERROR != (error = glGetError())) { + NSLog(@"GLERR: %d %@¥n", error, msg); + } + + return; +} + +- (void)tearDown { + + GLKTextureInfo *leftTexture = [_textureInfo objectForKey:@GL_TEXTURE0]; + GLKTextureInfo *rightTexture = [_textureInfo objectForKey:@GL_TEXTURE1]; + + if (nil != leftTexture) { + glActiveTexture(GL_TEXTURE0); + glBindTexture(leftTexture.target, 0); + GLuint t[] = {leftTexture.name}; + glDeleteTextures(1, t); + } + if (nil != rightTexture) { + glActiveTexture(GL_TEXTURE1); + glBindTexture(rightTexture.target, 0); + GLuint t[] = {rightTexture.name}; + glDeleteTextures(1, t); + } + self.context = nil; +} +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ImageViewController.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ImageViewController.h index 926d057..27a635d 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ImageViewController.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ImageViewController.h @@ -1,31 +1,31 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import -#import -#import "HttpSession.h" - -@class HttpImageInfo; - -#define KINT_HIGHT_INTERVAL_BUTTON 54 - -typedef enum : int { - NoneInertia = 0, - ShortInertia, - LongInertia -} enumInertia; - -@interface ImageViewController : UIViewController - -@property (nonatomic, strong) IBOutlet UIImageView* imageView; -@property (nonatomic, strong) IBOutlet UITextView* textView; -@property (nonatomic, strong) IBOutlet UIProgressView* progressView; -@property (nonatomic, strong) IBOutlet UIButton *closeButton; -@property (nonatomic, strong) IBOutlet UIButton *configButton; - -- (IBAction)onCloseClicked:(id)sender; -- (void)getObject:(HttpImageInfo *)imageInfo withSession:(HttpSession *)session; -- (IBAction)onConfig:(id)sender; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import +#import +#import "HttpSession.h" + +@class HttpImageInfo; + +#define KINT_HIGHT_INTERVAL_BUTTON 54 + +typedef enum : int { + NoneInertia = 0, + ShortInertia, + LongInertia +} enumInertia; + +@interface ImageViewController : UIViewController + +@property (nonatomic, strong) IBOutlet UIImageView* imageView; +@property (nonatomic, strong) IBOutlet UITextView* textView; +@property (nonatomic, strong) IBOutlet UIProgressView* progressView; +@property (nonatomic, strong) IBOutlet UIButton *closeButton; +@property (nonatomic, strong) IBOutlet UIButton *configButton; + +- (IBAction)onCloseClicked:(id)sender; +- (void)getObject:(HttpImageInfo *)imageInfo withSession:(HttpSession *)session; +- (IBAction)onConfig:(id)sender; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ImageViewController.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ImageViewController.m index 89281dd..cbeedce 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ImageViewController.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ImageViewController.m @@ -1,207 +1,207 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "ImageViewController.h" -#import "glkViewController.h" -#import "GLRenderView.h" -#import "SphereXmp.h" -#import "HttpImageInfo.h" - -@interface ImageViewController () -{ - HttpImageInfo *_httpImageInfo; - HttpSession *_session; - NSMutableData *_imageData; - int imageWidth; - int imageHeight; - GlkViewController *glkViewController; - float _yaw; - float _roll; - float _pitch; -} -@end - -@implementation ImageViewController - -- (void)appendLog:(NSString*)text -{ - [_textView setText:[NSString stringWithFormat:@"%@%@\n", _textView.text, text]]; - [_textView scrollRangeToVisible:NSMakeRange([_textView.text length], 0)]; -} - -#pragma mark - UI events - -- (void)onCloseClicked:(id)sender -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - -- (void)myCloseClicked:(id)sender -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - -- (IBAction)onConfig:(id)sender { -} - -- (void)myConfig:(id)sender { - NSLog(@"myConfig"); - - // Set text style according to current settings - int current = (glkViewController.glRenderView.kindInertia); - UIAlertActionStyle noneStyle = (current == NoneInertia) ? UIAlertActionStyleDestructive : UIAlertActionStyleDefault; - UIAlertActionStyle weakStyle = (current == ShortInertia) ? UIAlertActionStyleDestructive : UIAlertActionStyleDefault; - UIAlertActionStyle strongStyle = (current == LongInertia) ? UIAlertActionStyleDestructive : UIAlertActionStyleDefault; - - UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Inertia" - message:nil - preferredStyle:UIAlertControllerStyleActionSheet]; - UIAlertAction* noneAction = [UIAlertAction actionWithTitle:@"none" - style:noneStyle - handler:^(UIAlertAction *action) { - NSLog(@"noInertia"); - glkViewController.glRenderView.kindInertia = NoneInertia; - }]; - UIAlertAction* weakAction = [UIAlertAction actionWithTitle:@"weak" - style:weakStyle - handler:^(UIAlertAction *action) { - NSLog(@"shortInertia"); - glkViewController.glRenderView.kindInertia = ShortInertia; - }]; - UIAlertAction* strongAction = [UIAlertAction actionWithTitle:@"strong" - style:strongStyle - handler:^(UIAlertAction *action) { - NSLog(@"longInertia"); - glkViewController.glRenderView.kindInertia = LongInertia; - }]; - UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" - style:UIAlertActionStyleCancel - handler:nil]; - [alert addAction:noneAction]; - [alert addAction:weakAction]; - [alert addAction:strongAction]; - [alert addAction:cancelAction]; - [self presentViewController:alert animated:YES completion:nil]; -} - -#pragma mark - HTTP Operation - -- (void)getObject:(HttpImageInfo *)imageInfo withSession:(HttpSession *)session -{ - dispatch_async(dispatch_get_main_queue(), ^{ - _progressView.progress = 0.0; - _progressView.hidden = NO; - }); - - _httpImageInfo = imageInfo; - _session = session; - NSString *fileUri = imageInfo.file_id; - // Semaphore for synchronization (cannot be entered until signal is called) - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - [session getResizedImageObject:fileUri - onStart:^(int64_t totalLength) { - // Callback before object-data reception. - NSLog(@"getObject(%@) will received %zd bytes.", fileUri, totalLength); - } - onWrite:^(int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite) { - // Callback for each chunks. - dispatch_async(dispatch_get_main_queue(), ^{ - // Update progress. - _progressView.progress = (float)totalBytesWritten / totalBytesExpectedToWrite; - }); - } - onFinish:^(NSURL *location){ - _imageData = [NSMutableData dataWithContentsOfURL:location]; - dispatch_semaphore_signal(semaphore); - }]; - - // Wait until signal is called - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - - // Parse XMP data, it contains the data to correct the tilt. - SphereXmp *xmp = [[SphereXmp alloc] init]; - [xmp parse:_imageData]; - - // If there is no information, yaw, pitch and roll method returns NaN. - NSString* tiltInfo = [NSString stringWithFormat:@"yaw:%@ pitch:%@ roll:%@", - xmp.yaw, xmp.pitch, xmp.roll]; - - _yaw = [xmp.yaw floatValue]; // 0.0 if conversion fails - _pitch = [xmp.pitch floatValue]; // 0.0 if conversion fails - _roll = [xmp.roll floatValue]; // 0.0 if conversion fails - - dispatch_async(dispatch_get_main_queue(), ^{ - _progressView.hidden = YES; - [self appendLog:tiltInfo]; - [self startGLK]; - }); -} - -#pragma mark - Life cycle - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Custom initialization - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; -} - - -- (void)viewWillAppear:(BOOL)animated { - if (nil != _httpImageInfo && CODE_JPEG == _httpImageInfo.file_format) { - _progressView.hidden = NO; - } - else { - _progressView.hidden = YES; - } - -} - - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - _textView.text = nil; - _imageView.image = nil; -} - -#pragma make - operation - -- (void)startGLK -{ - glkViewController = [[GlkViewController alloc] init:_imageView.frame image:_imageData width:imageWidth height:imageHeight yaw:_yaw roll:_roll pitch:_pitch]; - glkViewController.view.frame = _imageView.frame; - - - NSLog(@"startGLK imageData: %@", [[NSString alloc] initWithData:_imageData encoding:NSUTF8StringEncoding]); - NSLog(@"startGLK: frame %f %f %f %f", _imageView.frame.origin.x, _imageView.frame.origin.y, _imageView.frame.size.width, _imageView.frame.size.height); - - [self.view addSubview:glkViewController.view]; - - UIButton *myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - myButton.frame = _closeButton.frame; - [myButton setTitle:_closeButton.currentTitle forState:UIControlStateNormal]; - [myButton addTarget:self action:@selector(myCloseClicked:) forControlEvents:UIControlEventTouchUpInside]; - [glkViewController.view addSubview:myButton]; - - UIButton *myConfigButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - myConfigButton.frame = _configButton.frame; - [myConfigButton setTitle:_configButton.currentTitle forState:UIControlStateNormal]; - [myConfigButton addTarget:self action:@selector(myConfig:) forControlEvents:UIControlEventTouchUpInside]; - [glkViewController.view addSubview:myConfigButton]; - - [self addChildViewController:glkViewController]; - [glkViewController didMoveToParentViewController:self]; -} - - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "ImageViewController.h" +#import "glkViewController.h" +#import "GLRenderView.h" +#import "SphereXmp.h" +#import "HttpImageInfo.h" + +@interface ImageViewController () +{ + HttpImageInfo *_httpImageInfo; + HttpSession *_session; + NSMutableData *_imageData; + int imageWidth; + int imageHeight; + GlkViewController *glkViewController; + float _yaw; + float _roll; + float _pitch; +} +@end + +@implementation ImageViewController + +- (void)appendLog:(NSString*)text +{ + [_textView setText:[NSString stringWithFormat:@"%@%@\n", _textView.text, text]]; + [_textView scrollRangeToVisible:NSMakeRange([_textView.text length], 0)]; +} + +#pragma mark - UI events + +- (void)onCloseClicked:(id)sender +{ + [self dismissViewControllerAnimated:YES completion:nil]; +} + +- (void)myCloseClicked:(id)sender +{ + [self dismissViewControllerAnimated:YES completion:nil]; +} + +- (IBAction)onConfig:(id)sender { +} + +- (void)myConfig:(id)sender { + NSLog(@"myConfig"); + + // Set text style according to current settings + int current = (glkViewController.glRenderView.kindInertia); + UIAlertActionStyle noneStyle = (current == NoneInertia) ? UIAlertActionStyleDestructive : UIAlertActionStyleDefault; + UIAlertActionStyle weakStyle = (current == ShortInertia) ? UIAlertActionStyleDestructive : UIAlertActionStyleDefault; + UIAlertActionStyle strongStyle = (current == LongInertia) ? UIAlertActionStyleDestructive : UIAlertActionStyleDefault; + + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Inertia" + message:nil + preferredStyle:UIAlertControllerStyleActionSheet]; + UIAlertAction* noneAction = [UIAlertAction actionWithTitle:@"none" + style:noneStyle + handler:^(UIAlertAction *action) { + NSLog(@"noInertia"); + glkViewController.glRenderView.kindInertia = NoneInertia; + }]; + UIAlertAction* weakAction = [UIAlertAction actionWithTitle:@"weak" + style:weakStyle + handler:^(UIAlertAction *action) { + NSLog(@"shortInertia"); + glkViewController.glRenderView.kindInertia = ShortInertia; + }]; + UIAlertAction* strongAction = [UIAlertAction actionWithTitle:@"strong" + style:strongStyle + handler:^(UIAlertAction *action) { + NSLog(@"longInertia"); + glkViewController.glRenderView.kindInertia = LongInertia; + }]; + UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" + style:UIAlertActionStyleCancel + handler:nil]; + [alert addAction:noneAction]; + [alert addAction:weakAction]; + [alert addAction:strongAction]; + [alert addAction:cancelAction]; + [self presentViewController:alert animated:YES completion:nil]; +} + +#pragma mark - HTTP Operation + +- (void)getObject:(HttpImageInfo *)imageInfo withSession:(HttpSession *)session +{ + dispatch_async(dispatch_get_main_queue(), ^{ + _progressView.progress = 0.0; + _progressView.hidden = NO; + }); + + _httpImageInfo = imageInfo; + _session = session; + NSString *fileUri = imageInfo.file_id; + // Semaphore for synchronization (cannot be entered until signal is called) + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + + [session getResizedImageObject:fileUri + onStart:^(int64_t totalLength) { + // Callback before object-data reception. + NSLog(@"getObject(%@) will received %zd bytes.", fileUri, totalLength); + } + onWrite:^(int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite) { + // Callback for each chunks. + dispatch_async(dispatch_get_main_queue(), ^{ + // Update progress. + _progressView.progress = (float)totalBytesWritten / totalBytesExpectedToWrite; + }); + } + onFinish:^(NSURL *location){ + _imageData = [NSMutableData dataWithContentsOfURL:location]; + dispatch_semaphore_signal(semaphore); + }]; + + // Wait until signal is called + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + + // Parse XMP data, it contains the data to correct the tilt. + SphereXmp *xmp = [[SphereXmp alloc] init]; + [xmp parse:_imageData]; + + // If there is no information, yaw, pitch and roll method returns NaN. + NSString* tiltInfo = [NSString stringWithFormat:@"yaw:%@ pitch:%@ roll:%@", + xmp.yaw, xmp.pitch, xmp.roll]; + + _yaw = [xmp.yaw floatValue]; // 0.0 if conversion fails + _pitch = [xmp.pitch floatValue]; // 0.0 if conversion fails + _roll = [xmp.roll floatValue]; // 0.0 if conversion fails + + dispatch_async(dispatch_get_main_queue(), ^{ + _progressView.hidden = YES; + [self appendLog:tiltInfo]; + [self startGLK]; + }); +} + +#pragma mark - Life cycle + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; +} + + +- (void)viewWillAppear:(BOOL)animated { + if (nil != _httpImageInfo && CODE_JPEG == _httpImageInfo.file_format) { + _progressView.hidden = NO; + } + else { + _progressView.hidden = YES; + } + +} + + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + _textView.text = nil; + _imageView.image = nil; +} + +#pragma make - operation + +- (void)startGLK +{ + glkViewController = [[GlkViewController alloc] init:_imageView.frame image:_imageData width:imageWidth height:imageHeight yaw:_yaw roll:_roll pitch:_pitch]; + glkViewController.view.frame = _imageView.frame; + + + NSLog(@"startGLK imageData: %@", [[NSString alloc] initWithData:_imageData encoding:NSUTF8StringEncoding]); + NSLog(@"startGLK: frame %f %f %f %f", _imageView.frame.origin.x, _imageView.frame.origin.y, _imageView.frame.size.width, _imageView.frame.size.height); + + [self.view addSubview:glkViewController.view]; + + UIButton *myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; + myButton.frame = _closeButton.frame; + [myButton setTitle:_closeButton.currentTitle forState:UIControlStateNormal]; + [myButton addTarget:self action:@selector(myCloseClicked:) forControlEvents:UIControlEventTouchUpInside]; + [glkViewController.view addSubview:myButton]; + + UIButton *myConfigButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; + myConfigButton.frame = _configButton.frame; + [myConfigButton setTitle:_configButton.currentTitle forState:UIControlStateNormal]; + [myConfigButton addTarget:self action:@selector(myConfig:) forControlEvents:UIControlEventTouchUpInside]; + [glkViewController.view addSubview:myConfigButton]; + + [self addChildViewController:glkViewController]; + [glkViewController didMoveToParentViewController:self]; +} + + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/SphereXmp.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/SphereXmp.h index 407785d..325a645 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/SphereXmp.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/SphereXmp.h @@ -1,14 +1,14 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -@interface SphereXmp : NSObject - -@property NSString *yaw; -@property NSString *pitch; -@property NSString *roll; - -- (BOOL)parse:(NSData*)original; -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +@interface SphereXmp : NSObject + +@property NSString *yaw; +@property NSString *pitch; +@property NSString *roll; + +- (BOOL)parse:(NSData*)original; +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/SphereXmp.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/SphereXmp.m index 89ba0c1..bdd4b39 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/SphereXmp.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/SphereXmp.m @@ -1,133 +1,133 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "SphereXmp.h" - -static const NSString *XMP_START_ELEMENT = @""; -static NSString* const XMP_TAG_NAME_YAW = @"GPano:PoseHeadingDegrees"; -static NSString* const XMP_TAG_NAME_PITCH = @"GPano:PosePitchDegrees"; -static NSString* const XMP_TAG_NAME_ROLL = @"GPano:PoseRollDegrees"; - -/** - * XMP information class included in image data - * The read information is kept in the properties. - */ -@interface SphereXmp() -{ - BOOL _isFoundYaw; - BOOL _isFoundPitch; - BOOL _isFoundRoll; - BOOL _result; -} -@end - -@implementation SphereXmp - -/** - * Start analysis - * @param original Image data - * @return Analysis successful? - */ -- (BOOL)parse:(NSData*)original -{ - _isFoundYaw = NO; - _isFoundPitch = NO; - _isFoundRoll = NO; - _result = NO; - - NSData *startElement = [XMP_START_ELEMENT dataUsingEncoding:NSASCIIStringEncoding]; - NSData *endElement = [XMP_END_ELEMENT dataUsingEncoding:NSASCIIStringEncoding]; - NSUInteger startXmpIndex = [self indexOf:startElement in:original from:0]; - NSUInteger endXmpIndex = [self indexOf:endElement in:original from:startXmpIndex]; - NSData *subData = [original subdataWithRange:NSMakeRange(startXmpIndex, endXmpIndex + endElement.length)]; - NSXMLParser *parser = [[NSXMLParser alloc] initWithData:subData]; - parser.delegate = self; - - // Start analysis - [parser parse]; - return _result; -} - -/** - * Delegates called when XML tags are read during successive processes - * @param parser XML parser - * @param elementName Element name - * @param namespaceURI Name space URI - * @param qName Modified name - * @param attributeDict Attribute dictionary - */ -- (void) parser:(NSXMLParser *)parser -didStartElement:(NSString *)elementName - namespaceURI:(NSString *)namespaceURI - qualifiedName:(NSString *)qName - attributes:(NSDictionary *)attributeDict -{ - if ([elementName isEqualToString:XMP_TAG_NAME_YAW]) { - _isFoundYaw =YES; - } else if ([elementName isEqualToString:XMP_TAG_NAME_PITCH]) { - _isFoundPitch = YES; - } else if ([elementName isEqualToString:XMP_TAG_NAME_ROLL]) { - _isFoundRoll =YES; - } -} - -/** - * Delegates called when character strings other than XML tags are read during successive processes - * @param parser XML parser - * @param string Read character string - */ -- (void) parser:(NSXMLParser *)parser foundCharacters:(NSString *)string -{ - if (_isFoundYaw) { - _yaw=string; - _isFoundYaw = NO; - } else if (_isFoundPitch) { - _pitch = string; - _isFoundPitch = NO; - } else if (_isFoundRoll) { - _roll = string; - _isFoundRoll = NO; - } -} - -/** - * Delegate called when XML analysis is successful - * @param parser XML parser - */ --(void) parserDidEndDocument:(NSXMLParser *)parser -{ - _result = YES; -} - -/** - * Delegate called when XML analysis fails - * @param parser XML parser - * @param parseError Error information - */ -- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError -{ - _result = NO; -} - -/** - * Search position of specific data pattern - * @param sub Searched data - * @param original Searched data - * @param startIndex Search start position - * @return The position where the searched data starts. "0" is returned if there are no hits. - */ -- (NSUInteger)indexOf:(NSData*)sub in:(NSData*)original from:(NSUInteger)startIndex -{ - Byte temporary[sub.length]; - NSUInteger maxSearch = original.length - sub.length; - for (NSUInteger i = startIndex; i <= maxSearch; ++i) { - [original getBytes:temporary range:NSMakeRange(i, sub.length)]; - if (!memcmp(temporary, sub.bytes, sub.length)) { - return i; - } - } - return 0; -} -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "SphereXmp.h" + +static const NSString *XMP_START_ELEMENT = @""; +static NSString* const XMP_TAG_NAME_YAW = @"GPano:PoseHeadingDegrees"; +static NSString* const XMP_TAG_NAME_PITCH = @"GPano:PosePitchDegrees"; +static NSString* const XMP_TAG_NAME_ROLL = @"GPano:PoseRollDegrees"; + +/** + * XMP information class included in image data + * The read information is kept in the properties. + */ +@interface SphereXmp() +{ + BOOL _isFoundYaw; + BOOL _isFoundPitch; + BOOL _isFoundRoll; + BOOL _result; +} +@end + +@implementation SphereXmp + +/** + * Start analysis + * @param original Image data + * @return Analysis successful? + */ +- (BOOL)parse:(NSData*)original +{ + _isFoundYaw = NO; + _isFoundPitch = NO; + _isFoundRoll = NO; + _result = NO; + + NSData *startElement = [XMP_START_ELEMENT dataUsingEncoding:NSASCIIStringEncoding]; + NSData *endElement = [XMP_END_ELEMENT dataUsingEncoding:NSASCIIStringEncoding]; + NSUInteger startXmpIndex = [self indexOf:startElement in:original from:0]; + NSUInteger endXmpIndex = [self indexOf:endElement in:original from:startXmpIndex]; + NSData *subData = [original subdataWithRange:NSMakeRange(startXmpIndex, endXmpIndex + endElement.length)]; + NSXMLParser *parser = [[NSXMLParser alloc] initWithData:subData]; + parser.delegate = self; + + // Start analysis + [parser parse]; + return _result; +} + +/** + * Delegates called when XML tags are read during successive processes + * @param parser XML parser + * @param elementName Element name + * @param namespaceURI Name space URI + * @param qName Modified name + * @param attributeDict Attribute dictionary + */ +- (void) parser:(NSXMLParser *)parser +didStartElement:(NSString *)elementName + namespaceURI:(NSString *)namespaceURI + qualifiedName:(NSString *)qName + attributes:(NSDictionary *)attributeDict +{ + if ([elementName isEqualToString:XMP_TAG_NAME_YAW]) { + _isFoundYaw =YES; + } else if ([elementName isEqualToString:XMP_TAG_NAME_PITCH]) { + _isFoundPitch = YES; + } else if ([elementName isEqualToString:XMP_TAG_NAME_ROLL]) { + _isFoundRoll =YES; + } +} + +/** + * Delegates called when character strings other than XML tags are read during successive processes + * @param parser XML parser + * @param string Read character string + */ +- (void) parser:(NSXMLParser *)parser foundCharacters:(NSString *)string +{ + if (_isFoundYaw) { + _yaw=string; + _isFoundYaw = NO; + } else if (_isFoundPitch) { + _pitch = string; + _isFoundPitch = NO; + } else if (_isFoundRoll) { + _roll = string; + _isFoundRoll = NO; + } +} + +/** + * Delegate called when XML analysis is successful + * @param parser XML parser + */ +-(void) parserDidEndDocument:(NSXMLParser *)parser +{ + _result = YES; +} + +/** + * Delegate called when XML analysis fails + * @param parser XML parser + * @param parseError Error information + */ +- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError +{ + _result = NO; +} + +/** + * Search position of specific data pattern + * @param sub Searched data + * @param original Searched data + * @param startIndex Search start position + * @return The position where the searched data starts. "0" is returned if there are no hits. + */ +- (NSUInteger)indexOf:(NSData*)sub in:(NSData*)original from:(NSUInteger)startIndex +{ + Byte temporary[sub.length]; + NSUInteger maxSearch = original.length - sub.length; + for (NSUInteger i = startIndex; i <= maxSearch; ++i) { + [original getBytes:temporary range:NSMakeRange(i, sub.length)]; + if (!memcmp(temporary, sub.bytes, sub.length)) { + return i; + } + } + return 0; +} +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCell.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCell.h index a625030..e52dd64 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCell.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCell.h @@ -1,11 +1,11 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -@interface TableCell : UITableViewCell - -@property (nonatomic) uint32_t objectIndex; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +@interface TableCell : UITableViewCell + +@property (nonatomic) uint32_t objectIndex; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCell.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCell.m index 1e85ef9..324aeed 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCell.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCell.m @@ -1,11 +1,11 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "TableCell.h" - -@implementation TableCell - -@synthesize objectIndex = _objectIndex; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "TableCell.h" + +@implementation TableCell + +@synthesize objectIndex = _objectIndex; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCellObject.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCellObject.h index 5549de3..1fc318e 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCellObject.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCellObject.h @@ -1,20 +1,20 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import -#import -#import "HttpImageInfo.h" - -@interface TableCellObject : NSObject - -@property (nonatomic) UIImage* thumbnail; -@property (nonatomic) HttpImageInfo* objectInfo; - -/** - * Function for object creation - * @param info - */ -+ (id)objectWithInfo:(HttpImageInfo*)info; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import +#import +#import "HttpImageInfo.h" + +@interface TableCellObject : NSObject + +@property (nonatomic) UIImage* thumbnail; +@property (nonatomic) HttpImageInfo* objectInfo; + +/** + * Function for object creation + * @param info + */ ++ (id)objectWithInfo:(HttpImageInfo*)info; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCellObject.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCellObject.m index c07cd26..c7584c5 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCellObject.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/TableCellObject.m @@ -1,16 +1,16 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "TableCellObject.h" - -@implementation TableCellObject - -+ (id)objectWithInfo:(HttpImageInfo*)info -{ - TableCellObject *object = [[TableCellObject alloc] init]; - object.objectInfo = info; - return object; -} - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "TableCellObject.h" + +@implementation TableCellObject + ++ (id)objectWithInfo:(HttpImageInfo*)info +{ + TableCellObject *object = [[TableCellObject alloc] init]; + object.objectInfo = info; + return object; +} + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/UVSphere.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/UVSphere.h index f9eda0c..3cc96bd 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/UVSphere.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/UVSphere.h @@ -1,18 +1,18 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -#ifndef ricoh_theta_sample_for_ios_UVSphere_h -#define ricoh_theta_sample_for_ios_UVSphere_h - -@interface UVSphere : NSObject - --(id) init:(GLfloat)radius divide:(int)divide rotate:(double)rotate; - --(void) draw:(GLint) posLocation uv:(GLint) uvLocation; - -@end - -#endif +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +#ifndef ricoh_theta_sample_for_ios_UVSphere_h +#define ricoh_theta_sample_for_ios_UVSphere_h + +@interface UVSphere : NSObject + +-(id) init:(GLfloat)radius divide:(int)divide rotate:(double)rotate; + +-(void) draw:(GLint) posLocation uv:(GLint) uvLocation; + +@end + +#endif diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/UVSphere.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/UVSphere.m index 2680218..5a23216 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/UVSphere.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/UVSphere.m @@ -1,115 +1,115 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import -#import -#import -#import -#import -#import "UVSphere.h" - -/** - * UV sphere creation class - */ -@interface UVSphere (){ - - GLfloat **vertexArray; - GLfloat **texCoordsArray; - int mDivide; -} - -@end - -@implementation UVSphere - -/** - * Method for UV sphere creation - * Sphere is created at the specified radius centered on the origin. - * UV sphere and corresponding texture UV coordinates are created by creating a divide/2 band - * in the longitudinal direction and dividing the band by the divide number. - * - * @param radius Radius - * @param divide Polygon partition parameter - * @param rotate Rotation angle (radian) in horizontal direction (yaw) - */ --(id) init:(GLfloat)radius divide:(int)divide rotate:(double)rotate { - - int i; - int j; - double altitude; - double altitudeDelta; - double azimuth; - - if((self = [super init])){ - - mDivide = divide; - - vertexArray = malloc(sizeof(GLfloat *)*mDivide/2); - texCoordsArray = malloc(sizeof(GLfloat *)*mDivide/2); - - for(i = 0; i < (mDivide/2); i++){ - - altitude = M_PI/2.0 - ( i ) * (M_PI*2/mDivide); - altitudeDelta = M_PI/2.0 - (i+1) * (M_PI*2/mDivide); - - GLfloat *vertices = malloc(sizeof(GLfloat)*((mDivide+1)*6)); - GLfloat *texCoords = malloc(sizeof(GLfloat)*((mDivide+1)*4)); - - for(j = 0; j <= mDivide/2; j++){ - - azimuth = rotate - ((float)j) * (2*M_PI/(float)(mDivide)); - - // 1st point - vertices[j*6+0] = radius * cos(altitudeDelta) * cos(azimuth); - vertices[j*6+1] = radius * sin(altitudeDelta); - vertices[j*6+2] = radius * cos(altitudeDelta) * sin(azimuth); - - texCoords[j*4+0] = 1.0 - (2.0 * j / (float)(mDivide)); - texCoords[j*4+1] = 2*(i + 1) / (float)(mDivide); - - // 2nd point - vertices[j*6+3] = radius * cos(altitude) * cos(azimuth); - vertices[j*6+4] = radius * sin(altitude); - vertices[j*6+5] = radius * cos(altitude) * sin(azimuth); - - texCoords[j*4+2] = 1.0 - (2.0 * j / (float)(mDivide)); - texCoords[j*4+3] = 2 * i / (float)(mDivide); - } - - vertexArray[i] = vertices; - texCoordsArray[i] = texCoords; - } - } - return self; -} - - -/** - * Method for drawing spheres - * Variables connected to the shader are used for drawing. - * It is assumed that shader variables are activated. - * - * @param posLocation Attribute compatibility variable for shader connected to the position - * @param uvLocation Attribute compatibility variable for shader connected to the UV space - */ --(void) draw:(GLint) posLocation uv:(GLint) uvLocation { - - GLfloat *vertices; - GLfloat *texCoords; - - for (int i = 0; i < (mDivide/2); i++) { - vertices = vertexArray[i]; - texCoords = texCoordsArray[i]; - - glVertexAttribPointer(posLocation, 3, GL_FLOAT, false, 0, vertices); - glVertexAttribPointer(uvLocation, 2, GL_FLOAT, false, 0, texCoords); - - glDrawArrays(GL_TRIANGLE_STRIP, 0, mDivide+2); - } - - return; -} - - +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import +#import +#import +#import +#import +#import "UVSphere.h" + +/** + * UV sphere creation class + */ +@interface UVSphere (){ + + GLfloat **vertexArray; + GLfloat **texCoordsArray; + int mDivide; +} + +@end + +@implementation UVSphere + +/** + * Method for UV sphere creation + * Sphere is created at the specified radius centered on the origin. + * UV sphere and corresponding texture UV coordinates are created by creating a divide/2 band + * in the longitudinal direction and dividing the band by the divide number. + * + * @param radius Radius + * @param divide Polygon partition parameter + * @param rotate Rotation angle (radian) in horizontal direction (yaw) + */ +-(id) init:(GLfloat)radius divide:(int)divide rotate:(double)rotate { + + int i; + int j; + double altitude; + double altitudeDelta; + double azimuth; + + if((self = [super init])){ + + mDivide = divide; + + vertexArray = malloc(sizeof(GLfloat *)*mDivide/2); + texCoordsArray = malloc(sizeof(GLfloat *)*mDivide/2); + + for(i = 0; i < (mDivide/2); i++){ + + altitude = M_PI/2.0 - ( i ) * (M_PI*2/mDivide); + altitudeDelta = M_PI/2.0 - (i+1) * (M_PI*2/mDivide); + + GLfloat *vertices = malloc(sizeof(GLfloat)*((mDivide+1)*6)); + GLfloat *texCoords = malloc(sizeof(GLfloat)*((mDivide+1)*4)); + + for(j = 0; j <= mDivide/2; j++){ + + azimuth = rotate - ((float)j) * (2*M_PI/(float)(mDivide)); + + // 1st point + vertices[j*6+0] = radius * cos(altitudeDelta) * cos(azimuth); + vertices[j*6+1] = radius * sin(altitudeDelta); + vertices[j*6+2] = radius * cos(altitudeDelta) * sin(azimuth); + + texCoords[j*4+0] = 1.0 - (2.0 * j / (float)(mDivide)); + texCoords[j*4+1] = 2*(i + 1) / (float)(mDivide); + + // 2nd point + vertices[j*6+3] = radius * cos(altitude) * cos(azimuth); + vertices[j*6+4] = radius * sin(altitude); + vertices[j*6+5] = radius * cos(altitude) * sin(azimuth); + + texCoords[j*4+2] = 1.0 - (2.0 * j / (float)(mDivide)); + texCoords[j*4+3] = 2 * i / (float)(mDivide); + } + + vertexArray[i] = vertices; + texCoordsArray[i] = texCoords; + } + } + return self; +} + + +/** + * Method for drawing spheres + * Variables connected to the shader are used for drawing. + * It is assumed that shader variables are activated. + * + * @param posLocation Attribute compatibility variable for shader connected to the position + * @param uvLocation Attribute compatibility variable for shader connected to the UV space + */ +-(void) draw:(GLint) posLocation uv:(GLint) uvLocation { + + GLfloat *vertices; + GLfloat *texCoords; + + for (int i = 0; i < (mDivide/2); i++) { + vertices = vertexArray[i]; + texCoords = texCoordsArray[i]; + + glVertexAttribPointer(posLocation, 3, GL_FLOAT, false, 0, vertices); + glVertexAttribPointer(uvLocation, 2, GL_FLOAT, false, 0, texCoords); + + glDrawArrays(GL_TRIANGLE_STRIP, 0, mDivide+2); + } + + return; +} + + @end \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ViewController.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ViewController.h index a1d59ae..419ac5d 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ViewController.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ViewController.h @@ -1,17 +1,17 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -@interface ViewController : UIViewController - -@property (nonatomic, strong) IBOutlet UITextField *ipField; -@property (nonatomic, strong) IBOutlet UIButton *connectButton; -@property (strong, nonatomic) IBOutlet UIButton *captureButton; -@property (strong, nonatomic) IBOutlet UIButton *imageSizeButtom; -@property (nonatomic, strong) IBOutlet UIImageView *motionJpegView; -@property (nonatomic, strong) IBOutlet UITableView *contentsView; -@property (nonatomic, strong) IBOutlet UITextView *logView; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +@interface ViewController : UIViewController + +@property (nonatomic, strong) IBOutlet UITextField *ipField; +@property (nonatomic, strong) IBOutlet UIButton *connectButton; +@property (strong, nonatomic) IBOutlet UIButton *captureButton; +@property (strong, nonatomic) IBOutlet UIButton *imageSizeButtom; +@property (nonatomic, strong) IBOutlet UIImageView *motionJpegView; +@property (nonatomic, strong) IBOutlet UITableView *contentsView; +@property (nonatomic, strong) IBOutlet UITextView *logView; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ViewController.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ViewController.m index 6280db4..b1fb5d9 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ViewController.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ViewController.m @@ -1,376 +1,404 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "ViewController.h" -#import "TableCell.h" -#import "ImageViewController.h" -#import "HttpConnection.h" -#import "TableCellObject.h" - -inline static void dispatch_async_main(dispatch_block_t block) -{ - dispatch_async(dispatch_get_main_queue(), block); -} - -inline static void dispatch_async_default(dispatch_block_t block) -{ - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); -} - -@interface ViewController () -{ - NSMutableArray* _objects; - HttpStorageInfo* _storageInfo; - NSNumber* _batteryLevel; - HttpConnection* _httpConnection; -} -@end - -@implementation ViewController - -- (void)appendLog:(NSString*)text -{ - [_logView setText:[NSString stringWithFormat:@"%@%@\n", _logView.text, text]]; - [_logView scrollRangeToVisible:NSMakeRange([_logView.text length], 0)]; -} - -#pragma mark - UI events. - -- (void)onConnetClicked:(id)sender -{ - [_ipField resignFirstResponder]; - - if ([_httpConnection connected]) { - [self disconnect]; - } else { - [self connect]; - } -} - -- (IBAction)onCaptureClicked:(id)sender -{ - // Disable Capture button and Disconnect button - - UIButton *senderButton = sender; - senderButton.enabled = NO; - self.connectButton.enabled = NO; - - dispatch_async_default(^{ - // Start shooting process - HttpImageInfo *info = [_httpConnection takePicture]; - if (info != nil) { - TableCellObject* object = [TableCellObject objectWithInfo:info]; - NSData* thumbData = [_httpConnection getThumb:info.file_id]; - object.thumbnail =[UIImage imageWithData:thumbData]; - [_objects insertObject:object atIndex:0]; - - NSIndexPath* pos = [NSIndexPath indexPathForRow:0 inSection:1]; - dispatch_async_main(^{ - [_contentsView insertRowsAtIndexPaths:@[pos] - withRowAnimation:UITableViewRowAnimationRight]; - for (NSInteger i = 1; i < _objects.count; ++i) { - NSIndexPath* path = [NSIndexPath indexPathForRow:i inSection:1]; - [_contentsView reloadRowsAtIndexPaths:@[path] withRowAnimation:UITableViewRowAnimationNone]; - } - }); - } - dispatch_async_main(^{ - // Enable Capture button and Disconnect button - senderButton.enabled = YES; - self.connectButton.enabled = YES; - [self appendLog:[NSString stringWithFormat:@"execShutter[result:%@]", info]]; - }); - }); -} - -- (IBAction)imageSizeClicked:(id)sender -{ - BOOL isSmall = (_storageInfo.image_width <= 2048); - UIAlertActionStyle largeStyle = isSmall ? UIAlertActionStyleDefault : UIAlertActionStyleDestructive; - UIAlertActionStyle smallStyle = isSmall ? UIAlertActionStyleDestructive : UIAlertActionStyleDefault; - - UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Image Size" - message:nil - preferredStyle:UIAlertControllerStyleActionSheet]; - UIAlertAction* largeAction = [UIAlertAction actionWithTitle:@"5376 x 2688" - style:largeStyle - handler:^(UIAlertAction *action) { - [_httpConnection setImageFormat:5376 height:2688]; - _storageInfo = [_httpConnection getStorageInfo]; - [self appendLog:[NSString stringWithFormat: - @"image size changed[result:%lux%lu]", - _storageInfo.image_width, _storageInfo.image_height]]; - }]; - UIAlertAction* smallAction = [UIAlertAction actionWithTitle:@"2048 x 1024" - style:smallStyle - handler:^(UIAlertAction *action) { - [_httpConnection setImageFormat:2048 height:1024]; - _storageInfo = [_httpConnection getStorageInfo]; - [self appendLog:[NSString stringWithFormat: - @"image size changed[result:%lux%lu]", - _storageInfo.image_width, _storageInfo.image_height]]; - }]; - UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" - style:UIAlertActionStyleCancel - handler:nil]; - [alert addAction:largeAction]; - [alert addAction:smallAction]; - [alert addAction:cancelAction]; - [self presentViewController:alert animated:YES completion:^{ - - - }]; -} - -- (void)prepareForSegue:(UIStoryboardSegue*)segue sender:(id)sender -{ - TableCell* c = (TableCell*)sender; - TableCellObject* o = [_objects objectAtIndex:c.objectIndex]; - - if (CODE_JPEG == o.objectInfo.file_format) { - - id d = [segue destinationViewController]; - if ([d isKindOfClass:[ImageViewController class]]) { - ImageViewController* dest = (ImageViewController*)d; - TableCell* cell = (TableCell*)sender; - dispatch_async_default(^{ - TableCellObject* object = [_objects objectAtIndex:cell.objectIndex]; - NSMutableURLRequest *request = [_httpConnection createExecuteRequest]; - HttpSession *session = [[HttpSession alloc] initWithRequest:request]; - [dest getObject:object.objectInfo withSession:session]; - }); - } - } -} - -#pragma mark - HTTP Operations. - -- (void)connect -{ - // Disable Connect button - self.connectButton.enabled = NO; - - [self appendLog:[NSString stringWithFormat:@"connecting %@...", _ipField.text]]; - - // Setup `target IP`(camera IP). - // Product default is "192.168.1.1". - [_httpConnection setTargetIp:_ipField.text]; - - // Connect to target. - [_httpConnection connect:^(BOOL connected) { - // "Connect" and "OpenSession" completion callback. - - if (connected) { - // "Connect" is succeeded. - dispatch_async_main(^{ - [self appendLog:@"connected."]; - [_connectButton setTitle:@"Disconnect" forState:UIControlStateNormal]; - }); - - // Start enum objects. - [self enumerateImages]; - } else { - // "Connect" is failed. - dispatch_async_main(^{ - self.connectButton.enabled = YES; - [self appendLog:@"connect failed."]; - }); - } - }]; -} - -- (void)disconnect -{ - [self appendLog:@"disconnecting..."]; - - [_httpConnection close:^{ - // "CloseSession" and "Close" completion callback. - - dispatch_async_main(^{ - _captureButton.enabled = NO; - _imageSizeButtom.enabled = NO; - _motionJpegView.image = nil; - [self appendLog:@"disconnected."]; - [_connectButton setTitle:@"Connect" forState:UIControlStateNormal]; - [_objects removeAllObjects]; - [_contentsView reloadData]; - }); - }]; -} - -- (void)enumerateImages -{ - [_objects removeAllObjects]; - - [_httpConnection getDeviceInfo:^(const HttpDeviceInfo* info) { - // "GetDeviceInfo" completion callback. - - dispatch_async_main(^{ - [self appendLog:[NSString stringWithFormat:@"DeviceInfo:%@", info]]; - }); - - }]; - - dispatch_async_default(^{ - // Create "Waiting" indicator - UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; - indicator.color = [UIColor grayColor]; - - dispatch_async_main(^{ - // Set indicator to be displayed in the center of the table view - float w = indicator.frame.size.width; - float h = indicator.frame.size.height; - float x = _contentsView.frame.size.width/2 - w/2; - float y = _contentsView.frame.size.height/2 - h/2; - indicator.frame = CGRectMake(x, y, w, h); - - // Start indicator animation - [_contentsView addSubview:indicator]; - [indicator startAnimating]; - }); - - // Get storage information. - _storageInfo = [_httpConnection getStorageInfo]; - - // Get Battery level. - _batteryLevel = [_httpConnection getBatteryLevel]; - - // Get object informations for primary images. - NSArray* imageInfoes = [_httpConnection getImageInfoes]; - - dispatch_async_main(^{ - [self appendLog:[NSString stringWithFormat:@"getImageInfoes() received %zd infoes.", imageInfoes.count]]; - }); - - // Get thumbnail images for each primary images. - NSUInteger maxCount = MIN(imageInfoes.count, 30); - for (NSUInteger i = 0; i < maxCount; ++i) { - HttpImageInfo *info = [imageInfoes objectAtIndex:i]; - TableCellObject* object = [TableCellObject objectWithInfo:info]; - NSData* thumbData = [_httpConnection getThumb:info.file_id]; - object.thumbnail =[UIImage imageWithData:thumbData]; - [_objects addObject:object]; - - dispatch_async_main(^{ - [self appendLog:[info description]]; - [self appendLog:[NSString stringWithFormat:@"imageInfoes: %ld/%ld", i + 1, maxCount]]; - }); - } - dispatch_async_main(^{ - // Stop indicator animation - [indicator stopAnimating]; - - [_contentsView reloadData]; - - // Enable Connect button - self.connectButton.enabled = YES; - _captureButton.enabled = YES; - _imageSizeButtom.enabled = YES; - }); - - // Start live view display - [_httpConnection startLiveView:^(NSData *frameData) { - dispatch_async_main(^{ - UIImage *image = [UIImage imageWithData:frameData]; - _motionJpegView.image = image; - }); - }]; - }); -} - -#pragma mark - UITableViewDataSource delegates. - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return 2; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - if (section==0) { - return [_httpConnection connected] ? 1: 0; - } - return _objects.count; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath -{ - TableCell* cell; - - if (indexPath.section==0) { - cell = [tableView dequeueReusableCellWithIdentifier:@"cameraInfo"]; - cell.textLabel.text = [NSString stringWithFormat:@"%ld[shots] %ld/%ld[MB] free", - _storageInfo.free_space_in_images, - _storageInfo.free_space_in_bytes/1024/1024, - _storageInfo.max_capacity/1024/1024]; - cell.detailTextLabel.text = [NSString stringWithFormat:@"BATT %.0f %%", [_batteryLevel doubleValue]*100.0]; - } else { - // NSDateFormatter to display photographing date. - NSDateFormatter* df = [[NSDateFormatter alloc] init]; - [df setDateStyle:NSDateFormatterShortStyle]; - [df setTimeStyle:NSDateFormatterMediumStyle]; - - TableCellObject* obj = [_objects objectAtIndex:indexPath.row]; - cell = [tableView dequeueReusableCellWithIdentifier:@"customCell"]; - cell.textLabel.text = [NSString stringWithFormat:@"%@", obj.objectInfo.file_name]; - cell.detailTextLabel.text = [df stringFromDate:obj.objectInfo.capture_date]; - cell.imageView.image = obj.thumbnail; - cell.objectIndex = (uint32_t)indexPath.row; - } - return cell; -} - --(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { - - NSIndexPath *path = indexPath; - NSArray *pathArray = [NSArray arrayWithObject:path]; - dispatch_async_default(^{ - TableCellObject *object = [_objects objectAtIndex:path.row]; - if ([_httpConnection deleteImage:object.objectInfo]) { - dispatch_async_main(^{ - // Delete data source - [_objects removeObjectAtIndex:path.row]; - - // Delete row from table - [_contentsView deleteRowsAtIndexPaths:pathArray - withRowAnimation:UITableViewRowAnimationAutomatic]; - for (NSInteger i = path.row; i < _objects.count; ++i) { - NSIndexPath* index = [NSIndexPath indexPathForRow:i inSection:path.section]; - [_contentsView reloadRowsAtIndexPaths:@[index] withRowAnimation:UITableViewRowAnimationTop]; - } - }); - } - }); -} - --(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - return YES; -} - -#pragma mark - Life cycle. - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - _objects = [NSMutableArray array]; - _httpConnection = [[HttpConnection alloc] init]; - _contentsView.dataSource = self; - _logView.layoutManager.allowsNonContiguousLayout = NO; - _captureButton.enabled = NO; - _imageSizeButtom.enabled = NO; -} - -- (void)viewWillAppear:(BOOL)animated -{ - [_httpConnection restartLiveView]; -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; -} - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "ViewController.h" +#import "TableCell.h" +#import "ImageViewController.h" +#import "HttpConnection.h" +#import "TableCellObject.h" + +inline static void dispatch_async_main(dispatch_block_t block) +{ + dispatch_async(dispatch_get_main_queue(), block); +} + +inline static void dispatch_async_default(dispatch_block_t block) +{ + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); +} + +@interface ViewController () +{ + NSMutableArray* _objects; + HttpStorageInfo* _storageInfo; + NSNumber* _batteryLevel; + HttpConnection* _httpConnection; +} +@property(nonatomic,weak)IBOutlet UIView *toastView; + +@end + +@implementation ViewController + +- (void)appendLog:(NSString*)text +{ + [_logView setText:[NSString stringWithFormat:@"%@%@\n", _logView.text, text]]; + [_logView scrollRangeToVisible:NSMakeRange([_logView.text length], 0)]; +} + +#pragma mark - UI events. + +- (void)onConnetClicked:(id)sender +{ + [_ipField resignFirstResponder]; + + if ([_httpConnection connected]) { + [self disconnect]; + } else { + [self connect]; + } +} + +- (IBAction)onCaptureClicked:(id)sender +{ + // Disable Capture button and Disconnect button + + UIButton *senderButton = sender; + senderButton.enabled = NO; + self.connectButton.enabled = NO; + + dispatch_async_default(^{ + // Start shooting process + HttpImageInfo *info = [_httpConnection takePicture]; + if (info != nil) { + TableCellObject* object = [TableCellObject objectWithInfo:info]; + NSData* thumbData = [_httpConnection getThumb:info.file_id]; + object.thumbnail =[UIImage imageWithData:thumbData]; + [_objects insertObject:object atIndex:0]; + + NSIndexPath* pos = [NSIndexPath indexPathForRow:0 inSection:1]; + dispatch_async_main(^{ + [_contentsView insertRowsAtIndexPaths:@[pos] + withRowAnimation:UITableViewRowAnimationRight]; + for (NSInteger i = 1; i < _objects.count; ++i) { + NSIndexPath* path = [NSIndexPath indexPathForRow:i inSection:1]; + [_contentsView reloadRowsAtIndexPaths:@[path] withRowAnimation:UITableViewRowAnimationNone]; + } + }); + } + dispatch_async_main(^{ + // Enable Capture button and Disconnect button + senderButton.enabled = YES; + self.connectButton.enabled = YES; + [self appendLog:[NSString stringWithFormat:@"execShutter[result:%@]", info]]; + }); + }); +} + +- (IBAction)imageSizeClicked:(id)sender +{ + BOOL isSmall = (_storageInfo.image_width <= 2048); + UIAlertActionStyle largeStyle = isSmall ? UIAlertActionStyleDefault : UIAlertActionStyleDestructive; + UIAlertActionStyle smallStyle = isSmall ? UIAlertActionStyleDestructive : UIAlertActionStyleDefault; + + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Image Size" + message:nil + preferredStyle:UIAlertControllerStyleActionSheet]; + UIAlertAction* largeAction = [UIAlertAction actionWithTitle:@"5376 x 2688" + style:largeStyle + handler:^(UIAlertAction *action) { + [_httpConnection setImageFormat:5376 height:2688]; + _storageInfo = [_httpConnection getStorageInfo]; + [self appendLog:[NSString stringWithFormat: + @"image size changed[result:%lux%lu]", + _storageInfo.image_width, _storageInfo.image_height]]; + }]; + UIAlertAction* smallAction = [UIAlertAction actionWithTitle:@"2048 x 1024" + style:smallStyle + handler:^(UIAlertAction *action) { + [_httpConnection setImageFormat:2048 height:1024]; + _storageInfo = [_httpConnection getStorageInfo]; + [self appendLog:[NSString stringWithFormat: + @"image size changed[result:%lux%lu]", + _storageInfo.image_width, _storageInfo.image_height]]; + }]; + UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" + style:UIAlertActionStyleCancel + handler:nil]; + [alert addAction:largeAction]; + [alert addAction:smallAction]; + [alert addAction:cancelAction]; + [self presentViewController:alert animated:YES completion:^{ + + + }]; +} + +- (void)prepareForSegue:(UIStoryboardSegue*)segue sender:(id)sender +{ + TableCell* c = (TableCell*)sender; + TableCellObject* o = [_objects objectAtIndex:c.objectIndex]; + + if (CODE_JPEG == o.objectInfo.file_format) { + + id d = [segue destinationViewController]; + if ([d isKindOfClass:[ImageViewController class]]) { + ImageViewController* dest = (ImageViewController*)d; + TableCell* cell = (TableCell*)sender; + dispatch_async_default(^{ + TableCellObject* object = [_objects objectAtIndex:cell.objectIndex]; + NSMutableURLRequest *request = [_httpConnection createExecuteRequest]; + HttpSession *session = [[HttpSession alloc] initWithRequest:request]; + [dest getObject:object.objectInfo withSession:session]; + }); + } + } +} + +- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender +{ + if ([identifier isEqualToString:@"SegueViewControllerToImageViewControllerID"]) { + TableCell* c = (TableCell*)sender; + TableCellObject* o = [_objects objectAtIndex:c.objectIndex]; + + if (CODE_JPEG != o.objectInfo.file_format) { + [self showToast]; + return NO; + } + } + return YES; +} + +#pragma mark - HTTP Operations. + +- (void)connect +{ + // Disable Connect button + self.connectButton.enabled = NO; + + [self appendLog:[NSString stringWithFormat:@"connecting %@...", _ipField.text]]; + + // Setup `target IP`(camera IP). + // Product default is "192.168.1.1". + [_httpConnection setTargetIp:_ipField.text]; + + // Connect to target. + [_httpConnection connect:^(BOOL connected) { + // "Connect" and "OpenSession" completion callback. + + if (connected) { + // "Connect" is succeeded. + dispatch_async_main(^{ + [self appendLog:@"connected."]; + [_connectButton setTitle:@"Disconnect" forState:UIControlStateNormal]; + }); + + // Start enum objects. + [self enumerateImages]; + } else { + // "Connect" is failed. + dispatch_async_main(^{ + self.connectButton.enabled = YES; + [self appendLog:@"connect failed."]; + }); + } + }]; +} + +- (void)disconnect +{ + [self appendLog:@"disconnecting..."]; + + [_httpConnection close:^{ + // "CloseSession" and "Close" completion callback. + + dispatch_async_main(^{ + _captureButton.enabled = NO; + _imageSizeButtom.enabled = NO; + _motionJpegView.image = nil; + [self appendLog:@"disconnected."]; + [_connectButton setTitle:@"Connect" forState:UIControlStateNormal]; + [_objects removeAllObjects]; + [_contentsView reloadData]; + }); + }]; +} + +- (void)enumerateImages +{ + [_objects removeAllObjects]; + + [_httpConnection getDeviceInfo:^(const HttpDeviceInfo* info) { + // "GetDeviceInfo" completion callback. + + dispatch_async_main(^{ + [self appendLog:[NSString stringWithFormat:@"DeviceInfo:%@", info]]; + }); + + }]; + + dispatch_async_default(^{ + // Create "Waiting" indicator + UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] + initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; + indicator.color = [UIColor grayColor]; + + dispatch_async_main(^{ + // Set indicator to be displayed in the center of the table view + float w = indicator.frame.size.width; + float h = indicator.frame.size.height; + float x = _contentsView.frame.size.width/2 - w/2; + float y = _contentsView.frame.size.height/2 - h/2; + indicator.frame = CGRectMake(x, y, w, h); + + // Start indicator animation + [_contentsView addSubview:indicator]; + [indicator startAnimating]; + }); + + // Get storage information. + _storageInfo = [_httpConnection getStorageInfo]; + + // Get Battery level. + _batteryLevel = [_httpConnection getBatteryLevel]; + + // Get object informations for primary images. + NSArray* imageInfoes = [_httpConnection getImageInfoes]; + + dispatch_async_main(^{ + [self appendLog:[NSString stringWithFormat:@"getImageInfoes() received %zd infoes.", imageInfoes.count]]; + }); + + // Get thumbnail images for each primary images. + NSUInteger maxCount = MIN(imageInfoes.count, 30); + for (NSUInteger i = 0; i < maxCount; ++i) { + HttpImageInfo *info = [imageInfoes objectAtIndex:i]; + TableCellObject* object = [TableCellObject objectWithInfo:info]; + NSData* thumbData = [_httpConnection getThumb:info.file_id]; + object.thumbnail =[UIImage imageWithData:thumbData]; + [_objects addObject:object]; + + dispatch_async_main(^{ + [self appendLog:[info description]]; + [self appendLog:[NSString stringWithFormat:@"imageInfoes: %ld/%ld", i + 1, maxCount]]; + }); + } + dispatch_async_main(^{ + // Stop indicator animation + [indicator stopAnimating]; + + [_contentsView reloadData]; + + // Enable Connect button + self.connectButton.enabled = YES; + _captureButton.enabled = YES; + _imageSizeButtom.enabled = YES; + }); + + // Start live view display + [_httpConnection startLiveView:^(NSData *frameData) { + dispatch_async_main(^{ + UIImage *image = [UIImage imageWithData:frameData]; + _motionJpegView.image = image; + }); + }]; + }); +} + +#pragma mark - UITableViewDataSource delegates. + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 2; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + if (section==0) { + return [_httpConnection connected] ? 1: 0; + } + return _objects.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath +{ + TableCell* cell; + + if (indexPath.section==0) { + cell = [tableView dequeueReusableCellWithIdentifier:@"cameraInfo"]; + cell.textLabel.text = [NSString stringWithFormat:@"%ld[shots] %ld/%ld[MB] free", + _storageInfo.free_space_in_images, + _storageInfo.free_space_in_bytes/1024/1024, + _storageInfo.max_capacity/1024/1024]; + cell.detailTextLabel.text = [NSString stringWithFormat:@"BATT %.0f %%", [_batteryLevel doubleValue]*100.0]; + } else { + // NSDateFormatter to display photographing date. + NSDateFormatter* df = [[NSDateFormatter alloc] init]; + [df setDateStyle:NSDateFormatterShortStyle]; + [df setTimeStyle:NSDateFormatterMediumStyle]; + + TableCellObject* obj = [_objects objectAtIndex:indexPath.row]; + cell = [tableView dequeueReusableCellWithIdentifier:@"customCell"]; + cell.textLabel.text = [NSString stringWithFormat:@"%@", obj.objectInfo.file_name]; + cell.detailTextLabel.text = [df stringFromDate:obj.objectInfo.capture_date]; + cell.imageView.image = obj.thumbnail; + cell.objectIndex = (uint32_t)indexPath.row; + } + return cell; +} + +-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + + NSIndexPath *path = indexPath; + NSArray *pathArray = [NSArray arrayWithObject:path]; + dispatch_async_default(^{ + TableCellObject *object = [_objects objectAtIndex:path.row]; + if ([_httpConnection deleteImage:object.objectInfo]) { + dispatch_async_main(^{ + // Delete data source + [_objects removeObjectAtIndex:path.row]; + + // Delete row from table + [_contentsView deleteRowsAtIndexPaths:pathArray + withRowAnimation:UITableViewRowAnimationAutomatic]; + for (NSInteger i = path.row; i < _objects.count; ++i) { + NSIndexPath* index = [NSIndexPath indexPathForRow:i inSection:path.section]; + [_contentsView reloadRowsAtIndexPaths:@[index] withRowAnimation:UITableViewRowAnimationTop]; + } + }); + } + }); +} + +-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + return YES; +} + +#pragma mark - Life cycle. + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + _objects = [NSMutableArray array]; + _httpConnection = [[HttpConnection alloc] init]; + _contentsView.dataSource = self; + _logView.layoutManager.allowsNonContiguousLayout = NO; + _captureButton.enabled = NO; + _imageSizeButtom.enabled = NO; +} + +- (void)viewWillAppear:(BOOL)animated +{ + [_httpConnection restartLiveView]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; +} + +- (void)showToast +{ + self.toastView.hidden = NO; + self.toastView.alpha = 1.0f; + [UIView animateWithDuration:0.7f delay:3.0f options:(UIViewAnimationOptionAllowUserInteraction) animations:^{ + self.toastView.alpha = 0.0f; + } completion:^(BOOL finished) { + self.toastView.hidden = YES; + self.toastView.alpha = 1.0f; + }]; +} + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/en.lproj/InfoPlist.strings b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/en.lproj/InfoPlist.strings index 477b28f..0f167df 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/en.lproj/InfoPlist.strings +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/en.lproj/InfoPlist.strings @@ -1,2 +1,2 @@ -/* Localized versions of Info.plist keys */ - +/* Localized versions of Info.plist keys */ + diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/en.lproj/MainStoryboard.storyboard b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/en.lproj/MainStoryboard.storyboard index edf7023..bf2befb 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/en.lproj/MainStoryboard.storyboard +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/en.lproj/MainStoryboard.storyboard @@ -1,203 +1,228 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/glkViewController.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/glkViewController.h index 68af176..fe92333 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/glkViewController.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/glkViewController.h @@ -1,19 +1,19 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import -#import -#import "GLRenderView.h" - -#ifndef ricoh_theta_sample_for_ios_glkViewController_h -#define ricoh_theta_sample_for_ios_glkViewController_h - -@interface GlkViewController : GLKViewController - --(id)init:(CGRect)rect image:(NSMutableData *)imageData width:(int)width height:(int)height yaw:(float)yaw roll:(float)roll pitch:(float)pitch; - -@property GLRenderView *glRenderView; -@end - -#endif +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import +#import +#import "GLRenderView.h" + +#ifndef ricoh_theta_sample_for_ios_glkViewController_h +#define ricoh_theta_sample_for_ios_glkViewController_h + +@interface GlkViewController : GLKViewController + +-(id)init:(CGRect)rect image:(NSMutableData *)imageData width:(int)width height:(int)height yaw:(float)yaw roll:(float)roll pitch:(float)pitch; + +@property GLRenderView *glRenderView; +@end + +#endif diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/glkViewController.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/glkViewController.m index 5e90086..285fed6 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/glkViewController.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/glkViewController.m @@ -1,54 +1,54 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import -#import "glkViewController.h" -#import "GLRenderView.h" - -/** - * Controller class for OpenGL view generation - */ -@interface GlkViewController () -{ - GLRenderView *_glRenderView; -} -@end - -@implementation GlkViewController - -@synthesize glRenderView = _glRenderView; - -/** - * gateway method for GLView settings - * @param rect Rectangle of display area - * @param imageData Image data - * @param width Image width - * @param height Image height - * @param yaw Yaw of zenith correction data - * @param roll Roll of zenith correction data - * @param pitch Pitch of zenith correction data - */ --(id)init:(CGRect)rect image:(NSMutableData *)imageData width:(int)width height:(int)height yaw:(float)yaw roll:(float)roll pitch:(float)pitch { - self = [super init]; - - _glRenderView = [[GLRenderView alloc] initWithFrame:rect]; - [_glRenderView setTexture:imageData width:width height:height yaw:yaw pitch:pitch roll:roll]; - self.view = _glRenderView; - return self; -} - --(void) glkView:(GLKView *)view drawInRect:(CGRect)rect{ - [_glRenderView draw]; -} - -- (void)viewDidDisappear:(BOOL)animated -{ - if (nil != _glRenderView) { - [_glRenderView tearDown]; - } - - [super viewDidDisappear:animated]; -} - +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import +#import "glkViewController.h" +#import "GLRenderView.h" + +/** + * Controller class for OpenGL view generation + */ +@interface GlkViewController () +{ + GLRenderView *_glRenderView; +} +@end + +@implementation GlkViewController + +@synthesize glRenderView = _glRenderView; + +/** + * gateway method for GLView settings + * @param rect Rectangle of display area + * @param imageData Image data + * @param width Image width + * @param height Image height + * @param yaw Yaw of zenith correction data + * @param roll Roll of zenith correction data + * @param pitch Pitch of zenith correction data + */ +-(id)init:(CGRect)rect image:(NSMutableData *)imageData width:(int)width height:(int)height yaw:(float)yaw roll:(float)roll pitch:(float)pitch { + self = [super init]; + + _glRenderView = [[GLRenderView alloc] initWithFrame:rect]; + [_glRenderView setTexture:imageData width:width height:height yaw:yaw pitch:pitch roll:roll]; + self.view = _glRenderView; + return self; +} + +-(void) glkView:(GLKView *)view drawInRect:(CGRect)rect{ + [_glRenderView draw]; +} + +- (void)viewDidDisappear:(BOOL)animated +{ + if (nil != _glRenderView) { + [_glRenderView tearDown]; + } + + [super viewDidDisappear:animated]; +} + @end \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpConnection.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpConnection.h index 8f6fc9c..f6e1cf4 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpConnection.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpConnection.h @@ -1,47 +1,47 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import -#import "HttpDeviceInfo.h" -#import "HttpImageInfo.h" -#import "HttpStorageInfo.h" -#import "HttpSession.h" - -@interface HttpConnection : NSObject - -@property (readonly) NSString* sessionId; - -- (void)setTargetIp:(NSString* const)server; - -- (BOOL)connected; - -- (void)connect:(void(^ const)(BOOL connected))block; - -- (void)update; - -- (void)close:(void(^ const)())block; - -- (void)getDeviceInfo:(void(^const )(const HttpDeviceInfo* const info))block; - -- (NSArray*)getImageInfoes; - -- (NSData*)getThumb:(NSString*)fileId; - -- (HttpStorageInfo*)getStorageInfo; - -- (NSNumber*)getBatteryLevel; - -- (void)setImageFormat:(NSUInteger)width height:(NSUInteger)height; - -- (void)startLiveView:(void(^ const)(NSData *frameData))block; - -- (void)restartLiveView; - -- (HttpImageInfo*)takePicture; - -- (BOOL)deleteImage:(HttpImageInfo*)info; - -- (NSMutableURLRequest*)createExecuteRequest; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import +#import "HttpDeviceInfo.h" +#import "HttpImageInfo.h" +#import "HttpStorageInfo.h" +#import "HttpSession.h" + +@interface HttpConnection : NSObject + +@property (readonly) NSString* sessionId; + +- (void)setTargetIp:(NSString* const)server; + +- (BOOL)connected; + +- (void)connect:(void(^ const)(BOOL connected))block; + +- (void)update; + +- (void)close:(void(^ const)())block; + +- (void)getDeviceInfo:(void(^const )(const HttpDeviceInfo* const info))block; + +- (NSArray*)getImageInfoes; + +- (NSData*)getThumb:(NSString*)fileId; + +- (HttpStorageInfo*)getStorageInfo; + +- (NSNumber*)getBatteryLevel; + +- (void)setImageFormat:(NSUInteger)width height:(NSUInteger)height; + +- (void)startLiveView:(void(^ const)(NSData *frameData))block; + +- (void)restartLiveView; + +- (HttpImageInfo*)takePicture; + +- (BOOL)deleteImage:(HttpImageInfo*)info; + +- (NSMutableURLRequest*)createExecuteRequest; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpConnection.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpConnection.m index c1c0a94..03874cd 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpConnection.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpConnection.m @@ -1,625 +1,625 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "HttpConnection.h" -#import "HttpStatusTimer.h" -#import "HttpFileList.h" -#import "HttpStream.h" - -/** - * HTTP connection to device - */ -@interface HttpConnection () -{ - NSString *_server; - NSURLSession *_session; - NSMutableArray *_infoArray; - HttpStream *_stream; -} -@end - -@implementation HttpConnection - -#pragma mark - Accessors. - -/** - * Specify address of connection destination - * @param address Address - */ -- (void)setTargetIp:(NSString* const)address; -{ - _server = address; -} - -/** - * Status of connection to device - * @return YES:Connect, NO:Disconnect - */ -- (BOOL)connected -{ - return (_sessionId != nil); -} - -#pragma mark - Life cycle. - -/** - * Initializer - * @return Instance - */ -- (id)init -{ - if (self = [super init]) { - // Timeout settings - NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; - config.timeoutIntervalForRequest = 5.0; - - _session = [NSURLSession sessionWithConfiguration:config]; - } - return self; -} - -#pragma mark - HTTP Connections. - -/** - * Connect to device - * @param block Block to be called after connection process - */ -- (void)connect:(void(^ const)(BOOL connected))block -{ - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - - // Create JSON data - NSDictionary *body = @{ - @"name":@"camera.startSession", - @"parameters":@"" - }; - NSData *json = [NSJSONSerialization dataWithJSONObject:body options:0 error:nil]; - - // Set the request-body. - [request setHTTPBody:json]; - - // Send the url-request. - NSURLSessionDataTask* task = - [_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - _sessionId = [array valueForKeyPath:@"results.sessionId"]; - NSLog(@"result: %@", _sessionId); - } else { - _sessionId = nil; - NSLog(@"error: %@", error); - } - block(_sessionId); - }]; - [task resume]; -} - -/** - * Notify device of continuation of session - */ -- (void)update -{ - if (_sessionId) { - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - - // Create JSON data - NSDictionary *body = @{@"name":@"camera.updateSession", - @"parameters": - @{@"sessionId":_sessionId}}; - NSData *json = [NSJSONSerialization dataWithJSONObject:body options:0 error:nil]; - - // Set the request-body. - [request setHTTPBody:json]; - - // Send the url-request. - NSURLSessionDataTask* task = - [_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - NSString *newId = nil; - if (!error) { - NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - newId = [array valueForKeyPath:@"results.sessionId"]; - NSLog(@"result: %@", newId); - } else { - NSLog(@"error: %@", error); - } - - if (newId) { - _sessionId = newId; - } else { - [self connect:^(BOOL connected) { - _sessionId = connected ? _sessionId : [NSString string]; - }]; - } - }]; - [task resume]; - } -} - -/** - * Disconnect from device - * @param block Block called after disconnection process - */ -- (void)close:(void(^ const)())block -{ - if (self->_sessionId) { - // Stop live view - [_stream cancel]; - - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - - // Create JSON data - NSDictionary *body = @{ - @"name":@"camera.closeSession", - @"parameters": - @{ @"sessionId":self->_sessionId } - }; - NSData *json = [NSJSONSerialization dataWithJSONObject:body options:0 error:nil]; - - // Set the request-body. - [request setHTTPBody:json]; - - // Send the url-request. - NSURLSessionDataTask* task = - [self->_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - block(); - }]; - [task resume]; - self->_sessionId = nil; - } -} - -/** - * Acquire device information - * @param block Block to be called after acquisition process - */ -- (void)getDeviceInfo:(void(^const )(const HttpDeviceInfo* const info))block -{ - // Create the url-request. - NSMutableURLRequest *request = [self createRequest:@"/osc/info" method:@"GET"]; - - // Do not set body for GET requests - - // Send the url-request. - NSURLSessionDataTask* task = - [self->_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - HttpDeviceInfo* info = [[HttpDeviceInfo alloc] init]; - if (!error) { - NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - info.model = [array valueForKeyPath:@"model"]; - info.firmware_version = [array valueForKeyPath:@"firmwareVersion"]; - info.serial_number = [array valueForKeyPath:@"serialNumber"]; - NSLog(@"result: %@", data); - } else { - NSLog(@"error: %@", error); - } - block(info); - }]; - [task resume]; -} - -/** - * Acquire list of media files on device - * @return Media file list - */ -- (NSArray*)getImageInfoes -{ - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - HttpFileList *fileList = [[HttpFileList alloc] initWithRequest:request]; - - NSString* token; - do { - token = [fileList getList:10]; - } while ([token length]); - return fileList.infoArray; -} - -/** - * Acquire thumbnail image - * @param fileId File ID - * @return Thumbnail - */ -- (NSData*)getThumb:(NSString*)fileId -{ - // Semaphore for synchronization (cannot be entered until signal is called) - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - - // Create JSON data - NSDictionary *body = @{@"name": @"camera.getImage", - @"parameters": - @{@"fileUri": fileId, // ID of file to be acquired - @"_type": @"thumb"}}; // Type of file to be acquired - - // Set the request-body. - [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; - - __block NSData *output; - - // Send the url-request. - NSURLSessionDataTask* task = - [self->_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - output = data; - NSLog(@"result: %@", response); - } else { - NSLog(@"error: %@", error); - } - dispatch_semaphore_signal(semaphore); - }]; - [task resume]; - - // Wait until signal is called - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - return output; -} - -/** - * Acquire storage information of device - * @return Storage information - */ -- (HttpStorageInfo*)getStorageInfo -{ - // Set still image as shooting mode (to acquire size set for still images) - // Continue session - [self setOptions:@{@"captureMode":@"image"}]; - - // Semaphore for synchronization (cannot be entered until signal is called) - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - - // Create JSON data - NSDictionary *body = @{@"name": @"camera.getOptions", - @"parameters": - @{@"sessionId": self->_sessionId, - @"optionNames": - @[@"remainingPictures", - @"remainingSpace", - @"totalSpace", - @"fileFormat"]}}; - - // Set the request-body. - [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; - - __block HttpStorageInfo *info = [[HttpStorageInfo alloc] init]; - - // Send the url-request. - NSURLSessionDataTask* task = - [self->_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - // Acquire storage information - NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - NSArray *options = [array valueForKeyPath:@"results.options"]; - info.free_space_in_images = [[options valueForKey:@"remainingPictures"] unsignedLongValue]; // Number of images - info.free_space_in_bytes = [[options valueForKey:@"remainingSpace"] unsignedLongValue]; //byte - info.max_capacity = [[options valueForKey:@"totalSpace"] unsignedLongValue]; //byte - - // Acquire file format setting - NSArray *fileFormat = [options valueForKey:@"fileFormat"]; - info.image_width = [[fileFormat valueForKey:@"width"] unsignedLongValue]; - info.image_height = [[fileFormat valueForKey:@"height"] unsignedLongValue]; - NSLog(@"result: %@", info); - } else { - NSLog(@"error: %@", error); - } - dispatch_semaphore_signal(semaphore); - }]; - [task resume]; - - // Wait until signal is called - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - return info; -} - -/** - * Acquire battery information of device - * @return Battery level (4 levels: 0.0, 0.33, 0.67 and 1.0) - */ --(NSNumber*)getBatteryLevel -{ - // Semaphore for synchronization (cannot be entered until signal is called) - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - // Create the url-request. - NSMutableURLRequest *request = [self createRequest:@"/osc/state" method:@"POST"]; - - __block NSNumber *batteryLevel; - - // Send the url-request. - NSURLSessionDataTask* task = - [self->_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - NSArray* state = [array valueForKey:@"state"]; - batteryLevel = [state valueForKey:@"batteryLevel"]; - NSLog(@"result: %@", batteryLevel); - } else { - NSLog(@"error: %@", error); - } - dispatch_semaphore_signal(semaphore); - }]; - [task resume]; - - // Wait until signal is called - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - return batteryLevel; -} - -/** - * Specify shooting size - * @param width Width of shot image - * @param height Height of shot image - */ -- (void)setImageFormat:(NSUInteger)width height:(NSUInteger)height -{ - [self setOptions:@{@"captureMode": @"image"}]; - [self setOptions:@{@"fileFormat": - @{@"type": @"jpeg", - @"width": [NSNumber numberWithUnsignedInteger:width], - @"height": [NSNumber numberWithUnsignedInteger:height]}}]; -} - -/** - * Start live view - * @param block Block called on drawing. Used to perform the drawing process of the image. - */ -- (void)startLiveView:(void(^ const)(NSData *frameData))block -{ - // Continue session - [self update]; - - if ([self connected]) { - NSMutableURLRequest *request = [self createExecuteRequest]; - _stream = [[HttpStream alloc] initWithRequest:request]; - [_stream setDelegate:block]; - [_stream getData:_sessionId]; - } -} - -/** - * Resume live view - */ -- (void)restartLiveView -{ - if ([self connected]) { - // Continue session - [self update]; - - [_stream getData:_sessionId]; - } -} - -/** - * Take photo

- * After shooting, the status is checked by the timer and the file information is acquired when the status indicates that the process is complete. - * @return Information on shot media files - */ -- (HttpImageInfo*)takePicture -{ - // Stop live view - [_stream cancel]; - - // Set still image as shooting mode - // Continue session - [self setOptions:@{@"captureMode":@"image"}]; - - // Semaphore for synchronization (cannot be entered until signal is called) - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - - // Create JSON data - NSDictionary *body = @{@"name": @"camera.takePicture", - @"parameters": - @{@"sessionId": self->_sessionId}}; - - // Set the request-body. - [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; - - __block NSString *commandId; - - // Send the url-request. - NSURLSessionDataTask* task = - [self->_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - commandId = [array valueForKey:@"id"]; - NSLog(@"commandId: %@", commandId); - } else { - NSLog(@"error: %@", error); - } - dispatch_semaphore_signal(semaphore); - }]; - [task resume]; - - // Wait until signal is called - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - - HttpImageInfo *resultInfo = [self waitCommandComplete:commandId]; - - // Resume live view - [_stream getData:_sessionId]; - - return resultInfo; -} - -/** - * Check status of specified command and acquire information - * @param commandId ID of command to be checked - */ -- (HttpImageInfo*)waitCommandComplete:(NSString*)commandId -{ - if (commandId != nil) { - // Create timer and wait until process is completed - NSMutableURLRequest *requestForStatus = [self createRequest:@"/osc/commands/status" method:@"POST"]; - HttpStatusTimer *timer = [[HttpStatusTimer alloc] initWithRequest:requestForStatus]; - NSString *status = [timer run:commandId]; - - if ([status isEqualToString:@"done"]) { - // Create the url-request. - NSMutableURLRequest *requestForList = [self createExecuteRequest]; - HttpFileList *fileList = [[HttpFileList alloc] initWithRequest:requestForList]; - - NSString* token; - do { - token = [fileList getList:1]; - HttpImageInfo *info = fileList.infoArray.firstObject; - if ([info.file_id isEqualToString:timer.fileUri]) { - return info; - } - } while ([token length] != 0); - } - } - return nil; -} - -/** - * Delete specified file - * @param info Information of file to be deleted - * @return Delete process successful? - */ -- (BOOL)deleteImage:(HttpImageInfo*)info -{ - // Semaphore for synchronization (cannot be entered until signal is called) - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - - // Create JSON data - NSDictionary *body = @{@"name": @"camera.delete", - @"parameters": - @{@"fileUri": info.file_id}}; - - // Set the request-body. - [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; - - __block NSString *status; - __block NSString *commandId = nil; - - // Send the url-request. - NSURLSessionDataTask* task = - [self->_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - status = [array valueForKey:@"state"]; - commandId = [array valueForKey:@"id"]; - NSLog(@"commandId: %@", commandId); - } else { - NSLog(@"error: %@", error); - } - dispatch_semaphore_signal(semaphore); - }]; - [task resume]; - - // Wait until signal is called - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - - if ([status isEqualToString:@"done"]) { - return YES; - } else if (commandId != nil) { - // Create timer and wait until process is completed - NSMutableURLRequest *requestForStatus = [self createRequest:@"/osc/commands/status" method:@"POST"]; - HttpStatusTimer *timer = [[HttpStatusTimer alloc] initWithRequest:requestForStatus]; - status = [timer run:commandId]; - if ([status isEqualToString:@"done"]) { - return YES; - } - } - return NO; -} - -/** - * Create HTTP request class instance for executing command - * @return HTTP request class instance for executing command - */ -- (NSMutableURLRequest*)createExecuteRequest -{ - // Create the url-request. - return [self createRequest:@"/osc/commands/execute" method:@"POST"]; -} - -#pragma mark - Private methods. - -/** - * Send option setting request - * @param options Dictionary in which the option name and settings were configured for the key and value - */ -- (void)setOptions:(NSDictionary*)options -{ - // Continue session - [self update]; - - // Semaphore for synchronization (cannot be entered until signal is called) - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - // Create the url-request. - NSMutableURLRequest *request = [self createExecuteRequest]; - - // Create JSON data - NSDictionary *body = @{@"name": @"camera.setOptions", - @"parameters": - @{@"sessionId": self->_sessionId, - @"options":options}}; - - // Set the request-body. - [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; - - // Send the url-request. - NSURLSessionDataTask* task = - [self->_session dataTaskWithRequest:request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - NSLog(@"result: %@", response); - } else { - NSLog(@"error: %@", error); - } - dispatch_semaphore_signal(semaphore); - }]; - [task resume]; - - // Wait until signal is called - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); -} - -/** - * Create HTTP request - * @param protocol Path - * @param method Protocol - * @return HTTP request instance - */ -- (NSMutableURLRequest*)createRequest:(NSString* const)protocol method:(NSString* const)method -{ - NSString *string = [NSString stringWithFormat:@"http://%@%@", self->_server, protocol]; - NSURL *url = [NSURL URLWithString:string]; - - // Create the url-request. - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; - - // Set the method(HTTP-POST) - [request setHTTPMethod:method]; - - [request setValue:@"application/json; charaset=utf-8" forHTTPHeaderField:@"Content-Type"]; - - return request; -} - +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "HttpConnection.h" +#import "HttpStatusTimer.h" +#import "HttpFileList.h" +#import "HttpStream.h" + +/** + * HTTP connection to device + */ +@interface HttpConnection () +{ + NSString *_server; + NSURLSession *_session; + NSMutableArray *_infoArray; + HttpStream *_stream; +} +@end + +@implementation HttpConnection + +#pragma mark - Accessors. + +/** + * Specify address of connection destination + * @param address Address + */ +- (void)setTargetIp:(NSString* const)address; +{ + _server = address; +} + +/** + * Status of connection to device + * @return YES:Connect, NO:Disconnect + */ +- (BOOL)connected +{ + return (_sessionId != nil); +} + +#pragma mark - Life cycle. + +/** + * Initializer + * @return Instance + */ +- (id)init +{ + if (self = [super init]) { + // Timeout settings + NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; + config.timeoutIntervalForRequest = 5.0; + + _session = [NSURLSession sessionWithConfiguration:config]; + } + return self; +} + +#pragma mark - HTTP Connections. + +/** + * Connect to device + * @param block Block to be called after connection process + */ +- (void)connect:(void(^ const)(BOOL connected))block +{ + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + + // Create JSON data + NSDictionary *body = @{ + @"name":@"camera.startSession", + @"parameters":@"" + }; + NSData *json = [NSJSONSerialization dataWithJSONObject:body options:0 error:nil]; + + // Set the request-body. + [request setHTTPBody:json]; + + // Send the url-request. + NSURLSessionDataTask* task = + [_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + _sessionId = [array valueForKeyPath:@"results.sessionId"]; + NSLog(@"result: %@", _sessionId); + } else { + _sessionId = nil; + NSLog(@"error: %@", error); + } + block(_sessionId); + }]; + [task resume]; +} + +/** + * Notify device of continuation of session + */ +- (void)update +{ + if (_sessionId) { + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + + // Create JSON data + NSDictionary *body = @{@"name":@"camera.updateSession", + @"parameters": + @{@"sessionId":_sessionId}}; + NSData *json = [NSJSONSerialization dataWithJSONObject:body options:0 error:nil]; + + // Set the request-body. + [request setHTTPBody:json]; + + // Send the url-request. + NSURLSessionDataTask* task = + [_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + NSString *newId = nil; + if (!error) { + NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + newId = [array valueForKeyPath:@"results.sessionId"]; + NSLog(@"result: %@", newId); + } else { + NSLog(@"error: %@", error); + } + + if (newId) { + _sessionId = newId; + } else { + [self connect:^(BOOL connected) { + _sessionId = connected ? _sessionId : [NSString string]; + }]; + } + }]; + [task resume]; + } +} + +/** + * Disconnect from device + * @param block Block called after disconnection process + */ +- (void)close:(void(^ const)())block +{ + if (self->_sessionId) { + // Stop live view + [_stream cancel]; + + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + + // Create JSON data + NSDictionary *body = @{ + @"name":@"camera.closeSession", + @"parameters": + @{ @"sessionId":self->_sessionId } + }; + NSData *json = [NSJSONSerialization dataWithJSONObject:body options:0 error:nil]; + + // Set the request-body. + [request setHTTPBody:json]; + + // Send the url-request. + NSURLSessionDataTask* task = + [self->_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + block(); + }]; + [task resume]; + self->_sessionId = nil; + } +} + +/** + * Acquire device information + * @param block Block to be called after acquisition process + */ +- (void)getDeviceInfo:(void(^const )(const HttpDeviceInfo* const info))block +{ + // Create the url-request. + NSMutableURLRequest *request = [self createRequest:@"/osc/info" method:@"GET"]; + + // Do not set body for GET requests + + // Send the url-request. + NSURLSessionDataTask* task = + [self->_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + HttpDeviceInfo* info = [[HttpDeviceInfo alloc] init]; + if (!error) { + NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + info.model = [array valueForKeyPath:@"model"]; + info.firmware_version = [array valueForKeyPath:@"firmwareVersion"]; + info.serial_number = [array valueForKeyPath:@"serialNumber"]; + NSLog(@"result: %@", data); + } else { + NSLog(@"error: %@", error); + } + block(info); + }]; + [task resume]; +} + +/** + * Acquire list of media files on device + * @return Media file list + */ +- (NSArray*)getImageInfoes +{ + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + HttpFileList *fileList = [[HttpFileList alloc] initWithRequest:request]; + + NSString* token; + do { + token = [fileList getList:10]; + } while ([token length]); + return fileList.infoArray; +} + +/** + * Acquire thumbnail image + * @param fileId File ID + * @return Thumbnail + */ +- (NSData*)getThumb:(NSString*)fileId +{ + // Semaphore for synchronization (cannot be entered until signal is called) + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + + // Create JSON data + NSDictionary *body = @{@"name": @"camera.getImage", + @"parameters": + @{@"fileUri": fileId, // ID of file to be acquired + @"_type": @"thumb"}}; // Type of file to be acquired + + // Set the request-body. + [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; + + __block NSData *output; + + // Send the url-request. + NSURLSessionDataTask* task = + [self->_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + output = data; + NSLog(@"result: %@", response); + } else { + NSLog(@"error: %@", error); + } + dispatch_semaphore_signal(semaphore); + }]; + [task resume]; + + // Wait until signal is called + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + return output; +} + +/** + * Acquire storage information of device + * @return Storage information + */ +- (HttpStorageInfo*)getStorageInfo +{ + // Set still image as shooting mode (to acquire size set for still images) + // Continue session + [self setOptions:@{@"captureMode":@"image"}]; + + // Semaphore for synchronization (cannot be entered until signal is called) + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + + // Create JSON data + NSDictionary *body = @{@"name": @"camera.getOptions", + @"parameters": + @{@"sessionId": self->_sessionId, + @"optionNames": + @[@"remainingPictures", + @"remainingSpace", + @"totalSpace", + @"fileFormat"]}}; + + // Set the request-body. + [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; + + __block HttpStorageInfo *info = [[HttpStorageInfo alloc] init]; + + // Send the url-request. + NSURLSessionDataTask* task = + [self->_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + // Acquire storage information + NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + NSArray *options = [array valueForKeyPath:@"results.options"]; + info.free_space_in_images = [[options valueForKey:@"remainingPictures"] unsignedLongValue]; // Number of images + info.free_space_in_bytes = [[options valueForKey:@"remainingSpace"] unsignedLongValue]; //byte + info.max_capacity = [[options valueForKey:@"totalSpace"] unsignedLongValue]; //byte + + // Acquire file format setting + NSArray *fileFormat = [options valueForKey:@"fileFormat"]; + info.image_width = [[fileFormat valueForKey:@"width"] unsignedLongValue]; + info.image_height = [[fileFormat valueForKey:@"height"] unsignedLongValue]; + NSLog(@"result: %@", info); + } else { + NSLog(@"error: %@", error); + } + dispatch_semaphore_signal(semaphore); + }]; + [task resume]; + + // Wait until signal is called + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + return info; +} + +/** + * Acquire battery information of device + * @return Battery level (4 levels: 0.0, 0.33, 0.67 and 1.0) + */ +-(NSNumber*)getBatteryLevel +{ + // Semaphore for synchronization (cannot be entered until signal is called) + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + + // Create the url-request. + NSMutableURLRequest *request = [self createRequest:@"/osc/state" method:@"POST"]; + + __block NSNumber *batteryLevel; + + // Send the url-request. + NSURLSessionDataTask* task = + [self->_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + NSArray* state = [array valueForKey:@"state"]; + batteryLevel = [state valueForKey:@"batteryLevel"]; + NSLog(@"result: %@", batteryLevel); + } else { + NSLog(@"error: %@", error); + } + dispatch_semaphore_signal(semaphore); + }]; + [task resume]; + + // Wait until signal is called + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + return batteryLevel; +} + +/** + * Specify shooting size + * @param width Width of shot image + * @param height Height of shot image + */ +- (void)setImageFormat:(NSUInteger)width height:(NSUInteger)height +{ + [self setOptions:@{@"captureMode": @"image"}]; + [self setOptions:@{@"fileFormat": + @{@"type": @"jpeg", + @"width": [NSNumber numberWithUnsignedInteger:width], + @"height": [NSNumber numberWithUnsignedInteger:height]}}]; +} + +/** + * Start live view + * @param block Block called on drawing. Used to perform the drawing process of the image. + */ +- (void)startLiveView:(void(^ const)(NSData *frameData))block +{ + // Continue session + [self update]; + + if ([self connected]) { + NSMutableURLRequest *request = [self createExecuteRequest]; + _stream = [[HttpStream alloc] initWithRequest:request]; + [_stream setDelegate:block]; + [_stream getData:_sessionId]; + } +} + +/** + * Resume live view + */ +- (void)restartLiveView +{ + if ([self connected]) { + // Continue session + [self update]; + + [_stream getData:_sessionId]; + } +} + +/** + * Take photo

+ * After shooting, the status is checked by the timer and the file information is acquired when the status indicates that the process is complete. + * @return Information on shot media files + */ +- (HttpImageInfo*)takePicture +{ + // Stop live view + [_stream cancel]; + + // Set still image as shooting mode + // Continue session + [self setOptions:@{@"captureMode":@"image"}]; + + // Semaphore for synchronization (cannot be entered until signal is called) + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + + // Create JSON data + NSDictionary *body = @{@"name": @"camera.takePicture", + @"parameters": + @{@"sessionId": self->_sessionId}}; + + // Set the request-body. + [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; + + __block NSString *commandId; + + // Send the url-request. + NSURLSessionDataTask* task = + [self->_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + commandId = [array valueForKey:@"id"]; + NSLog(@"commandId: %@", commandId); + } else { + NSLog(@"error: %@", error); + } + dispatch_semaphore_signal(semaphore); + }]; + [task resume]; + + // Wait until signal is called + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + + HttpImageInfo *resultInfo = [self waitCommandComplete:commandId]; + + // Resume live view + [_stream getData:_sessionId]; + + return resultInfo; +} + +/** + * Check status of specified command and acquire information + * @param commandId ID of command to be checked + */ +- (HttpImageInfo*)waitCommandComplete:(NSString*)commandId +{ + if (commandId != nil) { + // Create timer and wait until process is completed + NSMutableURLRequest *requestForStatus = [self createRequest:@"/osc/commands/status" method:@"POST"]; + HttpStatusTimer *timer = [[HttpStatusTimer alloc] initWithRequest:requestForStatus]; + NSString *status = [timer run:commandId]; + + if ([status isEqualToString:@"done"]) { + // Create the url-request. + NSMutableURLRequest *requestForList = [self createExecuteRequest]; + HttpFileList *fileList = [[HttpFileList alloc] initWithRequest:requestForList]; + + NSString* token; + do { + token = [fileList getList:1]; + HttpImageInfo *info = fileList.infoArray.firstObject; + if ([info.file_id isEqualToString:timer.fileUri]) { + return info; + } + } while ([token length] != 0); + } + } + return nil; +} + +/** + * Delete specified file + * @param info Information of file to be deleted + * @return Delete process successful? + */ +- (BOOL)deleteImage:(HttpImageInfo*)info +{ + // Semaphore for synchronization (cannot be entered until signal is called) + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + + // Create JSON data + NSDictionary *body = @{@"name": @"camera.delete", + @"parameters": + @{@"fileUri": info.file_id}}; + + // Set the request-body. + [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; + + __block NSString *status; + __block NSString *commandId = nil; + + // Send the url-request. + NSURLSessionDataTask* task = + [self->_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + status = [array valueForKey:@"state"]; + commandId = [array valueForKey:@"id"]; + NSLog(@"commandId: %@", commandId); + } else { + NSLog(@"error: %@", error); + } + dispatch_semaphore_signal(semaphore); + }]; + [task resume]; + + // Wait until signal is called + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + + if ([status isEqualToString:@"done"]) { + return YES; + } else if (commandId != nil) { + // Create timer and wait until process is completed + NSMutableURLRequest *requestForStatus = [self createRequest:@"/osc/commands/status" method:@"POST"]; + HttpStatusTimer *timer = [[HttpStatusTimer alloc] initWithRequest:requestForStatus]; + status = [timer run:commandId]; + if ([status isEqualToString:@"done"]) { + return YES; + } + } + return NO; +} + +/** + * Create HTTP request class instance for executing command + * @return HTTP request class instance for executing command + */ +- (NSMutableURLRequest*)createExecuteRequest +{ + // Create the url-request. + return [self createRequest:@"/osc/commands/execute" method:@"POST"]; +} + +#pragma mark - Private methods. + +/** + * Send option setting request + * @param options Dictionary in which the option name and settings were configured for the key and value + */ +- (void)setOptions:(NSDictionary*)options +{ + // Continue session + [self update]; + + // Semaphore for synchronization (cannot be entered until signal is called) + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + + // Create the url-request. + NSMutableURLRequest *request = [self createExecuteRequest]; + + // Create JSON data + NSDictionary *body = @{@"name": @"camera.setOptions", + @"parameters": + @{@"sessionId": self->_sessionId, + @"options":options}}; + + // Set the request-body. + [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; + + // Send the url-request. + NSURLSessionDataTask* task = + [self->_session dataTaskWithRequest:request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + NSLog(@"result: %@", response); + } else { + NSLog(@"error: %@", error); + } + dispatch_semaphore_signal(semaphore); + }]; + [task resume]; + + // Wait until signal is called + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); +} + +/** + * Create HTTP request + * @param protocol Path + * @param method Protocol + * @return HTTP request instance + */ +- (NSMutableURLRequest*)createRequest:(NSString* const)protocol method:(NSString* const)method +{ + NSString *string = [NSString stringWithFormat:@"http://%@%@", self->_server, protocol]; + NSURL *url = [NSURL URLWithString:string]; + + // Create the url-request. + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + + // Set the method(HTTP-POST) + [request setHTTPMethod:method]; + + [request setValue:@"application/json; charaset=utf-8" forHTTPHeaderField:@"Content-Type"]; + + return request; +} + @end \ No newline at end of file diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.h index c209a91..7bf59b3 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.h @@ -1,30 +1,30 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -/** - * Device information class - */ -@interface HttpDeviceInfo : NSObject - -/** - * Model name - */ -@property (nonatomic) NSString* model; -/** - * Firmware version - */ -@property (nonatomic) NSString* firmware_version; -/** - * Serial number - */ -@property (nonatomic) NSString* serial_number; - -/** - * Device information represented as character string - */ -- (NSString*)description; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +/** + * Device information class + */ +@interface HttpDeviceInfo : NSObject + +/** + * Model name + */ +@property (nonatomic) NSString* model; +/** + * Firmware version + */ +@property (nonatomic) NSString* firmware_version; +/** + * Serial number + */ +@property (nonatomic) NSString* serial_number; + +/** + * Device information represented as character string + */ +- (NSString*)description; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.m index 069b6f6..b2624e0 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpDeviceInfo.m @@ -1,18 +1,18 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "HttpDeviceInfo.h" - -@implementation HttpDeviceInfo - -- (NSString*)description -{ - NSMutableString* string = [NSMutableString string]; - [string appendFormat:@" model=%@", self->_model]; - [string appendFormat:@" firmware_version=%@", self->_firmware_version]; - [string appendFormat:@" serial_number=%@", self->_serial_number]; - return string; -} - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "HttpDeviceInfo.h" + +@implementation HttpDeviceInfo + +- (NSString*)description +{ + NSMutableString* string = [NSMutableString string]; + [string appendFormat:@" model=%@", self->_model]; + [string appendFormat:@" firmware_version=%@", self->_firmware_version]; + [string appendFormat:@" serial_number=%@", self->_serial_number]; + return string; +} + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpFileList.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpFileList.h index 17a4944..7c82fa1 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpFileList.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpFileList.h @@ -1,15 +1,15 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -@interface HttpFileList : NSObject - -@property (readonly) NSMutableArray *infoArray; - -- (id)initWithRequest:(NSMutableURLRequest*)request; - -- (NSString*)getList:(NSUInteger)numItems; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +@interface HttpFileList : NSObject + +@property (readonly) NSMutableArray *infoArray; + +- (id)initWithRequest:(NSMutableURLRequest*)request; + +- (NSString*)getList:(NSUInteger)numItems; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpFileList.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpFileList.m index f7e83c3..9c31e7d 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpFileList.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpFileList.m @@ -1,110 +1,110 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "HttpFileList.h" -#import "HttpImageInfo.h" - -/** - * Acquisition class of media file information

- * If an acquisition method is called after an instance is generated, acquisition begins from the start of the list. Subsequent acquisitions begin from the token position that has been kept

- * Nil is returned by the acquisition method when acquisition of the information reaches the end of the list. This value is therefore used to judge whether acquisition has reached the end. - */ -@interface HttpFileList() -{ - NSString *_currentToken; - NSMutableURLRequest *_request; - NSURLSession *_session; -} -@end - -@implementation HttpFileList - -/** - * Specified initializer - * @param request HTTP request - * @return Instance - */ -- (id)initWithRequest:(NSMutableURLRequest*)request -{ - if ([super init]) { - _currentToken = @""; - _request = request; - - // Create and keep HTTP session - NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; - _session= [NSURLSession sessionWithConfiguration:config]; - - _infoArray = nil; - } - return self; -} - -/** - * Acquire information on multiple files together - * @param numItems Number of files for which to acquire information - * @return Newly acquired token. Nil returned when acquisition reaches end of list - */ -- (NSString*)getList:(NSUInteger)numItems -{ - // Generate NSMutableArray first time only - if (_infoArray == nil) { - _infoArray = [NSMutableArray arrayWithCapacity:numItems]; - } - - // Semaphore for synchronization - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - // Create JSON data - NSDictionary *body = @{@"name": @"camera._listAll", - @"parameters": - @{@"entryCount":[NSNumber numberWithUnsignedInteger:numItems], // Number of still image and video files to be acquired - @"continuationToken": _currentToken, // Token for resuming loading from previous _listAll - @"detail": @YES} // Acquire file details? - }; - NSData *json = [NSJSONSerialization dataWithJSONObject:body options:0 error:nil]; - - // Set the request-body. - [_request setHTTPBody:json]; - - // Send the url-request. - NSURLSessionDataTask* task = - [_session dataTaskWithRequest:_request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - NSArray* results = [array valueForKey:@"results"]; - NSArray* entries = [results valueForKey:@"entries"]; - _currentToken = [results valueForKey:@"continuationToken"]; - - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - [formatter setDateFormat:@"yyyy:MM:dd HH:mm:ssZ"]; - - // Repeat for each acquired object - NSUInteger entriesCount = [entries count]; - for (int i = 0; i < entriesCount; i++) { - NSArray* entry = [entries objectAtIndex:i]; - HttpImageInfo* info = [[HttpImageInfo alloc] init]; - info.file_name = [entry valueForKey:@"name"]; - info.file_id = [entry valueForKey:@"uri"]; - info.file_size = [[entry valueForKey:@"size"] longValue]; // File size (bytes) - info.capture_date = [formatter dateFromString:[entry valueForKey:@"dateTimeZone"]]; - info.image_pix_width = [[entry valueForKey:@"width"] longValue]; - info.image_pix_height = [[entry valueForKey:@"height"] longValue]; - info.file_format = [entry valueForKey:@"recordTime"] ? CODE_MPEG : CODE_JPEG; - [self->_infoArray addObject:info]; - } - NSLog(@"result: %@", entries); - } else { - NSLog(@"error: %@", error); - } - dispatch_semaphore_signal(semaphore); - }]; - [task resume]; - - // Wait until finished using semaphore - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - return _currentToken; -} - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "HttpFileList.h" +#import "HttpImageInfo.h" + +/** + * Acquisition class of media file information

+ * If an acquisition method is called after an instance is generated, acquisition begins from the start of the list. Subsequent acquisitions begin from the token position that has been kept

+ * Nil is returned by the acquisition method when acquisition of the information reaches the end of the list. This value is therefore used to judge whether acquisition has reached the end. + */ +@interface HttpFileList() +{ + NSString *_currentToken; + NSMutableURLRequest *_request; + NSURLSession *_session; +} +@end + +@implementation HttpFileList + +/** + * Specified initializer + * @param request HTTP request + * @return Instance + */ +- (id)initWithRequest:(NSMutableURLRequest*)request +{ + if ([super init]) { + _currentToken = @""; + _request = request; + + // Create and keep HTTP session + NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; + _session= [NSURLSession sessionWithConfiguration:config]; + + _infoArray = nil; + } + return self; +} + +/** + * Acquire information on multiple files together + * @param numItems Number of files for which to acquire information + * @return Newly acquired token. Nil returned when acquisition reaches end of list + */ +- (NSString*)getList:(NSUInteger)numItems +{ + // Generate NSMutableArray first time only + if (_infoArray == nil) { + _infoArray = [NSMutableArray arrayWithCapacity:numItems]; + } + + // Semaphore for synchronization + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + + // Create JSON data + NSDictionary *body = @{@"name": @"camera._listAll", + @"parameters": + @{@"entryCount":[NSNumber numberWithUnsignedInteger:numItems], // Number of still image and video files to be acquired + @"continuationToken": _currentToken, // Token for resuming loading from previous _listAll + @"detail": @YES} // Acquire file details? + }; + NSData *json = [NSJSONSerialization dataWithJSONObject:body options:0 error:nil]; + + // Set the request-body. + [_request setHTTPBody:json]; + + // Send the url-request. + NSURLSessionDataTask* task = + [_session dataTaskWithRequest:_request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + NSArray* results = [array valueForKey:@"results"]; + NSArray* entries = [results valueForKey:@"entries"]; + _currentToken = [results valueForKey:@"continuationToken"]; + + NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; + [formatter setDateFormat:@"yyyy:MM:dd HH:mm:ssZ"]; + + // Repeat for each acquired object + NSUInteger entriesCount = [entries count]; + for (int i = 0; i < entriesCount; i++) { + NSArray* entry = [entries objectAtIndex:i]; + HttpImageInfo* info = [[HttpImageInfo alloc] init]; + info.file_name = [entry valueForKey:@"name"]; + info.file_id = [entry valueForKey:@"uri"]; + info.file_size = [[entry valueForKey:@"size"] longValue]; // File size (bytes) + info.capture_date = [formatter dateFromString:[entry valueForKey:@"dateTimeZone"]]; + info.image_pix_width = [[entry valueForKey:@"width"] longValue]; + info.image_pix_height = [[entry valueForKey:@"height"] longValue]; + info.file_format = [entry valueForKey:@"recordTime"] ? CODE_MPEG : CODE_JPEG; + [self->_infoArray addObject:info]; + } + NSLog(@"result: %@", entries); + } else { + NSLog(@"error: %@", error); + } + dispatch_semaphore_signal(semaphore); + }]; + [task resume]; + + // Wait until finished using semaphore + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + return _currentToken; +} + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpImageInfo.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpImageInfo.h index 9f5fd18..03288f8 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpImageInfo.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpImageInfo.h @@ -1,49 +1,49 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -/** - * Media format type - */ -enum IMAGE_FORMAT : NSInteger { - CODE_JPEG, - CODE_MPEG, -}; - -/** - * Information class of media file - */ -@interface HttpImageInfo : NSObject - -/** - * Media format - */ -@property (nonatomic) enum IMAGE_FORMAT file_format; -/** - * File size - */ -@property (nonatomic) NSUInteger file_size; -/** - * Image width - */ -@property (nonatomic) NSUInteger image_pix_width; -/** - * Image height - */ -@property (nonatomic) NSUInteger image_pix_height; -/** - * File name - */ -@property (nonatomic) NSString* file_name; -/** - * File creation/update time - */ -@property (nonatomic) NSDate* capture_date; -/** - * File ID - */ -@property (nonatomic) NSString* file_id; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +/** + * Media format type + */ +enum IMAGE_FORMAT : NSInteger { + CODE_JPEG, + CODE_MPEG, +}; + +/** + * Information class of media file + */ +@interface HttpImageInfo : NSObject + +/** + * Media format + */ +@property (nonatomic) enum IMAGE_FORMAT file_format; +/** + * File size + */ +@property (nonatomic) NSUInteger file_size; +/** + * Image width + */ +@property (nonatomic) NSUInteger image_pix_width; +/** + * Image height + */ +@property (nonatomic) NSUInteger image_pix_height; +/** + * File name + */ +@property (nonatomic) NSString* file_name; +/** + * File creation/update time + */ +@property (nonatomic) NSDate* capture_date; +/** + * File ID + */ +@property (nonatomic) NSString* file_id; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpImageInfo.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpImageInfo.m index 3d9614f..c3deb4d 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpImageInfo.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpImageInfo.m @@ -1,23 +1,23 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "HttpImageInfo.h" - -@implementation HttpImageInfo - --(NSString*)description -{ - NSMutableString* s = [NSMutableString stringWithString:@""]; - return s; -} - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "HttpImageInfo.h" + +@implementation HttpImageInfo + +-(NSString*)description +{ + NSMutableString* s = [NSMutableString stringWithString:@""]; + return s; +} + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpSession.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpSession.h index 0e73942..9a62120 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpSession.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpSession.h @@ -1,19 +1,19 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -/** - * Class for downloading files via HTTP - */ -@interface HttpSession : NSObject - -- (id)initWithRequest:(NSMutableURLRequest*)request; - -- (void)getResizedImageObject:(NSString*)fileUri - onStart:(void(^)(int64_t expectedTotalBytes))startBlock - onWrite:(void(^)(int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))writeBlock - onFinish:(void(^)(NSURL *location))finishBlock; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +/** + * Class for downloading files via HTTP + */ +@interface HttpSession : NSObject + +- (id)initWithRequest:(NSMutableURLRequest*)request; + +- (void)getResizedImageObject:(NSString*)fileUri + onStart:(void(^)(int64_t expectedTotalBytes))startBlock + onWrite:(void(^)(int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))writeBlock + onFinish:(void(^)(NSURL *location))finishBlock; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpSession.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpSession.m index 02160d4..509e24c 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpSession.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpSession.m @@ -1,105 +1,105 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "HttpSession.h" - -/** - * File download class - */ -@interface HttpSession() -{ - NSMutableURLRequest* _request; - NSURLSession *_session; - void (^onStart)(int64_t expectedTotalBytes); - void (^onWrite)(int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite); - void (^onFinish)(NSURL *location); -} -@end - -@implementation HttpSession - -/** - * Specified initializer - * @param request HTTP request - * @return Instance - */ -- (id)initWithRequest:(NSMutableURLRequest*)request -{ - if (self = [super init]) { - self->_request = request; - } - return self; -} - -/** - * Download file with specified file ID - * @param fileUri ID of file to be downloaded - * @param startBlock Block to be called on start of download - * @param writeBlock Blocks to be called successively during download - * @param finishBlock Block to be called at end of download - */ -- (void)getResizedImageObject:(NSString*)fileUri - onStart:(void(^)(int64_t expectedTotalBytes))startBlock - onWrite:(void(^)(int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))writeBlock - onFinish:(void(^)(NSURL *location))finishBlock -{ - self->onStart = startBlock; - self->onWrite = writeBlock; - self->onFinish = finishBlock; - - // Create JSON data - NSDictionary *body = @{@"name": @"camera.getImage", - @"parameters": - @{@"fileUri": fileUri, // ID of file to be acquired - @"_type": @"full"}}; // Type of file to be acquired - - // Set the request-body. - [self->_request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; - - NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; - _session = [NSURLSession sessionWithConfiguration:config - delegate:self - delegateQueue:[NSOperationQueue mainQueue]]; - - // Download data as file - NSURLSessionDownloadTask* task = [_session downloadTaskWithRequest:self->_request]; - [task resume]; -} - -/** - * Delegate to be called on start of download - * @param session Session - * @param downloadTask Task - * @param fileOffset Acquired byte count on disk - * @param expectedTotalBytes Predicted byte count of entire acquired file - */ -- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didResumeAtOffset:(int64_t)fileOffset expectedTotalBytes:(int64_t)expectedTotalBytes -{ - self->onStart(expectedTotalBytes); -} - -/** - * Delegates to be called successively during download - * @param session Session - * @param downloadTask Task - * @param bytesWritten Byte count transferred each time a delegate method is called - * @param totalBytesWritten Current total transferred byte count - * @param totalBytesExpectedToWrite Predicted byte count of acquired file - */ -- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite -{ - self->onWrite(totalBytesWritten, totalBytesExpectedToWrite); -} - -/** - * Delegate to be called at end of download - * @param session Session - * @param downloadTask Task - * @param location File URL of acquired temporary file - */ -- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location -{ - self->onFinish(location); -} -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "HttpSession.h" + +/** + * File download class + */ +@interface HttpSession() +{ + NSMutableURLRequest* _request; + NSURLSession *_session; + void (^onStart)(int64_t expectedTotalBytes); + void (^onWrite)(int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite); + void (^onFinish)(NSURL *location); +} +@end + +@implementation HttpSession + +/** + * Specified initializer + * @param request HTTP request + * @return Instance + */ +- (id)initWithRequest:(NSMutableURLRequest*)request +{ + if (self = [super init]) { + self->_request = request; + } + return self; +} + +/** + * Download file with specified file ID + * @param fileUri ID of file to be downloaded + * @param startBlock Block to be called on start of download + * @param writeBlock Blocks to be called successively during download + * @param finishBlock Block to be called at end of download + */ +- (void)getResizedImageObject:(NSString*)fileUri + onStart:(void(^)(int64_t expectedTotalBytes))startBlock + onWrite:(void(^)(int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))writeBlock + onFinish:(void(^)(NSURL *location))finishBlock +{ + self->onStart = startBlock; + self->onWrite = writeBlock; + self->onFinish = finishBlock; + + // Create JSON data + NSDictionary *body = @{@"name": @"camera.getImage", + @"parameters": + @{@"fileUri": fileUri, // ID of file to be acquired + @"_type": @"full"}}; // Type of file to be acquired + + // Set the request-body. + [self->_request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; + + NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; + _session = [NSURLSession sessionWithConfiguration:config + delegate:self + delegateQueue:[NSOperationQueue mainQueue]]; + + // Download data as file + NSURLSessionDownloadTask* task = [_session downloadTaskWithRequest:self->_request]; + [task resume]; +} + +/** + * Delegate to be called on start of download + * @param session Session + * @param downloadTask Task + * @param fileOffset Acquired byte count on disk + * @param expectedTotalBytes Predicted byte count of entire acquired file + */ +- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didResumeAtOffset:(int64_t)fileOffset expectedTotalBytes:(int64_t)expectedTotalBytes +{ + self->onStart(expectedTotalBytes); +} + +/** + * Delegates to be called successively during download + * @param session Session + * @param downloadTask Task + * @param bytesWritten Byte count transferred each time a delegate method is called + * @param totalBytesWritten Current total transferred byte count + * @param totalBytesExpectedToWrite Predicted byte count of acquired file + */ +- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite +{ + self->onWrite(totalBytesWritten, totalBytesExpectedToWrite); +} + +/** + * Delegate to be called at end of download + * @param session Session + * @param downloadTask Task + * @param location File URL of acquired temporary file + */ +- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location +{ + self->onFinish(location); +} +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.h index a3d1c66..165495f 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.h @@ -1,15 +1,15 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -@interface HttpStatusTimer : NSObject - -@property (readonly) NSString* fileUri; - -- (id)initWithRequest:(NSMutableURLRequest*)request; - -- (NSString*)run:(NSString*)command; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +@interface HttpStatusTimer : NSObject + +@property (readonly) NSString* fileUri; + +- (id)initWithRequest:(NSMutableURLRequest*)request; + +- (NSString*)run:(NSString*)command; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.m index 8c32c04..fec04ff 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStatusTimer.m @@ -1,100 +1,100 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "HttpStatusTimer.h" - -/** - * Class for periodic monitoring of command status - */ -@interface HttpStatusTimer() -{ - NSMutableURLRequest *_request; - NSURLSession* _session; - NSString *_commandId; - dispatch_semaphore_t _semaphore; - NSString *_state; -} -@end - -@implementation HttpStatusTimer - -/** - * Specified initializer - * @param request HTTP request - * @return Instance - */ -- (id)initWithRequest:(NSMutableURLRequest*)request -{ - if ([super init]) { - _request = request; - } - return self; -} - -/** - * Start status monitoring - * @param command ID of command to be monitored - * @return Status indicating completion or error - */ -- (NSString*)run:(NSString*)command -{ - // Create and keep HTTP session - NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; - _session= [NSURLSession sessionWithConfiguration:config]; - - _commandId = command; - - // Semaphore for synchronization (cannot be entered until signal is called) - _semaphore = dispatch_semaphore_create(0); - - // Create and start timer - NSTimer *timer = [NSTimer timerWithTimeInterval:0.5f - target:self - selector:@selector(getState:) - userInfo:nil - repeats:YES]; - NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; - [runLoop addTimer:timer forMode:NSRunLoopCommonModes]; - [runLoop run]; - - // Wait until signal is called - dispatch_semaphore_wait(_semaphore, DISPATCH_TIME_FOREVER); - return _state; -} - -/** - * Delegate called during each set period of time - * @param timer Timer - */ -- (void)getState:(NSTimer*)timer -{ - // Create JSON data - NSDictionary *body = @{@"id": _commandId}; - - // Set the request-body. - [_request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; - - // Send the url-request. - NSURLSessionDataTask* task = - [_session dataTaskWithRequest:_request - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { - if (!error) { - NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; - _state = [array valueForKey:@"state"]; - _fileUri = [array valueForKeyPath:@"results.fileUri"]; - NSLog(@"result: %@", _state); - } else { - _state = @"error"; - NSLog(@"GetStorageInfo: received data is invalid."); - } - if (![_state isEqualToString:@"inProgress"]) { - dispatch_semaphore_signal(_semaphore); - - // Stop timer - [timer invalidate]; - } - }]; - [task resume]; -} -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "HttpStatusTimer.h" + +/** + * Class for periodic monitoring of command status + */ +@interface HttpStatusTimer() +{ + NSMutableURLRequest *_request; + NSURLSession* _session; + NSString *_commandId; + dispatch_semaphore_t _semaphore; + NSString *_state; +} +@end + +@implementation HttpStatusTimer + +/** + * Specified initializer + * @param request HTTP request + * @return Instance + */ +- (id)initWithRequest:(NSMutableURLRequest*)request +{ + if ([super init]) { + _request = request; + } + return self; +} + +/** + * Start status monitoring + * @param command ID of command to be monitored + * @return Status indicating completion or error + */ +- (NSString*)run:(NSString*)command +{ + // Create and keep HTTP session + NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; + _session= [NSURLSession sessionWithConfiguration:config]; + + _commandId = command; + + // Semaphore for synchronization (cannot be entered until signal is called) + _semaphore = dispatch_semaphore_create(0); + + // Create and start timer + NSTimer *timer = [NSTimer timerWithTimeInterval:0.5f + target:self + selector:@selector(getState:) + userInfo:nil + repeats:YES]; + NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; + [runLoop addTimer:timer forMode:NSRunLoopCommonModes]; + [runLoop run]; + + // Wait until signal is called + dispatch_semaphore_wait(_semaphore, DISPATCH_TIME_FOREVER); + return _state; +} + +/** + * Delegate called during each set period of time + * @param timer Timer + */ +- (void)getState:(NSTimer*)timer +{ + // Create JSON data + NSDictionary *body = @{@"id": _commandId}; + + // Set the request-body. + [_request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; + + // Send the url-request. + NSURLSessionDataTask* task = + [_session dataTaskWithRequest:_request + completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (!error) { + NSArray* array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil]; + _state = [array valueForKey:@"state"]; + _fileUri = [array valueForKeyPath:@"results.fileUri"]; + NSLog(@"result: %@", _state); + } else { + _state = @"error"; + NSLog(@"GetStorageInfo: received data is invalid."); + } + if (![_state isEqualToString:@"inProgress"]) { + dispatch_semaphore_signal(_semaphore); + + // Stop timer + [timer invalidate]; + } + }]; + [task resume]; +} +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.h index a0dd175..e53169c 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.h @@ -1,33 +1,33 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -/** - * Device storage information and size of shot image - */ -@interface HttpStorageInfo : NSObject - -/** - * Total storage capacity - */ -@property (nonatomic) unsigned long max_capacity; -/** - * Remaining capacity - */ -@property (nonatomic) unsigned long free_space_in_bytes; -/** - * Remaining number of photos - */ -@property (nonatomic) unsigned long free_space_in_images; -/** - * Image width for shooting still images - */ -@property (nonatomic) unsigned long image_width; -/** - * Image height for shooting still images - */ -@property (nonatomic) unsigned long image_height; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +/** + * Device storage information and size of shot image + */ +@interface HttpStorageInfo : NSObject + +/** + * Total storage capacity + */ +@property (nonatomic) unsigned long max_capacity; +/** + * Remaining capacity + */ +@property (nonatomic) unsigned long free_space_in_bytes; +/** + * Remaining number of photos + */ +@property (nonatomic) unsigned long free_space_in_images; +/** + * Image width for shooting still images + */ +@property (nonatomic) unsigned long image_width; +/** + * Image height for shooting still images + */ +@property (nonatomic) unsigned long image_height; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.m index d83ebfc..4d4ac52 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStorageInfo.m @@ -1,9 +1,9 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "HttpStorageInfo.h" - -@implementation HttpStorageInfo - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "HttpStorageInfo.h" + +@implementation HttpStorageInfo + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStream.h b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStream.h index 3f866ab..6d88d7d 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStream.h +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStream.h @@ -1,17 +1,17 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -@interface HttpStream : NSObject - -- (void)setDelegate:(void(^)(NSData *frameData))bufferBlock; - -- (id)initWithRequest:(NSMutableURLRequest*)request; - -- (void)getData:(NSString*)sessionId; - -- (void)cancel; - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +@interface HttpStream : NSObject + +- (void)setDelegate:(void(^)(NSData *frameData))bufferBlock; + +- (id)initWithRequest:(NSMutableURLRequest*)request; + +- (void)getData:(NSString*)sessionId; + +- (void)cancel; + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStream.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStream.m index fe8f446..de85df8 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStream.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/http/HttpStream.m @@ -1,161 +1,161 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import "HttpStream.h" - -// Start and end markers for images in JPEG format -const Byte SOI_MARKER[] = {0xFF, 0xD8}; -const Byte EOI_MARKER[] = {0xFF, 0xD9}; - -/** - * Live view data acquisition class - */ -@interface HttpStream() -{ - NSMutableURLRequest *_request; - NSMutableData *_buffer; - NSMutableArray *_frameArray; - NSURLSessionDataTask *_task; - void (^_onBuffered)(NSData *frameData); - BOOL _isContinue; -} -@end - -@implementation HttpStream - -/** - * Set block to be executed when receiving data - * @param bufferBlock Block to be executed when receiving data - */ -- (void)setDelegate:(void(^)(NSData *frameData))bufferBlock -{ - _onBuffered = bufferBlock; -} - -/** - * Specified initializer - * @param request HTTP request - * @return Instance - */ -- (id)initWithRequest:(NSMutableURLRequest*)request -{ - if (self = [super init]) { - _request = request; - _buffer = [NSMutableData data]; - _frameArray = [NSMutableArray array]; - _isContinue = NO; - } - return self; -} - -/** - * Start data acquisition - * @param sessionId Session ID - */ -- (void)getData:(NSString*)sessionId -{ - if (!_isContinue) { - // Create JSON data - NSDictionary *body = @{@"name": @"camera._getLivePreview", - @"parameters": - @{@"sessionId": sessionId}}; - - // Set the request-body. - [self->_request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; - - NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; - NSURLSession* session = [NSURLSession sessionWithConfiguration:config - delegate:self - delegateQueue:[NSOperationQueue mainQueue]]; - - // Start data acquisition task - _task = [session dataTaskWithRequest:_request]; - [_task resume]; - _isContinue = YES; - } -} - -/** - * Stop data acquisition task - */ -- (void)cancel -{ - [_task cancel]; -} - -/** - * Delegate for notification that part of the data has been received by the data acquisition task - * @param session Session - * @param dataTask Task - * @param data Received data - */ -- (void)URLSession:(NSURLSession *)session - dataTask:(NSURLSessionDataTask *)dataTask - didReceiveData:(NSData *)data -{ - [_buffer appendData:data]; - Byte b1[2]; - - // Search for SOI marker position from buffer - NSUInteger soi; - NSUInteger eoi; - do { - soi = 0; - eoi = 0; - NSInteger i = 0; - - for (; i < (NSInteger)_buffer.length - 1; i++) { - [_buffer getBytes:b1 range:NSMakeRange(i, 2)]; - if (SOI_MARKER[0] == b1[0]) { - if (SOI_MARKER[1] == b1[1]) { - soi = i; - break; - } - } - } - - for (; i < (NSInteger)_buffer.length - 1; i++) { - [_buffer getBytes:b1 range:NSMakeRange(i, 2)]; - if (EOI_MARKER[0] == b1[0]) { - if (EOI_MARKER[1] == b1[1]) { - eoi = i; - break; - } - } - } - - // Exit process if EOI not found - if (eoi == 0) { - return; - } - NSData *frameData = [_buffer subdataWithRange:NSMakeRange(soi, eoi - soi)]; - - // Draw - _onBuffered(frameData); - - // Delete used parts of data - NSUInteger remainLength = _buffer.length - eoi - 2; - Byte remain[remainLength]; - [_buffer getBytes:remain range:NSMakeRange(eoi + 2, remainLength)]; - _buffer = [NSMutableData dataWithBytes:remain length:remainLength]; - } while (0 < eoi); -} - -/** - * Delegate for notification that the data task has finished receiving data - * @param session Session - * @param task Task - * @param error Error information - */ -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -didCompleteWithError:(NSError *)error -{ - // Called when session expires - [session invalidateAndCancel]; - _isContinue = NO; - NSLog(@"HttpStream didCompleteWithError: %@", error); -} - -@end +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import "HttpStream.h" + +// Start and end markers for images in JPEG format +const Byte SOI_MARKER[] = {0xFF, 0xD8}; +const Byte EOI_MARKER[] = {0xFF, 0xD9}; + +/** + * Live view data acquisition class + */ +@interface HttpStream() +{ + NSMutableURLRequest *_request; + NSMutableData *_buffer; + NSMutableArray *_frameArray; + NSURLSessionDataTask *_task; + void (^_onBuffered)(NSData *frameData); + BOOL _isContinue; +} +@end + +@implementation HttpStream + +/** + * Set block to be executed when receiving data + * @param bufferBlock Block to be executed when receiving data + */ +- (void)setDelegate:(void(^)(NSData *frameData))bufferBlock +{ + _onBuffered = bufferBlock; +} + +/** + * Specified initializer + * @param request HTTP request + * @return Instance + */ +- (id)initWithRequest:(NSMutableURLRequest*)request +{ + if (self = [super init]) { + _request = request; + _buffer = [NSMutableData data]; + _frameArray = [NSMutableArray array]; + _isContinue = NO; + } + return self; +} + +/** + * Start data acquisition + * @param sessionId Session ID + */ +- (void)getData:(NSString*)sessionId +{ + if (!_isContinue) { + // Create JSON data + NSDictionary *body = @{@"name": @"camera._getLivePreview", + @"parameters": + @{@"sessionId": sessionId}}; + + // Set the request-body. + [self->_request setHTTPBody:[NSJSONSerialization dataWithJSONObject:body options:0 error:nil]]; + + NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultSessionConfiguration]; + NSURLSession* session = [NSURLSession sessionWithConfiguration:config + delegate:self + delegateQueue:[NSOperationQueue mainQueue]]; + + // Start data acquisition task + _task = [session dataTaskWithRequest:_request]; + [_task resume]; + _isContinue = YES; + } +} + +/** + * Stop data acquisition task + */ +- (void)cancel +{ + [_task cancel]; +} + +/** + * Delegate for notification that part of the data has been received by the data acquisition task + * @param session Session + * @param dataTask Task + * @param data Received data + */ +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data +{ + [_buffer appendData:data]; + Byte b1[2]; + + // Search for SOI marker position from buffer + NSUInteger soi; + NSUInteger eoi; + do { + soi = 0; + eoi = 0; + NSInteger i = 0; + + for (; i < (NSInteger)_buffer.length - 1; i++) { + [_buffer getBytes:b1 range:NSMakeRange(i, 2)]; + if (SOI_MARKER[0] == b1[0]) { + if (SOI_MARKER[1] == b1[1]) { + soi = i; + break; + } + } + } + + for (; i < (NSInteger)_buffer.length - 1; i++) { + [_buffer getBytes:b1 range:NSMakeRange(i, 2)]; + if (EOI_MARKER[0] == b1[0]) { + if (EOI_MARKER[1] == b1[1]) { + eoi = i; + break; + } + } + } + + // Exit process if EOI not found + if (eoi == 0) { + return; + } + NSData *frameData = [_buffer subdataWithRange:NSMakeRange(soi, eoi - soi)]; + + // Draw + _onBuffered(frameData); + + // Delete used parts of data + NSUInteger remainLength = _buffer.length - eoi - 2; + Byte remain[remainLength]; + [_buffer getBytes:remain range:NSMakeRange(eoi + 2, remainLength)]; + _buffer = [NSMutableData dataWithBytes:remain length:remainLength]; + } while (0 < eoi); +} + +/** + * Delegate for notification that the data task has finished receiving data + * @param session Session + * @param task Task + * @param error Error information + */ +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error +{ + // Called when session expires + [session invalidateAndCancel]; + _isContinue = NO; + NSLog(@"HttpStream didCompleteWithError: %@", error); +} + +@end diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/main.m b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/main.m index 78d4b63..16ddbf4 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/main.m +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/main.m @@ -1,14 +1,14 @@ -/* - * Copyright Ricoh Company, Ltd. All rights reserved. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} +/* + * Copyright Ricoh Company, Ltd. All rights reserved. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist index 9075057..552a76c 100755 --- a/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist +++ b/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2/ricoh-theta-sample-for-iosv2-Info.plist @@ -1,43 +1,43 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 0.1.0 - CFBundleSignature - ???? - CFBundleVersion - 0.1.0 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - UIMainStoryboardFile - MainStoryboard - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - - - + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.1.1 + CFBundleSignature + ???? + CFBundleVersion + 0.1.1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UIMainStoryboardFile + MainStoryboard + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + +