diff options
Diffstat (limited to 'mobicore/rootpa/Code/Android/lib/src/com/gd/mobicore/pa/ifc/CmpResponse.java')
-rw-r--r-- | mobicore/rootpa/Code/Android/lib/src/com/gd/mobicore/pa/ifc/CmpResponse.java | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/mobicore/rootpa/Code/Android/lib/src/com/gd/mobicore/pa/ifc/CmpResponse.java b/mobicore/rootpa/Code/Android/lib/src/com/gd/mobicore/pa/ifc/CmpResponse.java index 5f9bb95..aa5d9f5 100644 --- a/mobicore/rootpa/Code/Android/lib/src/com/gd/mobicore/pa/ifc/CmpResponse.java +++ b/mobicore/rootpa/Code/Android/lib/src/com/gd/mobicore/pa/ifc/CmpResponse.java @@ -1,33 +1,33 @@ /* -Copyright © Trustonic Limited 2013 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the Trustonic Limited nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (c) 2013 TRUSTONIC LIMITED + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the TRUSTONIC LIMITED nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.gd.mobicore.pa.ifc; import android.os.Parcel; @@ -35,8 +35,8 @@ import android.os.Parcelable; /** Class that contains content management protocol response. The class inherits parcelable. - @see CmpMsg - @see CmpCommand + @see CmpMsg + @see CmpCommand */ public class CmpResponse extends CmpMsg{ private static final int RETURN_CODE_IDX=4; @@ -49,7 +49,7 @@ public class CmpResponse extends CmpMsg{ public int responseId(){ return msgId(); } - + /** @param id respose id of the message */ @@ -59,14 +59,14 @@ public class CmpResponse extends CmpMsg{ /** @return returnCode - */ + */ public int returnCode(){ return getInt(RETURN_CODE_IDX); } - + /** @param ret return code for the message - */ + */ public void setReturnCode(int ret){ setInt(RETURN_CODE_IDX, ret); } @@ -74,7 +74,7 @@ public class CmpResponse extends CmpMsg{ public void setLength(int length) { // MC_CMP_CMD_GET_VERSION and MC_CMP_CMD_GET_SUID do not have length field for legacy reasons - if(responseId()!=responseIdToCommandId(MC_CMP_CMD_GET_VERSION) + if(responseId()!=responseIdToCommandId(MC_CMP_CMD_GET_VERSION) && responseId()!=responseIdToCommandId(MC_CMP_CMD_GENERATE_AUTH_TOKEN) && responseId()!=responseIdToCommandId(MC_CMP_CMD_GET_SUID) & length > 0) // not setting length for messages that only have id @@ -83,10 +83,10 @@ public class CmpResponse extends CmpMsg{ } } - + /** Default constructor - */ + */ public CmpResponse(){ super(); } @@ -98,10 +98,10 @@ public class CmpResponse extends CmpMsg{ public CmpResponse(byte[] content){ super(content); } - + /** Constructor required by parcelable - */ + */ public CmpResponse(Parcel in){ super(in); } @@ -110,7 +110,7 @@ public class CmpResponse extends CmpMsg{ public CmpResponse createFromParcel(Parcel in){ return new CmpResponse(in); } - + public CmpResponse[] newArray(int size){ return null; } |