Update functions in dbus.c to use camel_case for consistency
This commit is contained in:
		
							parent
							
								
									de9c52f98f
								
							
						
					
					
						commit
						0a0c02021d
					
				
							
								
								
									
										32
									
								
								src/dbus.c
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								src/dbus.c
									
									
									
									
									
								
							| @ -59,18 +59,18 @@ static const char *introspection_xml = | |||||||
|     "   </interface>" |     "   </interface>" | ||||||
|     "</node>"; |     "</node>"; | ||||||
| 
 | 
 | ||||||
| static void onGetCapabilities(GDBusConnection * connection, | static void on_get_capabilities(GDBusConnection * connection, | ||||||
|                               const gchar * sender, |                               const gchar * sender, | ||||||
|                               const GVariant * parameters, |                               const GVariant * parameters, | ||||||
|                               GDBusMethodInvocation * invocation); |                               GDBusMethodInvocation * invocation); | ||||||
| static void onNotify(GDBusConnection * connection, | static void on_notify(GDBusConnection * connection, | ||||||
|                      const gchar * sender, |                      const gchar * sender, | ||||||
|                      GVariant * parameters, GDBusMethodInvocation * invocation); |                      GVariant * parameters, GDBusMethodInvocation * invocation); | ||||||
| static void onCloseNotification(GDBusConnection * connection, | static void on_close_notification(GDBusConnection * connection, | ||||||
|                                 const gchar * sender, |                                 const gchar * sender, | ||||||
|                                 GVariant * parameters, |                                 GVariant * parameters, | ||||||
|                                 GDBusMethodInvocation * invocation); |                                 GDBusMethodInvocation * invocation); | ||||||
| static void onGetServerInformation(GDBusConnection * connection, | static void on_get_server_information(GDBusConnection * connection, | ||||||
|                                    const gchar * sender, |                                    const gchar * sender, | ||||||
|                                    const GVariant * parameters, |                                    const GVariant * parameters, | ||||||
|                                    GDBusMethodInvocation * invocation); |                                    GDBusMethodInvocation * invocation); | ||||||
| @ -85,13 +85,13 @@ void handle_method_call(GDBusConnection * connection, | |||||||
|                         GDBusMethodInvocation * invocation, gpointer user_data) |                         GDBusMethodInvocation * invocation, gpointer user_data) | ||||||
| { | { | ||||||
|         if (g_strcmp0(method_name, "GetCapabilities") == 0) { |         if (g_strcmp0(method_name, "GetCapabilities") == 0) { | ||||||
|                 onGetCapabilities(connection, sender, parameters, invocation); |                 on_get_capabilities(connection, sender, parameters, invocation); | ||||||
|         } else if (g_strcmp0(method_name, "Notify") == 0) { |         } else if (g_strcmp0(method_name, "Notify") == 0) { | ||||||
|                 onNotify(connection, sender, parameters, invocation); |                 on_notify(connection, sender, parameters, invocation); | ||||||
|         } else if (g_strcmp0(method_name, "CloseNotification") == 0) { |         } else if (g_strcmp0(method_name, "CloseNotification") == 0) { | ||||||
|                 onCloseNotification(connection, sender, parameters, invocation); |                 on_close_notification(connection, sender, parameters, invocation); | ||||||
|         } else if (g_strcmp0(method_name, "GetServerInformation") == 0) { |         } else if (g_strcmp0(method_name, "GetServerInformation") == 0) { | ||||||
|                 onGetServerInformation(connection, sender, parameters, |                 on_get_server_information(connection, sender, parameters, | ||||||
|                                        invocation); |                                        invocation); | ||||||
|         } else { |         } else { | ||||||
|                 printf("WARNING: sender: %s; unknown method_name: %s\n", sender, |                 printf("WARNING: sender: %s; unknown method_name: %s\n", sender, | ||||||
| @ -99,7 +99,7 @@ void handle_method_call(GDBusConnection * connection, | |||||||
|         } |         } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void onGetCapabilities(GDBusConnection * connection, | static void on_get_capabilities(GDBusConnection * connection, | ||||||
|                               const gchar * sender, |                               const gchar * sender, | ||||||
|                               const GVariant * parameters, |                               const GVariant * parameters, | ||||||
|                               GDBusMethodInvocation * invocation) |                               GDBusMethodInvocation * invocation) | ||||||
| @ -119,7 +119,7 @@ static void onGetCapabilities(GDBusConnection * connection, | |||||||
|         g_variant_unref(value); |         g_variant_unref(value); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void onNotify(GDBusConnection * connection, | static void on_notify(GDBusConnection * connection, | ||||||
|                      const gchar * sender, |                      const gchar * sender, | ||||||
|                      GVariant * parameters, GDBusMethodInvocation * invocation) |                      GVariant * parameters, GDBusMethodInvocation * invocation) | ||||||
| { | { | ||||||
| @ -335,7 +335,7 @@ static void onNotify(GDBusConnection * connection, | |||||||
|         run(NULL); |         run(NULL); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void onCloseNotification(GDBusConnection * connection, | static void on_close_notification(GDBusConnection * connection, | ||||||
|                                 const gchar * sender, |                                 const gchar * sender, | ||||||
|                                 GVariant * parameters, |                                 GVariant * parameters, | ||||||
|                                 GDBusMethodInvocation * invocation) |                                 GDBusMethodInvocation * invocation) | ||||||
| @ -347,7 +347,7 @@ static void onCloseNotification(GDBusConnection * connection, | |||||||
|         g_dbus_connection_flush(connection, NULL, NULL, NULL); |         g_dbus_connection_flush(connection, NULL, NULL, NULL); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void onGetServerInformation(GDBusConnection * connection, | static void on_get_server_information(GDBusConnection * connection, | ||||||
|                                    const gchar * sender, |                                    const gchar * sender, | ||||||
|                                    const GVariant * parameters, |                                    const GVariant * parameters, | ||||||
|                                    GDBusMethodInvocation * invocation) |                                    GDBusMethodInvocation * invocation) | ||||||
| @ -360,10 +360,10 @@ static void onGetServerInformation(GDBusConnection * connection, | |||||||
|         g_dbus_connection_flush(connection, NULL, NULL, NULL); |         g_dbus_connection_flush(connection, NULL, NULL, NULL); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void notificationClosed(notification * n, int reason) | void notification_closed(notification * n, int reason) | ||||||
| { | { | ||||||
|         if (!dbus_conn) { |         if (!dbus_conn) { | ||||||
|                 printf("DEBUG: notificationClosed but not (yet) connected\n"); |                 printf("DEBUG: notification_closed but not (yet) connected\n"); | ||||||
|                 return; |                 return; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| @ -377,12 +377,12 @@ void notificationClosed(notification * n, int reason) | |||||||
|                                       "NotificationClosed", body, &err); |                                       "NotificationClosed", body, &err); | ||||||
| 
 | 
 | ||||||
|         if (err) { |         if (err) { | ||||||
|                 printf("notificationClosed ERROR\n"); |                 printf("notification_closed ERROR\n"); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void actionInvoked(notification * n, const char *identifier) | void action_invoked(notification * n, const char *identifier) | ||||||
| { | { | ||||||
|         GVariant *body = g_variant_new("(us)", n->id, identifier); |         GVariant *body = g_variant_new("(us)", n->id, identifier); | ||||||
|         GError *err = NULL; |         GError *err = NULL; | ||||||
|  | |||||||
| @ -10,8 +10,8 @@ | |||||||
| int initdbus(void); | int initdbus(void); | ||||||
| void dbus_tear_down(int id); | void dbus_tear_down(int id); | ||||||
| /* void dbus_poll(int timeout); */ | /* void dbus_poll(int timeout); */ | ||||||
| void notificationClosed(notification * n, int reason); | void notification_closed(notification * n, int reason); | ||||||
| void actionInvoked(notification * n, const char *identifier); | void action_invoked(notification * n, const char *identifier); | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -149,7 +149,7 @@ void invoke_action(const char *action) | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (invoked && action_identifier) { |         if (invoked && action_identifier) { | ||||||
|                 actionInvoked(invoked, action_identifier); |                 action_invoked(invoked, action_identifier); | ||||||
|         } |         } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -556,7 +556,7 @@ int notification_close_by_id(int id, int reason) | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (reason > 0 && reason < 4 && target != NULL) { |         if (reason > 0 && reason < 4 && target != NULL) { | ||||||
|                 notificationClosed(target, reason); |                 notification_closed(target, reason); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         wake_up(); |         wake_up(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikos Tsipinakis
						Nikos Tsipinakis