LibnotifyLoader: add notify_get_server_caps support
This commit is contained in:
		
					parent
					
						
							
								4e7f478d1e
							
						
					
				
			
			
				commit
				
					
						a22dc8676f
					
				
			
		
					 2 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
					@ -47,6 +47,15 @@ bool LibNotifyLoader::Load(const std::string& library_name) {
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  notify_get_server_caps =
 | 
				
			||||||
 | 
					      reinterpret_cast<decltype(this->notify_get_server_caps)>(
 | 
				
			||||||
 | 
					          dlsym(library_, "notify_get_server_caps"));
 | 
				
			||||||
 | 
					  notify_get_server_caps = &::notify_get_server_caps;
 | 
				
			||||||
 | 
					  if (!notify_get_server_caps) {
 | 
				
			||||||
 | 
					    CleanUp(true);
 | 
				
			||||||
 | 
					    return false;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  notify_notification_new =
 | 
					  notify_notification_new =
 | 
				
			||||||
      reinterpret_cast<decltype(this->notify_notification_new)>(
 | 
					      reinterpret_cast<decltype(this->notify_notification_new)>(
 | 
				
			||||||
          dlsym(library_, "notify_notification_new"));
 | 
					          dlsym(library_, "notify_notification_new"));
 | 
				
			||||||
| 
						 | 
					@ -114,6 +123,7 @@ void LibNotifyLoader::CleanUp(bool unload) {
 | 
				
			||||||
  notify_is_initted = NULL;
 | 
					  notify_is_initted = NULL;
 | 
				
			||||||
  notify_init = NULL;
 | 
					  notify_init = NULL;
 | 
				
			||||||
  notify_get_server_info = NULL;
 | 
					  notify_get_server_info = NULL;
 | 
				
			||||||
 | 
					  notify_get_server_caps = NULL;
 | 
				
			||||||
  notify_notification_new = NULL;
 | 
					  notify_notification_new = NULL;
 | 
				
			||||||
  notify_notification_add_action = NULL;
 | 
					  notify_notification_add_action = NULL;
 | 
				
			||||||
  notify_notification_set_image_from_pixbuf = NULL;
 | 
					  notify_notification_set_image_from_pixbuf = NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@ class LibNotifyLoader {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  decltype(&::notify_is_initted) notify_is_initted;
 | 
					  decltype(&::notify_is_initted) notify_is_initted;
 | 
				
			||||||
  decltype(&::notify_init) notify_init;
 | 
					  decltype(&::notify_init) notify_init;
 | 
				
			||||||
 | 
					  decltype(&::notify_get_server_caps) notify_get_server_caps;
 | 
				
			||||||
  decltype(&::notify_get_server_info) notify_get_server_info;
 | 
					  decltype(&::notify_get_server_info) notify_get_server_info;
 | 
				
			||||||
  decltype(&::notify_notification_new) notify_notification_new;
 | 
					  decltype(&::notify_notification_new) notify_notification_new;
 | 
				
			||||||
  decltype(&::notify_notification_add_action) notify_notification_add_action;
 | 
					  decltype(&::notify_notification_add_action) notify_notification_add_action;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue