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