| 1 | /**************************************************************************** |
|---|
| 2 | |
|---|
| 3 | Copyright 2007, Virginia Polytechnic Institute and State University |
|---|
| 4 | |
|---|
| 5 | This file is part of the OSSIE Core Framework. |
|---|
| 6 | |
|---|
| 7 | OSSIE Core Framework is free software; you can redistribute it and/or modify |
|---|
| 8 | it under the terms of the Lesser GNU General Public License as published by |
|---|
| 9 | the Free Software Foundation; either version 2.1 of the License, or |
|---|
| 10 | (at your option) any later version. |
|---|
| 11 | |
|---|
| 12 | OSSIE Core Framework is distributed in the hope that it will be useful, |
|---|
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | Lesser GNU General Public License for more details. |
|---|
| 16 | |
|---|
| 17 | You should have received a copy of the Lesser GNU General Public License |
|---|
| 18 | along with OSSIE Core Framework; if not, write to the Free Software |
|---|
| 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 20 | |
|---|
| 21 | ****************************************************************************/ |
|---|
| 22 | |
|---|
| 23 | #include <string> |
|---|
| 24 | #include <iostream> |
|---|
| 25 | |
|---|
| 26 | #include "ossie/FileSystem_impl.h" |
|---|
| 27 | |
|---|
| 28 | #include <ossie/ossieSupport.h> |
|---|
| 29 | #include <ossie/debug.h> |
|---|
| 30 | |
|---|
| 31 | void ossieSupport::createProfileFromFileName(std::string fileName, std::string &profile) |
|---|
| 32 | { |
|---|
| 33 | profile = "<profile filename=\"" + fileName + "\" />"; |
|---|
| 34 | |
|---|
| 35 | return; |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | bool ossieSupport::isValidFileName(const char *fileName) |
|---|
| 39 | { |
|---|
| 40 | return FileSystem_impl::isValidPath(fileName); |
|---|
| 41 | } |
|---|
| 42 | |
|---|
| 43 | const char * ossieSupport::spd_rel_file(const char *spdFile, const char *name, std::string &fileName) |
|---|
| 44 | { |
|---|
| 45 | DEBUG(9, spd_rel_file, "Called with spdFile: " << spdFile << ", name: " << name); |
|---|
| 46 | |
|---|
| 47 | FileSystem_impl::joinPath(spdFile, name, fileName); |
|---|
| 48 | |
|---|
| 49 | DEBUG(9, spd_rel_file, "Result: " << fileName); |
|---|
| 50 | |
|---|
| 51 | return fileName.c_str(); |
|---|
| 52 | } |
|---|