1 /* profiler.h 2 * 3 * Copyright (C) 2016 Christian Hergert <christian@hergert.me> 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a copy 6 * of this software and associated documentation files (the "Software"), to 7 * deal in the Software without restriction, including without limitation the 8 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 * sell copies of the Software, and to permit persons to whom the Software is 10 * furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included in 13 * all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 * IN THE SOFTWARE. 22 */ 23 24 #ifndef GJS_PROFILER_H_ 25 #define GJS_PROFILER_H_ 26 27 #if !defined(INSIDE_GJS_H) && !defined(GJS_COMPILATION) 28 # error "Only <cjs/gjs.h> can be included directly." 29 #endif 30 31 #include <glib-object.h> 32 #include <glib.h> 33 34 #include <cjs/macros.h> 35 36 G_BEGIN_DECLS 37 38 #define GJS_TYPE_PROFILER (gjs_profiler_get_type()) 39 40 typedef struct _GjsProfiler GjsProfiler; 41 42 GJS_EXPORT 43 GType gjs_profiler_get_type(void); 44 45 GJS_EXPORT 46 void gjs_profiler_set_filename(GjsProfiler *self, 47 const char *filename); 48 GJS_EXPORT 49 void gjs_profiler_set_fd(GjsProfiler* self, int fd); 50 51 GJS_EXPORT 52 void gjs_profiler_start(GjsProfiler *self); 53 54 GJS_EXPORT 55 void gjs_profiler_stop(GjsProfiler *self); 56 57 G_END_DECLS 58 59 #endif // GJS_PROFILER_H_ 60