* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
* @section CAPI_COMMON_ERROR_OVERVIEW Overview
* This file declares common errors and provides following features for handling the error.
* - Getting/Setting the error value.
- * - Retrieving the error messages with error value.
+ * - Retrieving the error messages with error value.
*/
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
#ifndef __TIZEN_H__
# define TIZEN_DEPRECATED_API
# endif
#endif
-
-#endif // __TIZEN_H__
\ No newline at end of file
+
+#endif // __TIZEN_H__
/* Tizen Buffer Manager Error */
#define TIZEN_ERROR_TBM -0x02830000
/* Tizen EOM Error */
-#define TIZEN_ERROR_EOM -0x02840000
+#define TIZEN_ERROR_EOM -0x02840000
/* Tizen PANEL Error */
-#define TIZEN_ERROR_PANEL -0x02850000
+#define TIZEN_ERROR_PANEL -0x02850000
/* Tizen TZSH Error */
-#define TIZEN_ERROR_TZSH -0x02860000
+#define TIZEN_ERROR_TZSH -0x02860000
/* Tizen Download Error */
-#define TIZEN_ERROR_DOWNLOAD -0x02A00000
+#define TIZEN_ERROR_DOWNLOAD -0x02A00000
/* Tizen WebView Error */
#define TIZEN_ERROR_WEBVIEW -0x02A10000
/* Tizen Location Manager Error */
#define TIZEN_ERROR_LOCATION_MANAGER -0x02C00000
/* Tizen Geofence Manager Error */
-#define TIZEN_ERROR_GEOFENCE_MANAGER -0x02C10000
+#define TIZEN_ERROR_GEOFENCE_MANAGER -0x02C10000
/* Tizen Maps Service Error */
-#define TIZEN_ERROR_MAPS_SERVICE -0x02C20000
+#define TIZEN_ERROR_MAPS_SERVICE -0x02C20000
/* Tizen STT Error */
#define TIZEN_ERROR_STT -0x02F00000
/* Tizen TTS Error */
TIZEN_ERROR_END_OF_COLLECTION,
} tizen_error_e;
-
+
/**
* @brief Gets the last error code in the thread.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
int get_last_result(void);
-
+
/**
* @brief Sets the last error code to be returned in the thread.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
void set_last_result(int err);
-
+
/**
* @brief Gets the message for given the error code.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
char *get_error_message(int err);
-
+
/**
* @}
*/
-
-
+
+
#ifdef __cplusplus
}
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/
-
+
#ifndef __TIZEN_TYPE_H__
#define __TIZEN_TYPE_H__
#ifndef NULL
#ifdef __cplusplus
#define NULL (0L)
- #else
+ #else
#define NULL ((void*) 0)
#endif
#endif
if (err_code == 0) {
strncpy(msg, "Successful", strlen("Successful"));
} else if (err_code >= TIZEN_ERROR_OWNER_DEAD && err_code < 0) {
- if ((~err_code + 1) == -ENOSYS) {
+ if ((~err_code + 1) == -ENOSYS)
strncpy(msg, "Invalid operation", strlen("Invalid operation"));
- } else {
+ else
strerror_r(~err_code + 1, msg, sizeof(msg));
- }
} else if (err_code >= TIZEN_ERROR_MIN_PLATFORM_ERROR && err_code < TIZEN_ERROR_END_OF_COLLECTION) {
tmp = _get_error_message(err_code);
- if (tmp != NULL) {
+ if (tmp != NULL)
strncpy(msg, tmp, strlen(tmp));
- }
} else if (err_code >= TIZEN_ERROR_MIN_PLATFORM_MODULE && err_code < -0x009F0000) {
tmp = _get_error_message(err_code);
- if (tmp != NULL) {
+ if (tmp != NULL)
strncpy(msg, tmp, strlen(tmp));
- }
} else {;
}
return msg;
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License.
*/