'@param data: (Optional) See decode()
@param password: (Optional) Password to use while encoding/decoding messages'

def __init__(self, data=None, password=None):

    _GNTPBase.__init__(self, 'REGISTER')
    self.notifications = []
    self.resources = {}
    self.requiredHeaders = ['Application-Name', 'Notifications-Count']
    self.requiredNotification = ['Notification-Name']
    if data:
        self.decode(data, password)
    else:
        self.set_password(password)
        self.headers['Application-Name'] = 'pygntp'
        self.headers['Notifications-Count'] = 0
        self.add_origin_info()
