osurs
0.0.1
|
Placing reservations for found connections. More...
Functions | |
Reservation * | new_reservation (Connection *connection, int seats, char *id) |
Create a new reservation. More... | |
Placing reservations for found connections.
Reservation* new_reservation | ( | Connection * | connection, |
int | seats, | ||
char * | id | ||
) |
Create a new reservation.
Books a connection on the network, if the desired seats are available. If enough seats are available the reservation counts of the corresponding trip on the stops of the routes are increased and a new reservation is allocated and connected to the network.
connection | The connection to reserve. |
seats | The number of seats to reserve. |
id | The UUID of the reservation or NULL to generate a new one. |