mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 10:08:56 +01:00 
			
		
		
		
	Implement g_content_type_is_mime_type() (clone of win32's)
Add missing function, copying from gcontenttype-win32.c per Patrick Griffis (Comment #55 of bug report) https://bugzilla.gnome.org/show_bug.cgi?id=734946
This commit is contained in:
		
				
					committed by
					
						
						Patrick Griffis
					
				
			
			
				
	
			
			
			
						parent
						
							ecc27a0cba
						
					
				
				
					commit
					ea586b47a3
				
			@@ -132,6 +132,23 @@ g_content_type_is_a (const gchar *ctype,
 | 
				
			|||||||
  return ret;
 | 
					  return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					gboolean
 | 
				
			||||||
 | 
					g_content_type_is_mime_type (const gchar *type,
 | 
				
			||||||
 | 
					                             const gchar *mime_type)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  gchar *content_type;
 | 
				
			||||||
 | 
					  gboolean ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  g_return_val_if_fail (type != NULL, FALSE);
 | 
				
			||||||
 | 
					  g_return_val_if_fail (mime_type != NULL, FALSE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  content_type = g_content_type_from_mime_type (mime_type);
 | 
				
			||||||
 | 
					  ret = g_content_type_is_a (type, content_type);
 | 
				
			||||||
 | 
					  g_free (content_type);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return ret;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
gboolean
 | 
					gboolean
 | 
				
			||||||
g_content_type_is_unknown (const gchar *type)
 | 
					g_content_type_is_unknown (const gchar *type)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user