00001 #ifndef __sa_array_h__ 00002 #define __sa_array_h__ 00003 00004 #include "ac_app_context.h" 00005 00006 #include <glib.h> 00007 00008 #ifdef __cplusplus 00009 extern "C" { 00010 #endif 00011 00012 typedef struct _sa_Array sa_Array; 00013 00014 /** Instantiates a sensor array consisting of all supported sensors. 00015 Does not yet start the sensors. */ 00016 sa_Array* sa_Array_new (ac_AppContext* ac, 00017 GError** error); 00018 00019 /** Starts all supported sensors. */ 00020 void sa_Array_start(sa_Array* self); 00021 00022 /** Stops all supported sensors. */ 00023 void sa_Array_stop(sa_Array* self); 00024 00025 /** Destroys a sensor array. Naturally all the sensors in it are stopped. */ 00026 void sa_Array_destroy (sa_Array* self); 00027 00028 /** Returns FALSE for unknown names. */ 00029 gboolean sa_sensor_is_supported(const gchar* name); 00030 00031 gboolean sa_Array_sensor_is_running(sa_Array* self, const gchar* name); 00032 00033 void sa_Array_sensor_stop(sa_Array* self, const gchar* name); 00034 00035 gboolean sa_Array_sensor_start(sa_Array* self, const gchar* name, GError** error); 00036 00037 gboolean sa_Array_reconfigure(sa_Array* self, const gchar* key, const gchar* value, GError** error); 00038 00039 #ifdef __cplusplus 00040 } /* extern "C" */ 00041 #endif 00042 00043 #endif /* __sa_array_h__ */ 00044 00045 /** 00046 00047 sa_array.h 00048 00049 Copyright 2009 Helsinki Institute for Information Technology (HIIT) 00050 and the authors. All rights reserved. 00051 00052 Authors: Tero Hasu <tero.hasu@hut.fi> 00053 00054 Permission is hereby granted, free of charge, to any person 00055 obtaining a copy of this software and associated documentation files 00056 (the "Software"), to deal in the Software without restriction, 00057 including without limitation the rights to use, copy, modify, merge, 00058 publish, distribute, sublicense, and/or sell copies of the Software, 00059 and to permit persons to whom the Software is furnished to do so, 00060 subject to the following conditions: 00061 00062 The above copyright notice and this permission notice shall be 00063 included in all copies or substantial portions of the Software. 00064 00065 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00066 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00067 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00068 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 00069 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 00070 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00071 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00072 SOFTWARE. 00073 00074 **/
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:56 2011 by Doxygen 1.6.1