SIP Witch 1.9.15
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Static Protected Member Functions | Private Member Functions
sipwitch::UserCache Class Reference

User caches may be used to contact nearby users in multicast registries. More...

#include <cache.h>

Inheritance diagram for sipwitch::UserCache:
Inheritance graph
[legend]
Collaboration diagram for sipwitch::UserCache:
Collaboration graph
[legend]

Public Member Functions

void  set (struct sockaddr *addr)
 

Static Public Member Functions

static void  add (const char *id, struct sockaddr *addr, time_t create, unsigned expire=130)
  Add or refresh user in cache. More...
 
static UserCachefind (const char *id)
  Find user record. More...
 
static void  release (UserCache *entry)
  Detach a found user record. More...
 

Data Fields

char  userid [32]
 
struct sockaddr_internet  address
 
time_t  created
 
time_t  expires
 

Protected Member Functions

  UserCache ()
 

Static Protected Member Functions

static UserCacherequest (const char *id)
 
static void  expire (LinkedObject **list, LinkedObject **free)
 

Private Member Functions

void  release (void)
 

Detailed Description

User caches may be used to contact nearby users in multicast registries.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org

Definition at line 84 of file cache.h.

Constructor & Destructor Documentation

sipwitch::UserCache::UserCache ( )
protected

Definition at line 39 of file cache.cpp.

Member Function Documentation

void sipwitch::UserCache::add ( const char *  id,
struct sockaddr *  addr,
time_t  create,
unsigned  expire = 130 
)
static

Add or refresh user in cache.

Parameters
id of user to update.
address of sipwitch peer who has this user.
create time of registration if multiple peers.
expire record in seconds.

Definition at line 159 of file cache.cpp.

void sipwitch::Cache::expire ( LinkedObject **  list,
LinkedObject **  free 
)
staticprotectedinherited

Definition at line 44 of file cache.cpp.

UserCache * sipwitch::UserCache::find ( const char *  id )
static

Find user record.

Parameters
id to find.
Returns
found cache entry.

Definition at line 130 of file cache.cpp.

void sipwitch::UserCache::release ( void  )
private

Definition at line 148 of file cache.cpp.

void sipwitch::UserCache::release ( UserCacheentry )
static

Detach a found user record.

Parameters
entry to release or NULL if none.

Definition at line 153 of file cache.cpp.

UserCache * sipwitch::UserCache::request ( const char *  id )
staticprotected

Definition at line 115 of file cache.cpp.

void sipwitch::UserCache::set ( struct sockaddr *  addr )
inline

Definition at line 98 of file cache.h.

Field Documentation

struct sockaddr_internet sipwitch::UserCache::address

Definition at line 96 of file cache.h.

time_t sipwitch::Cache::created
inherited

Definition at line 64 of file cache.h.

time_t sipwitch::Cache::expires
inherited

Definition at line 65 of file cache.h.

char sipwitch::UserCache::userid[32]

Definition at line 95 of file cache.h.


The documentation for this class was generated from the following files:

Generated on Dec 21, 2017 for sipwitch-1.9.15 (*.h and *.cpp), libosip2-5.0.0 (*.h) and libeXosip2-4.0.0 (*.h), by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /