Changeset 17336


Ignore:
Timestamp:
07/25/12 00:44:17 (9 years ago)
Author:
nit
Message:

[titan] add skinfunktion getoscamserver

Location:
titan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/doc/skindoku.txt

    r16927 r17336  
    163163getpowerofftime
    164164getimgname
     165getoscamserver
  • titan/titan/skin.h

    r17221 r17336  
    136136        if(ostrcmp("getimgname", value) == 0)
    137137                return &getimgname;
     138        if(ostrcmp("getoscamserver", value) == 0)
     139                return &getoscamserver;
    138140        if(ostrcmp("gettime", value) == 0)
    139141                return &gettime;
  • titan/titan/skinfunc.h

    r17113 r17336  
    875875}
    876876
     877char* getoscamserver(struct skin* node)
     878{
     879        char* buf = NULL, *tmpstr = NULL;
     880
     881        buf = readfiletomem("/tmp/rcm.info", 1);
     882        tmpstr = ostrstr(buf, "from:");
     883        if(tmpstr != NULL)
     884        {
     885                tmpstr = stringreplacecharonce(tmpstr, '\n', '\0');
     886                tmpstr = ostrcat(tmpstr, NULL, 0, 0);
     887        }
     888        free(buf); buf = NULL;
     889
     890        return tmpstr;
     891}
     892
    877893#endif
Note: See TracChangeset for help on using the changeset viewer.