Home | History | Annotate | Download | only in roap
      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 #ifndef _REGISTRATION_
     17 #define _REGISTRATION_
     18 
     19 #include <roap/RoapMessageHandler.h>
     20 
     21 class Registration : public RoapMessageHandler
     22 {
     23 public:
     24     /**
     25      * Constructor for Registration.
     26      * @param type the address of RI.
     27      */
     28     Registration(string riAddres);
     29 
     30     /**
     31      * Registration with the RI.
     32      * @return the result of registration.
     33      */
     34     int16_t registerWithRI();
     35 
     36     /**
     37      * Create one specified client message based on message template xml file.
     38      * @param type the message type.
     39      * @return the pointer of the document object of the message if successful,otherwise
     40      *         return NULL.
     41      */
     42      XMLDocumentImpl* createClientMsg(int16_t type);
     43 }
     44 #endif _REGISTRATION_
     45