about summary refs log tree commit diff stats
path: root/053recipe_header.cc
Commit message (Expand)AuthorAgeFilesLines
* 5001 - drop the :(scenario) DSLKartik Agaram2019-03-121-290/+441
* 4987 - support `browse_trace` tool in SubXKartik Agaram2019-02-251-16/+16
* 4261 - start using literals for 'true' and 'false'Kartik Agaram2018-06-171-2/+2
* 4258 - undo 4257Kartik Agaram2018-06-151-3/+0
* 4257 - abortive attempt at safe fat pointersKartik Agaram2018-06-151-0/+3
* 4134 - 'input' = 'ingredient'Kartik K. Agaram2017-12-031-1/+1
* 4104Kartik K. Agaram2017-11-031-4/+4
* 4091Kartik K. Agaram2017-10-291-1/+1
* 4089Kartik K. Agaram2017-10-221-4/+0
* 4086 - back to cleaning up delimited continuationsKartik K. Agaram2017-10-181-1/+1
* 3877Kartik K. Agaram2017-05-261-4/+4
* 3876Kartik K. Agaram2017-05-211-7/+14
* 3833Kartik K. Agaram2017-04-181-2/+6
* 3802 - more accurate sandbox resultsKartik K. Agaram2017-03-201-1/+2
* 3752 - fix a couple of segfaultsKartik K. Agaram2017-03-021-3/+21
* 3744Kartik K. Agaram2017-02-071-1/+1
* 3743Kartik K. Agaram2017-02-071-1/+1
* 3657 - better error messageKartik K. Agaram2016-11-101-0/+10
* 3656Kartik K. Agaram2016-11-101-13/+13
* 3598 - 'use before set' errors were too crypticKartik K. Agaram2016-10-271-1/+1
* 3587Kartik K. Agaram2016-10-241-0/+9
* 3576Kartik K. Agaram2016-10-231-0/+28
* 3555Kartik K. Agaram2016-10-221-1/+1
* 3554 - flag unexpected header for recipe 'main'Kartik K. Agaram2016-10-221-0/+43
* 3541Kartik K. Agaram2016-10-211-3/+1
* 3539Kartik K. Agaram2016-10-211-0/+10
* 3522Kartik K. Agaram2016-10-191-20/+20
* 3437Kartik K. Agaram2016-10-041-0/+1
* 3393Kartik K. Agaram2016-09-171-3/+2
* 3390Kartik K. Agaram2016-09-171-1/+1
* 3389Kartik K. Agaram2016-09-171-2/+2
* 3385Kartik K. Agaram2016-09-171-37/+37
* 3379Kartik K. Agaram2016-09-171-2/+2
* 3341Kartik K. Agaram2016-09-121-0/+22
* 3324 - completely redo type abbreviationsKartik K. Agaram2016-09-111-1/+1
* 3120Kartik K. Agaram2016-07-211-4/+4
* 3062Kartik K. Agaram2016-06-191-0/+4
* 2990Kartik K. Agaram2016-05-201-6/+6
* 2987Kartik K. Agaram2016-05-201-0/+492
lt'>
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

        
                                 
  
                                                            













                                                                       
                                                                      
  











                                                                                

   

                  



                 
              






                       
                         
 
                                        
                                                                                              
                           
 
                                          

                                                                            
 
                                       
                                
 
      
/*
 * jid.h
 * vim: expandtab:ts=4:sts=4:sw=4
 *
 * Copyright (C) 2012 - 2019 James Booth <boothj5@gmail.com>
 *
 * This file is part of Profanity.
 *
 * Profanity is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Profanity is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Profanity.  If not, see <https://www.gnu.org/licenses/>.
 *
 * In addition, as a special exception, the copyright holders give permission to
 * link the code of portions of this program with the OpenSSL library under
 * certain conditions as described in each individual source file, and
 * distribute linked combinations including the two.
 *
 * You must obey the GNU General Public License in all respects for all of the
 * code used other than OpenSSL. If you modify file(s) with this exception, you
 * may extend this exception to your version of the file(s), but you are not
 * obligated to do so. If you do not wish to do so, delete this exception
 * statement from your version. If you delete this exception statement from all
 * source files in the program, then also delete it here.
 *
 */

#ifndef XMPP_JID_H
#define XMPP_JID_H

#include <glib.h>

struct jid_t {
    char *str;
    char *localpart;
    char *domainpart;
    char *resourcepart;
    char *barejid;
    char *fulljid;
};

typedef struct jid_t Jid;

Jid* jid_create(const gchar *const str);
Jid* jid_create_from_bare_and_resource(const char *const barejid, const char *const resource);
void jid_destroy(Jid *jid);

gboolean jid_is_valid_room_form(Jid *jid);
char* create_fulljid(const char *const barejid, const char *const resource);
char* get_nick_from_full_jid(const char *const full_room_jid);

char* jid_fulljid_or_barejid(Jid *jid);
char* jid_random_resource(void);

#endif