Skip to content

Commit

Permalink
new build and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aldiand committed Dec 12, 2023
1 parent 90e0556 commit ca03339
Show file tree
Hide file tree
Showing 1,604 changed files with 22,879 additions and 445,872 deletions.
2 changes: 1 addition & 1 deletion Pod/VialerPJSIP-device.a
Git LFS file not shown
4 changes: 2 additions & 2 deletions Pod/VialerPJSIP-simulator.a
Git LFS file not shown
1 change: 1 addition & 0 deletions Pod/vialer-pjsip-include/pj++/file.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* $Id$ */
/*
* Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
Expand Down
43 changes: 22 additions & 21 deletions Pod/vialer-pjsip-include/pj++/hash.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* $Id$ */
/*
* Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
Expand Down Expand Up @@ -35,44 +36,44 @@ class Pj_Hash_Table : public Pj_Object
class iterator
{
public:
iterator()
iterator()
{
}
explicit iterator(pj_hash_table_t *h, pj_hash_iterator_t *i)
explicit iterator(pj_hash_table_t *h, pj_hash_iterator_t *i)
: ht_(h), it_(i)
{
}
iterator(const iterator &rhs)
iterator(const iterator &rhs)
: ht_(rhs.ht_), it_(rhs.it_)
{
}
void operator++()
void operator++()
{
it_ = pj_hash_next(ht_, it_);
}
bool operator==(const iterator &rhs)
bool operator==(const iterator &rhs)
{
return ht_ == rhs.ht_ && it_ == rhs.it_;
}
iterator & operator=(const iterator &rhs)
iterator & operator=(const iterator &rhs)
{
ht_=rhs.ht_; it_=rhs.it_;
return *this;
}
private:
pj_hash_table_t *ht_;
pj_hash_iterator_t it_val_;
pj_hash_iterator_t *it_;
pj_hash_table_t *ht_;
pj_hash_iterator_t it_val_;
pj_hash_iterator_t *it_;

friend class Pj_Hash_Table;
friend class Pj_Hash_Table;
};

//
// Construct hash table.
//
Pj_Hash_Table(Pj_Pool *pool, unsigned size)
{
table_ = pj_hash_create(pool->pool_(), size);
table_ = pj_hash_create(pool->pool_(), size);
}

//
Expand All @@ -89,23 +90,23 @@ class Pj_Hash_Table : public Pj_Object
const void *key,
unsigned keylen = PJ_HASH_KEY_STRING)
{
return pj_hash_calc(initial_hval, key, keylen);
return pj_hash_calc(initial_hval, key, keylen);
}

//
// Return pjlib compatible hash table object.
//
pj_hash_table_t *pj_hash_table_t_()
{
return table_;
return table_;
}

//
// Get the value associated with the specified key.
//
void *get(const void *key, unsigned keylen = PJ_HASH_KEY_STRING)
{
return pj_hash_get(table_, key, keylen);
return pj_hash_get(table_, key, keylen);
}

//
Expand All @@ -117,39 +118,39 @@ class Pj_Hash_Table : public Pj_Object
void *value,
unsigned keylen = PJ_HASH_KEY_STRING)
{
pj_hash_set(pool->pool_(), table_, key, keylen, value);
pj_hash_set(pool->pool_(), table_, key, keylen, value);
}

//
// Get number of items in the hash table.
//
unsigned count()
{
return pj_hash_count(table_);
return pj_hash_count(table_);
}

//
// Iterate hash table.
//
iterator begin()
{
iterator it(table_, NULL);
it.it_ = pj_hash_first(table_, &it.it_val_);
return it;
iterator it(table_, NULL);
it.it_ = pj_hash_first(table_, &it.it_val_);
return it;
}

//
// End of items.
//
iterator end()
{
return iterator(table_, NULL);
return iterator(table_, NULL);
}

private:
pj_hash_table_t *table_;
};


#endif /* __PJPP_HASH_HPP__ */
#endif /* __PJPP_HASH_HPP__ */

Loading

0 comments on commit ca03339

Please sign in to comment.