• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2017 Pekka Paalanen <pq@iki.fi>
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining
5  * a copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial
14  * portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23  * SOFTWARE.
24  */
25 
26 #ifndef WESTON_LOG_H
27 #define WESTON_LOG_H
28 
29 // OHOS remove logger
30 //#include <stdbool.h>
31 //#include <stdlib.h>
32 //#include <stdarg.h>
33 //#include <stdint.h>
34 //#include <stdio.h>
35 //
36 //#ifdef  __cplusplus
37 //extern "C" {
38 //#endif
39 //
40 //struct weston_compositor;
41 //struct weston_log_context;
42 //struct wl_display;
43 //struct weston_log_subscriber;
44 //struct weston_log_subscription;
45 //
46 //void
47 //weston_compositor_enable_debug_protocol(struct weston_compositor *);
48 //
49 //bool
50 //weston_compositor_is_debug_protocol_enabled(struct weston_compositor *);
51 //
52 //struct weston_log_scope;
53 //struct weston_debug_stream;
54 //
55 ///** weston_log_scope callback
56 // *
57 // * @param sub The subscription.
58 // * @param user_data The \c user_data argument given to
59 // * weston_log_ctx_add_log_scope() or weston_compositor_add_log_scope().
60 // *
61 // * @memberof weston_log_scope
62 // */
63 //typedef void (*weston_log_scope_cb)(struct weston_log_subscription *sub,
64 //				    void *user_data);
65 //
66 //struct weston_log_scope *
67 //weston_log_ctx_add_log_scope(struct weston_log_context *log_ctx,
68 //			     const char *name,
69 //			     const char *description,
70 //			     weston_log_scope_cb new_subscription,
71 //			     weston_log_scope_cb destroy_subscription,
72 //			     void *user_data);
73 //
74 //struct weston_log_scope *
75 //weston_compositor_add_log_scope(struct weston_compositor *compositor,
76 //				const char *name,
77 //				const char *description,
78 //				weston_log_scope_cb new_subscription,
79 //				weston_log_scope_cb destroy_subscription,
80 //				void *user_data);
81 //
82 //void
83 //weston_log_scope_destroy(struct weston_log_scope *scope);
84 //
85 //bool
86 //weston_log_scope_is_enabled(struct weston_log_scope *scope);
87 //
88 //void
89 //weston_log_scope_write(struct weston_log_scope *scope,
90 //			 const char *data, size_t len);
91 //
92 //int
93 //weston_log_scope_vprintf(struct weston_log_scope *scope,
94 //			   const char *fmt, va_list ap);
95 //
96 //int
97 //weston_log_scope_printf(struct weston_log_scope *scope,
98 //			  const char *fmt, ...)
99 //			  __attribute__ ((format (printf, 2, 3)));
100 //void
101 //weston_log_subscription_printf(struct weston_log_subscription *sub,
102 //				const char *fmt, ...)
103 //			  __attribute__ ((format (printf, 2, 3)));
104 //void
105 //weston_log_scope_complete(struct weston_log_scope *scope);
106 //
107 //void
108 //weston_log_subscription_complete(struct weston_log_subscription *sub);
109 //
110 //char *
111 //weston_log_scope_timestamp(struct weston_log_scope *scope,
112 //			     char *buf, size_t len);
113 //
114 //void
115 //weston_log_subscriber_destroy(struct weston_log_subscriber *subscriber);
116 //
117 //void
118 //weston_log_subscribe(struct weston_log_context *log_ctx,
119 //		     struct weston_log_subscriber *subscriber,
120 //		     const char *scope_name);
121 //
122 //struct weston_log_subscriber *
123 //weston_log_subscriber_create_log(FILE *dump_to);
124 //
125 //struct weston_log_subscriber *
126 //weston_log_subscriber_create_flight_rec(size_t size);
127 //
128 //void
129 //weston_log_subscriber_display_flight_rec(struct weston_log_subscriber *sub);
130 //
131 //struct weston_log_subscription *
132 //weston_log_subscription_iterate(struct weston_log_scope *scope,
133 //				struct weston_log_subscription *sub_iter);
134 //
135 //void
136 //weston_log_flight_recorder_display_buffer(FILE *file);
137 //
138 //#ifdef  __cplusplus
139 //}
140 //#endif
141 
142 #endif /* WESTON_LOG_H */
143