>> Methodology: >> 1. Go through sequence from high order to low order >> 2. Try to connect the service if no higher service is connected > >so we have all services pre-sorted in a GSequence. If the first service >is in a state different than IDLE, then stop right here. The first >service in that list is always the default gateway. > >No need to go further. We just can trigger that process if something >changes later. It should be save to run this at any time. I think you just want to implement "single connection" here, not what I designed "multi-connection". :-) > >> 3. Try to connect the service if any of the higher connected service does not >> share device with the service. > >I wouldn't make it that complicated. Just try the services in the order >of the GSequence one by one. > >Obviously all services with state FAILURE need to be skipped. > >> 4. Before Drag and Drop, disconnect the service firstly. > >Only if you move the service to the top (becoming default connection), >then you need to disconnect the other one. However for now, I prefer if >we just return an error in that case. Something like "not connected". > >> 5. Handle of failed connected service. >> 1) Failed connect leads "workable" flag to "(f)" >> 2) The (f) service will be ignored >> 3) The (f) flag can be cleared, so service can be go through again > >We do have service->state = FAILURE for this. And service->error gives >you a detailed error code. I like Service State. :-) Thank you very much; I will work out patch according to your feedback.
> > >_______________________________________________ >connman mailing list >[email protected] >http://lists.connman.net/listinfo/connman _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
