Home | History | Annotate | Download | only in imps
      1 /*
      2  * Copyright (C) 2007-2008 Esmertec AG.
      3  * Copyright (C) 2007-2008 The Android Open Source Project
      4  *
      5  * Licensed under the Apache License, Version 2.0 (the "License");
      6  * you may not use this file except in compliance with the License.
      7  * You may obtain a copy of the License at
      8  *
      9  *     http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  */
     17 
     18 package com.android.im.imps;
     19 
     20 import com.android.im.engine.ImErrorInfo;
     21 
     22 public class ImpsErrorInfo extends ImErrorInfo {
     23 
     24     /** The client error definition* */
     25     public static final int UNAUTHORIZED = 401;
     26     public static final int BAD_PARAMETER = 402;
     27     public static final int FORBIDDEN = 403;
     28     public static final int NOT_FOUND = 404;
     29     public static final int SERVICE_NOT_SUPPORTED = 405;
     30     public static final int REQUEST_TIMEOUT = 408;
     31     public static final int INVALID_PASSWORD = 409;
     32     public static final int UNABLE_TO_DELIVER = 410;
     33     public static final int UNSUPPORTED_MEDIA_TYPE = 415;
     34     public static final int INVALID_TRANSACTION_ID = 420;
     35     public static final int USERID_AND_CLIENTID_NOT_MACTH = 422;
     36     public static final int INVALID_INVITATIO_ID = 423;
     37     public static final int INVALID_SEARCH_ID = 424;
     38     public static final int INVALID_SEARCH_INDEX = 425;
     39     public static final int INVALID_MESSAGE_ID = 426;
     40     public static final int UNAUTHORIZED_GROUP_MEMBERSHIP = 431;
     41     public static final int RESPONSE_TOO_LARGE = 432;
     42 
     43     /** The server error definition* */
     44     public static final int INTERNAL_SERVER_OR_NETWORK_ERROR = 500;
     45     public static final int NOT_IMPLMENTED = 501;
     46     public static final int SERVER_UNAVAILABLE = 503;
     47     public static final int TIMEOUT = 504;
     48     public static final int VERSION_NOT_SUPPORTED = 505;
     49     public static final int SERVICE_NOT_AGREED = 506;
     50     public static final int MESSAGE_QUEUE_FULL = 507;
     51     public static final int DOMAIN_NOT_SUPPORTED = 516;
     52     public static final int UNRESPONDED_PRESENCE_REQUEST = 521;
     53     public static final int UNRESPONDED_GROUP_REQUEST = 522;
     54     public static final int UNKNOWN_USER = 531;
     55     public static final int RECIPIENT_BLOCKED_SENDER = 532;
     56     public static final int MESSAGE_RECIPIENT_NOT_LOGGED = 533;
     57     public static final int MESSAGE_RECIPIENT_UNAUTHORIZED = 534;
     58     public static final int SEARCH_TIMEOUT = 535;
     59     public static final int TOO_MANY_HITS = 536;
     60     public static final int TOO_BROAD_SEARCH_CRITERIA = 537;
     61     public static final int MESSAGE_REJECTED = 538;
     62     public static final int HEADER_ENCODING_NOT_SUPPORTED = 540;
     63     public static final int MESSAGE_FORWARDED = 541;
     64     public static final int MESSAGE_EXPIRED = 542;
     65     public static final int NO_MATCHING_DIGEST_SCHEME_SUPPORTED = 543;
     66 
     67     /** The session error definition* */
     68     public static final int SESSION_EXPIRED = 600;
     69     public static final int FORCED_LOGOUT = 601;
     70     public static final int ALREADY_LOGGED = 603;
     71     public static final int INVALID_SESSION = 604;
     72     public static final int NEW_VALUE_NOT_ACCEPTED = 605;
     73 
     74     /** The presence and contact list error definition* */
     75     public static final int CONTACT_LIST_NOT_EXIST = 700;
     76     public static final int CONTACT_LIST_ALREADY_EXISTS = 701;
     77     public static final int INVALID_OR_UNSUPPORTED_USER_PROPERTIES = 702;
     78     public static final int INVALID_OR_UNSUPPORTED_PRESENCE_ATTRIBUTE = 750;
     79     public static final int INVALID_OR_UNSUPPORTED_RRESENCE_VALUE = 751;
     80     public static final int INVALID_OR_UNSUPPORTED_CONTACT_LIST_PROPERTY = 752;
     81     public static final int MAX_NUMBER_OF_CONTACT_LIST_REACHED = 753;
     82     public static final int MAX_NUMBER_OF_CONTACTS_REACHED = 754;
     83     public static final int MAX_NUMBER_OF_ATTRIBUTE_LISTS_REACHED = 755;
     84     public static final int AUTOMATIC_SUBSCRIPTION_NOT_SUPPORTED = 760;
     85 
     86     /** The general error definition* */
     87     public static final int MULTIPLE_ERRORS = 900;
     88     public static final int GENERAL_ADDRESS_ERROR = 901;
     89     public static final int NOT_ENOUGH_CREDIT_TO_COMPLETE_REQUESTED_OPERATION = 902;
     90     public static final int OPERATION_REQUIRES_HIGHER_CLASS_SERVICE = 903;
     91 
     92     public static final int MSISDN_ERROR = 920;
     93 
     94     private final Primitive mPrimitive;
     95 
     96     ImpsErrorInfo(int code, String description, Primitive primitive) {
     97         super(code, description);
     98         mPrimitive = primitive;
     99     }
    100 
    101     Primitive getPrimitive() {
    102         return mPrimitive;
    103     }
    104 
    105 }
    106