API Guide Home
(Online version only)

palmOneCamera.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 2004 palmOne, Inc. or its subsidiaries.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 /**
00006  * @ingroup Camera
00007  */
00008 
00009 /**
00010  *
00011  * @file    palmOneCamera.h
00012  * @version 3.0
00013  *
00014  * @brief   Public 68K include file for camera support for Treo 650 devices.
00015  *          This version of the library adds functionality for Zire72, and Treo 650.
00016  *
00017  * Notes:
00018  * The calling application should always load this library with
00019  * SysLibLoad() before use, even if it is already open by another
00020  * application(ie, SysLibFind() returns a valid refnum). When
00021  * the application is done with the library, it should be
00022  * unloaded with SysLibRemove(). We do this because there is
00023  * no good way to synchronize loading and unloading of libraries
00024  * among multiple applications. It also greatly simplifies internal
00025  * synchronization.
00026  */
00027 
00028 #ifndef __palmOneCameraMgr_H__
00029 #define __palmOneCameraMgr_H__
00030 
00031 // Palm OS common definitions
00032 #include <PalmTypes.h>
00033 #include <ErrorBase.h>
00034 #include <SystemMgr.h>
00035 #include <LibTraps.h>
00036 #include <Common/Libraries/CameraMgr/palmOneCameraCommon.h>
00037 
00038 #define CAM_LIB_TRAP(trapNum) SYS_TRAP(trapNum)
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00044 /// Standard library open routine.
00045 ///
00046 /// Library should always be loaded with SysLibLoad()(not SysLibFind())
00047 /// before calling CamLibOpen(). See note at top of file.
00048 ///
00049 /// @param refNum:  IN: Library reference number.
00050 /// @retval Err Error code.
00051 extern Err CamLibOpen(UInt16 refNum)
00052     CAM_LIB_TRAP(sysLibTrapOpen);
00053 
00054 /// Closes the Camera Manager.
00055 ///
00056 /// Library should always be unloaded with SysLibRemove() after
00057 /// CamLibClose() is called. See note at top of file.
00058 ///
00059 /// @param refNum:  IN: Library reference number.
00060 /// @retval Err Error code.
00061 extern Err CamLibClose(UInt16 refNum)
00062     CAM_LIB_TRAP(sysLibTrapClose);
00063 
00064 /// Standard library sleep function.
00065 ///
00066 /// @param refNum:  IN: Library reference number.
00067 /// @retval Err Error code.
00068 extern Err CamLibSleep(UInt16 refNum)
00069     CAM_LIB_TRAP(sysLibTrapSleep);
00070 
00071 /// Standard library wake function.
00072 ///
00073 /// @param refNum:  IN: Library reference number.
00074 /// @retval Err Error code.
00075 extern Err CamLibWake(UInt16 refNum)
00076     CAM_LIB_TRAP(sysLibTrapWake);
00077 
00078 /// Checks the version of the Camera Manager Library.
00079 ///
00080 /// @param refNum:      IN: Library reference number.
00081 /// @param sdkVersion:  IN: The version the application expects.
00082 /// @param libVersionP: OUT: The actual version of the library.
00083 /// @retval Err Error code.
00084 extern Err CamLibGetVersion(UInt16 refNum, UInt32 sdkVersion, UInt32* libVersionP)
00085     CAM_LIB_TRAP(kCamLibTrapGetVersion);
00086 
00087 /// Check or set a Camera property.
00088 ///
00089 /// @param refNum:      IN: Library reference number.
00090 /// @param cmdId:       IN: The control command used to check or set the camera property.
00091 /// @param parameterP:  IN: Pointer to a parameter based on the control command type.
00092 /// @retval Err Error code.
00093 extern Err CamLibControl(UInt16 refNum, CamLibControlType cmdId, void *parameterP)
00094     CAM_LIB_TRAP(kCamLibTrapControl);
00095 
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099 
00100 #endif // __PalmCameraLib_H__

Top Palm Developer Network
© 2004-2008, Palm, Inc. All rights reserved.
Generated on Fri Jun 13 10:06:54 2008 for Palm API Guide