| 81 | } |
| 82 | |
| 83 | int32_t Run() |
| 84 | { |
| 85 | bool result = false; |
| 86 | |
| 87 | if (m_buf) |
| 88 | { |
| 89 | result = m_parent->Add(m_hash, m_buf, m_bufSize, true); |
| 90 | } |
| 91 | else |
| 92 | { |
| 93 | result = m_parent->Add(m_hash, m_path.c_str(), true); |
| 94 | } |
| 95 | |
| 96 | if (result && m_parent->IsAlive() && m_parent->m_cbPlugin) |
| 97 | { |
| 98 | event::BroadcastGlobalEvent(m_parent->m_cbPlugin, ui::Handler::CB_STATE_READY_CACHEIMAGE, m_hash); |
| 99 | } |
| 100 | |
| 101 | return SCE_PAF_OK; |
| 102 | } |
| 103 | |
| 104 | void Finish(int32_t result) |
| 105 | { |