- if(listener != null)
- {
- SysLog(NID_SYS, "listener instance is %x.", listener);
- runtimeInfoEvent.AddListener(*listener);
- }
-
- _RuntimeInfoEventArg* pEventArg = new (std::nothrow) _RuntimeInfoEventArg();
- pEventArg->pListener = listener;
- pEventArg->DirectoryPath = directoryPath;
-
- thr_id = pthread_create(&p_thread, null, GetDirectorySizeAsync, pEventArg);
- SysLog(NID_SYS, "Thread id is %d.", thr_id);
- pthread_detach(p_thread);
+ _RuntimeClient* pRuntimeClient = _RuntimeClient::GetInstance();
+ pRuntimeClient->GetDirectorySizeValueAsync(directoryPath, listener);