add fake connection to C API
This commit is contained in:
		
							parent
							
								
									960f12ebc5
								
							
						
					
					
						commit
						f8f5dd0d4f
					
				
					 2 changed files with 31 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1201,6 +1201,20 @@ SPCommand *sp_command_hard_reset(void);
 | 
			
		|||
 */
 | 
			
		||||
SPCommand *sp_command_try_from_packet(SPPacket *packet);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Creates a new instance of [SPConnection] for testing that does not actually send anything.
 | 
			
		||||
 *
 | 
			
		||||
 * returns: a new instance. Will never return NULL.
 | 
			
		||||
 *
 | 
			
		||||
 * # Safety
 | 
			
		||||
 *
 | 
			
		||||
 * The caller has to make sure that:
 | 
			
		||||
 *
 | 
			
		||||
 * - the returned instance is freed in some way, either by using a consuming function or
 | 
			
		||||
 *   by explicitly calling `sp_connection_free`.
 | 
			
		||||
 */
 | 
			
		||||
SPConnection *sp_connection_fake(void);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Closes and deallocates a [SPConnection].
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue