1 /*
2  * Copyright (C) 2007 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.internal.telephony.cat;
18 
19 import android.compat.annotation.UnsupportedAppUsage;
20 
21 public class CatResponseMessage {
22         CommandDetails mCmdDet = null;
23         ResultCode mResCode  = ResultCode.OK;
24         int mUsersMenuSelection = 0;
25         String mUsersInput  = null;
26         boolean mUsersYesNoSelection = false;
27         boolean mUsersConfirm = false;
28         boolean mIncludeAdditionalInfo = false;
29         int mAdditionalInfo = 0;
30         int mEventValue = -1;
31         byte[] mAddedInfo = null;
32 
CatResponseMessage(CatCmdMessage cmdMsg)33         public CatResponseMessage(CatCmdMessage cmdMsg) {
34             mCmdDet = cmdMsg.mCmdDet;
35         }
36 
setResultCode(ResultCode resCode)37         public void setResultCode(ResultCode resCode) {
38             mResCode = resCode;
39         }
40 
setMenuSelection(int selection)41         public void setMenuSelection(int selection) {
42             mUsersMenuSelection = selection;
43         }
44 
setInput(String input)45         public void setInput(String input) {
46             mUsersInput = input;
47         }
48 
49         @UnsupportedAppUsage
setEventDownload(int event, byte[] addedInfo)50         public void setEventDownload(int event, byte[] addedInfo) {
51             this.mEventValue = event;
52             this.mAddedInfo = addedInfo;
53         }
54 
setYesNo(boolean yesNo)55         public void setYesNo(boolean yesNo) {
56             mUsersYesNoSelection = yesNo;
57         }
58 
setConfirmation(boolean confirm)59         public void setConfirmation(boolean confirm) {
60             mUsersConfirm = confirm;
61         }
62 
setAdditionalInfo(int info)63         public void setAdditionalInfo(int info) {
64             mIncludeAdditionalInfo = true;
65             mAdditionalInfo = info;
66         }
67 
getCmdDetails()68         CommandDetails getCmdDetails() {
69             return mCmdDet;
70         }
71     }
72