# OHOS::Media::CameraStateCallback - [Overview](#section807744296165632) - [Summary](#section1866436241165632) - [Public Member Functions](#pub-methods) ## **Overview** **Related Modules:** [MultiMedia\_CameraStateCallback](MultiMedia_CameraStateCallback.md) **Description:** Provides functions to response to camera states. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Public Member Functions

Function

Description

CameraStateCallback ()=default

A constructor used to create a CameraStateCallback instance.

~CameraStateCallback ()

virtual

A destructor used to delete the CameraStateCallback instance.

OnCreated (Camera &c)

virtual void

Called when the camera is successfully created.

OnCreateFailed (const std::string cameraId, int32_t errorCode)

virtual void

Called when the camera fails to be created.

OnReleased (Camera &c)

virtual void

Called when the camera is released.

OnConfigured (Camera &c)

virtual void

Called when the camera is configured.

OnConfigureFailed (const std::string cameraId, int32_t errorCode)

virtual void

Called when the camera fails to be configured.