1 /*
2  * Copyright (C) 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.libraries.rcs.simpleclient.service;
18 
19 import com.android.libraries.rcs.simpleclient.SimpleRcsClientContext;
20 
21 import java.util.Set;
22 
23 /**
24  * Covers service state and feature tag association.
25  */
26 public interface ImsService {
27 
28     /**
29      * Associated feature tags.
30      * Services will started and stopped according to the registration state of the feature tags.
31      */
getFeatureTags()32     Set<String> getFeatureTags();
33 
34     /**
35      * Services started when their feature tags are enabled from the
36      * {@link com.android.libraries.rcs.simpleclient.registration.RegistrationController}.
37      * Context is made available to the ImsService here.
38      */
start(SimpleRcsClientContext context)39     void start(SimpleRcsClientContext context);
40 
41     /**
42      * Services stopped when their feature tags are disabled from
43      * {@link com.android.libraries.rcs.simpleclient.registration.RegistrationController}
44      */
stop()45     void stop();
46 
47     /**
48      * Simple callback mechanism for monitoring feature tag/ims service state.
49      */
onStateChange(StateChangeCallback cb)50     void onStateChange(StateChangeCallback cb);
51 }
52