/*---------------------------------------------------------------------------* Project: Horizon File: fs_API.h Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 25831 $ *---------------------------------------------------------------------------*/ #ifndef NN_FS_FS_API_H_ #define NN_FS_FS_API_H_ #include #include namespace nn { namespace fs { namespace detail { const char FILE_SERVER_NAME[] = "fs:USER"; ipc::FileSystem GetIpcFileSystem(); } /*! @brief fsライブラリを初期化します。 fs ライブラリにあるクラスや関数を使うためには、先にこの関数を呼ぶ必要があります。 */ void Initialize(); void Finalize(); bool IsInitialized(); /*! @brief ゲームカード挿入時にシグナルされる @ref nn::os::LightEvent を登録します。 @param[in] p ゲームカード挿入時にシグナルされる @ref nn::os::LightEvent を指定します。 @return なし。 */ void RegisterCardInsertedEvent(nn::os::LightEvent* p); /*! @brief @ref nn::fs::RegisterCardInsertedEvent の登録を解除します。 @return なし。 */ void UnregisterCardInsertedEvent(); /*! @brief ゲームカード取り出し時にシグナルされる @ref nn::os::LightEvent を登録します。 @param[in] p ゲームカード取り出し時にシグナルされる @ref nn::os::LightEvent を指定します。 @return なし。 */ void RegisterCardEjectedEvent(nn::os::LightEvent* p); /*! @brief @ref nn::fs::RegisterCardEjectedEvent の登録を解除します。 @return なし。 */ void UnregisterCardEjectedEvent(); /*! @brief ゲームカードが挿入されているかを返します。 本関数は高負荷のため、ゲームカード挿入イベントや取り出しイベントを待つ場合は、 @ref nn::fs::RegisterCardInsertedEvent, @ref nn::fs::RegisterCardEjectedEvent 関数で登録した @ref nn::os::LightEvent を使用してください。 @return 挿入されていれば true を、挿入されていなければ false を返します。 */ bool IsCardInserted(); /*! @brief SD カード挿入時にシグナルされる @ref nn::os::LightEvent を登録します。 @param[in] p SD カード挿入時にシグナルされる @ref nn::os::LightEvent を指定します。 @return なし。 */ void RegisterSdmcInsertedEvent(nn::os::LightEvent* p); /*! @brief @ref nn::fs::RegisterSdmcInsertedEvent の登録を解除します。 @return なし。 */ void UnregisterSdmcInsertedEvent(); /*! @brief SD カード取り出し時にシグナルされる @ref nn::os::LightEvent を登録します。 @param[in] p SD カード取り出し時にシグナルされる @ref nn::os::LightEvent を指定します。 @return なし。 */ void RegisterSdmcEjectedEvent(nn::os::LightEvent* p); /*! @brief @ref nn::fs::RegisterSdmcEjectedEvent の登録を解除します。 @return なし。 */ void UnregisterSdmcEjectedEvent(); /*! @brief SD カードが挿入されているかを返します。 本関数は高負荷のため、SD カード挿入イベントや取り出しイベントを待つ場合は、 @ref nn::fs::RegisterSdmcInsertedEvent, @ref nn::fs::RegisterSdmcEjectedEvent 関数で登録した @ref nn::os::LightEvent を使用してください。 @return 挿入されていれば true を、挿入されていなければ false を返します。 */ bool IsSdmcInserted(); /*! @brief SD カードが書き込み可能かを返します。 SD カードが書き込み可能である状態とは、SD カードが挿入されており、 かつ、SD カードが LOCK スイッチにより書き込み禁止されていない状態です。 @return 書き込み可能であれば true を、書き込み不可能であれば false を返します。 */ bool IsSdmcWritable(); } } #endif /* NN_FS_FS_API_H_ */